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, useTrashService
instead.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 boolean
canDelete(List<DocumentModel> docs, NuxeoPrincipal principal, boolean checkProxies)
Deprecated.since 10.1 only used in JSF part, no replacementdefault boolean
canPurgeOrUndelete(List<DocumentModel> docs, NuxeoPrincipal principal)
Deprecated.since 10.1, useTrashService.canPurgeOrUntrash(List, NuxeoPrincipal)
boolean
checkDeletePermOnParents(List<DocumentModel> docs)
Deprecated.since 10.1 only used in JSF part, no replacementboolean
folderAllowsDelete(DocumentModel folder)
Deprecated.since 10.1 only used in JSF part, no replacementDocumentModel
getAboveDocument(DocumentModel doc, Set<Path> paths)
Deprecated.since 10.1 only used in JSF part, useTrashService.getAboveDocument(DocumentModel, NuxeoPrincipal)
instead.TrashInfo
getTrashInfo(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:
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 replacementIs 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 replacementIs at least one doc deletable?- Parameters:
docs
- the documentsprincipal
- 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)
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:
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 replacementGets the trash info for a list of documents.- Parameters:
docs
- the documentsprincipal
- the current user (to check locks)checkProxies
-true
to count proxies as non-deletablecheckDeleted
-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, 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)
-
-