Class PropertyTrashService

java.lang.Object
org.nuxeo.ecm.core.trash.AbstractTrashService
org.nuxeo.ecm.core.trash.PropertyTrashService
All Implemented Interfaces:
TrashService, TrashService

public class PropertyTrashService extends AbstractTrashService
A TrashService implementation relying on ecm:isTrashed.
Since:
10.1
  • Field Details

  • Constructor Details

    • PropertyTrashService

      public PropertyTrashService()
  • Method Details

    • isTrashed

      public boolean isTrashed(CoreSession session, DocumentRef docRef)
      Returns:
      whether or not the input DocumentRef is trashed.
    • trashDocuments

      public void trashDocuments(List<DocumentModel> docs)
      Description copied from interface: TrashService
      Moves documents to the trash.

      Do nothing if the document current state is trashed.

      Proxies are removed.

      Since 10.3, sublevels are trashed asynchronously using BAF.

      Parameters:
      docs - the documents to trash
    • doTrashDocument

      protected void doTrashDocument(DocumentModel doc)
    • undeleteDocuments

      public Set<DocumentRef> undeleteDocuments(List<DocumentModel> docs)
      Description copied from interface: TrashService
      Undeletes documents (and ancestors if needed to make them visible).

      Also fires async events to untrash the children.

      Parameters:
      docs - the documents to undelete
      Returns:
      the set of ancestors whose children have been untrashed (for UI notification)
    • doUntrashDocument

      protected Set<DocumentRef> doUntrashDocument(DocumentModel doc, boolean processChildren)
    • trashDescendants

      protected void trashDescendants(DocumentModel model, Boolean value)
    • hasFeature

      public boolean hasFeature(TrashService.Feature feature)
      Description copied from interface: TrashService
      Checks if a feature is available.