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

An AmetysObject that represents an other AmetysObject that was trashed
  • Method Details

    • getAmetysObjectId

      Get the id of the trashed Ametys object
      Returns:
      the id
    • getLinkedElement

      Set<TrashElement> getLinkedElement(boolean hiddenOnly)
      Get the trash element that represent one of the linked objects (see addLinkedObjects(java.lang.String...)) of this element
      Parameters:
      hiddenOnly - true to only retrieve the hidden elements
      Returns:
      the linked elements
    • addLinkedObjects

      void addLinkedObjects(String... linkedObjectsIds)
      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

      void 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 thrashing
      Parameters:
      hidden - true to set hidden