Interface TrashService

All Superinterfaces:
TrashService
All Known Implementing Classes:
AbstractTrashService, BridgeTrashService, LifeCycleTrashService, PropertyTrashService

@Deprecated public interface TrashService extends TrashService
Deprecated.
since 10.2, use TrashService instead.
Service containing the logic about deleting/purging/undeleting a document.
  • Method Details

    • folderAllowsDelete

      @Deprecated boolean folderAllowsDelete(DocumentModel folder)
      Deprecated.
      since 10.1 only used in JSF part, no replacement
      Can a child of the folder be trashed?
      Parameters:
      folder - the folder
      Returns:
      true if the folder allows its children to be trashed
    • checkDeletePermOnParents

      @Deprecated boolean checkDeletePermOnParents(List<DocumentModel> docs)
      Deprecated.
      since 10.1 only used in JSF part, no replacement
      Is at least one doc deletable according to its container?
      Parameters:
      docs - the documents
      Returns:
      true if one doc is in a folder that allows its children to be trashed
    • canDelete

      @Deprecated boolean canDelete(List<DocumentModel> docs, NuxeoPrincipal principal, boolean checkProxies)
      Deprecated.
      since 10.1 only used in JSF part, no replacement
      Is at least one doc deletable?
      Parameters:
      docs - the documents
      principal - the current user (to check locks)
      checkProxies - true to count proxies as non-deletable
      Returns:
      true if at least one doc is deletable
    • canPurgeOrUndelete

      @Deprecated default boolean canPurgeOrUndelete(List<DocumentModel> docs, NuxeoPrincipal principal)
      Are all documents purgeable/undeletable?

      Documents need to be in the trash for this to be true, in addition to the standard permission checks.

      Parameters:
      docs - the documents
      principal - the current user (to check locks)
      Returns:
      true if the documents are purgeable/undeletable
    • getTrashInfo

      @Deprecated TrashInfo getTrashInfo(List<DocumentModel> docs, NuxeoPrincipal principal, boolean checkProxies, boolean checkDeleted)
      Deprecated.
      since 10.1 only used in JSF part, no replacement
      Gets the trash info for a list of documents.
      Parameters:
      docs - the documents
      principal - the current user (to check locks)
      checkProxies - true to count proxies as non-deletable
      checkDeleted - true if documents have to be in the trashed state to be considered (otherwise forbidden)
      Returns:
      the trash info
    • getAboveDocument

      @Deprecated DocumentModel getAboveDocument(DocumentModel doc, Set<Path> paths)
      Deprecated.
      since 10.1 only used in JSF part, use TrashService.getAboveDocument(DocumentModel, NuxeoPrincipal) instead.
      Gets the closest document's ancestor above all the paths.

      This is used to find what safe document to redirect to when deleting some.

      Parameters:
      doc - the document
      paths - the paths
      Returns:
      the closer document above doc and above all the paths
    • undeleteDocuments

      @Deprecated Set<DocumentRef> undeleteDocuments(List<DocumentModel> docs)
      Deprecated.
      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)