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 TypeMethodDescriptionvoid
addLinkedObjects
(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 objectgetLinkedElement
(boolean hiddenOnly) Get the trash element that represent one of the linked objects (seeaddLinkedObjects(java.lang.String...)
) of this elementvoid
setHidden
(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, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
Methods 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, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultiple
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods 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, synchronizeValues
Methods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChild
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
Methods 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
-
getLinkedElement
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
-