Interface TrashElement
- All Superinterfaces:
AmetysObject,DataAwareAmetysObject,DataHolder,JCRAmetysObject,JCRTraversableAmetysObject,MetadataAwareAmetysObject,ModelAwareDataAwareAmetysObject,ModelAwareDataHolder,ModifiableAmetysObject,ModifiableDataHolder,ModifiableMetadataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,ModifiableModelAwareDataHolder,ModifiableTraversableAmetysObject,RemovableAmetysObject,TraversableAmetysObject
- All Known Implementing Classes:
DefaultTrashElement
public interface TrashElement
extends JCRTraversableAmetysObject, ModifiableModelAwareDataAwareAmetysObject
An
AmetysObject that represents an other AmetysObject that was trashed-
Field Summary
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, STATUS_SUFFIX -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLinkedObjects(String... linkedObjectsIds) Add the objects to the list of objects whose thrashing was related to the trashing of this element's object.Get the id of the trashed Ametys objectgetLinkedElements(boolean hiddenOnly) Get the trash element that represent one of the linked objects (seeaddLinkedObjects(java.lang.String...)) of this elementvoidsetHidden(boolean hidden) Set the hidden status of the trash element.
An element should be hidden if it was trashed because an other object was trashed.
Hidden element should not be visible when listing the trash elements, and should be restored or permanently deleted along with the element that triggered the thrashingMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAXMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getDataNames, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultipleMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getDataHolder, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRepositoryData, getRootDataHolder, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChildMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
removeMethods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
-
Method Details
-
getAmetysObjectId
Get the id of the trashed Ametys object- Returns:
- the id
-
getLinkedElements
Get the trash element that represent one of the linked objects (seeaddLinkedObjects(java.lang.String...)) of this element- Parameters:
hiddenOnly- true to only retrieve the hidden elements- Returns:
- the linked elements
-
addLinkedObjects
Add the objects to the list of objects whose thrashing was related to the trashing of this element's object. If an element representing these linked objects in the trash is present during restoration or deletion of the current element, they should be restored/deleted at the same time.- Parameters:
linkedObjectsIds- a list of Ametys object ids
-
setHidden
Set the hidden status of the trash element.
An element should be hidden if it was trashed because an other object was trashed.
Hidden element should not be visible when listing the trash elements, and should be restored or permanently deleted along with the element that triggered the thrashing- Parameters:
hidden- true to set hidden
-