Package org.nuxeo.ecm.core.trash
Interface TrashService
-
- All Superinterfaces:
TrashService
- All Known Implementing Classes:
AbstractTrashService,BridgeTrashService,LifeCycleTrashService,PropertyTrashService
@Deprecated public interface TrashService extends TrashService
Deprecated.since 10.2, useTrashServiceinstead.Service containing the logic about deleting/purging/undeleting a document.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.api.trash.TrashService
TrashService.Feature
-
-
Field Summary
-
Fields inherited from interface org.nuxeo.ecm.core.api.trash.TrashService
ABOUT_TO_TRASH, ABOUT_TO_UNTRASH, DISABLE_TRASH_RENAMING, DOCUMENT_TRASHED, DOCUMENT_UNTRASHED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleancanDelete(List<DocumentModel> docs, NuxeoPrincipal principal, boolean checkProxies)Deprecated.since 10.1 only used in JSF part, no replacementdefault booleancanPurgeOrUndelete(List<DocumentModel> docs, NuxeoPrincipal principal)Deprecated.since 10.1, useTrashService.canPurgeOrUntrash(List, NuxeoPrincipal)booleancheckDeletePermOnParents(List<DocumentModel> docs)Deprecated.since 10.1 only used in JSF part, no replacementbooleanfolderAllowsDelete(DocumentModel folder)Deprecated.since 10.1 only used in JSF part, no replacementDocumentModelgetAboveDocument(DocumentModel doc, Set<Path> paths)Deprecated.since 10.1 only used in JSF part, useTrashService.getAboveDocument(DocumentModel, NuxeoPrincipal)instead.TrashInfogetTrashInfo(List<DocumentModel> docs, NuxeoPrincipal principal, boolean checkProxies, boolean checkDeleted)Deprecated.since 10.1 only used in JSF part, no replacementSet<DocumentRef>undeleteDocuments(List<DocumentModel> docs)Deprecated.since 10.1 useTrashService.untrashDocuments(List)instead-
Methods inherited from interface org.nuxeo.ecm.core.api.trash.TrashService
canPurgeOrUntrash, canPurgeOrUntrash, getAboveDocument, getDocuments, hasFeature, isMangledName, isTrashed, mangleName, purgeDocuments, purgeDocumentsUnder, trashDocument, trashDocuments, unmangleName, unmangleName, untrashDocument, untrashDocuments
-
-
-
-
Method Detail
-
folderAllowsDelete
@Deprecated boolean folderAllowsDelete(DocumentModel folder)
Deprecated.since 10.1 only used in JSF part, no replacementCan a child of the folder be trashed?- Parameters:
folder- the folder- Returns:
trueif 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 replacementIs at least one doc deletable according to its container?- Parameters:
docs- the documents- Returns:
trueif 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 replacementIs at least one doc deletable?- Parameters:
docs- the documentsprincipal- the current user (to check locks)checkProxies-trueto count proxies as non-deletable- Returns:
trueif at least one doc is deletable
-
canPurgeOrUndelete
@Deprecated default boolean canPurgeOrUndelete(List<DocumentModel> docs, NuxeoPrincipal principal)
Deprecated.since 10.1, useTrashService.canPurgeOrUntrash(List, NuxeoPrincipal)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 documentsprincipal- the current user (to check locks)- Returns:
trueif 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 replacementGets the trash info for a list of documents.- Parameters:
docs- the documentsprincipal- the current user (to check locks)checkProxies-trueto count proxies as non-deletablecheckDeleted-trueif 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, useTrashService.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 documentpaths- the paths- Returns:
- the closer document above doc and above all the paths
-
undeleteDocuments
@Deprecated Set<DocumentRef> undeleteDocuments(List<DocumentModel> docs)
Deprecated.since 10.1 useTrashService.untrashDocuments(List)insteadUndeletes 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)
-
-