Interface TrashService

    • Method Detail

      • 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
      • 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)