Package org.nuxeo.ecm.core.trash
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
ATrashService
implementation relying onecm:isTrashed
.- Since:
- 10.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.trash.AbstractTrashService
AbstractTrashService.PathComparator
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.api.trash.TrashService
TrashService.Feature
-
-
Field Summary
Fields Modifier and Type Field Description static String
SYSPROP_IS_TRASHED
-
Fields inherited from class org.nuxeo.ecm.core.trash.AbstractTrashService
COLLISION_PATTERN, PATH_SEPARATOR, TRASHED_PATTERN, TRASHED_QUERY
-
Fields inherited from interface org.nuxeo.ecm.core.api.trash.TrashService
DISABLE_TRASH_RENAMING, DOCUMENT_TRASHED, DOCUMENT_UNTRASHED
-
-
Constructor Summary
Constructors Constructor Description PropertyTrashService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doTrashDocument(DocumentModel doc)
protected Set<DocumentRef>
doUntrashDocument(DocumentModel doc, boolean processChildren)
boolean
hasFeature(TrashService.Feature feature)
Checks if a feature is available.boolean
isTrashed(CoreSession session, DocumentRef docRef)
protected void
trashDescendants(DocumentModel model, Boolean value)
void
trashDocuments(List<DocumentModel> docs)
Moves documents to the trash.Set<DocumentRef>
undeleteDocuments(List<DocumentModel> docs)
Undeletes documents (and ancestors if needed to make them visible).-
Methods inherited from class org.nuxeo.ecm.core.trash.AbstractTrashService
canDelete, canPurgeOrUntrash, checkDeletePermOnParents, folderAllowsDelete, getAboveDocument, getAboveDocument, getDocumentLocker, getDocuments, getFirstGroup, getInfo, getTrashInfo, isMangledName, mangleName, notifyEvent, notifyEvent, purgeDocuments, purgeDocumentsUnder, underOneOf, unmangleName, unmangleName, untrashDocuments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.api.trash.TrashService
canPurgeOrUntrash, trashDocument, untrashDocument
-
Methods inherited from interface org.nuxeo.ecm.core.trash.TrashService
canPurgeOrUndelete
-
-
-
-
Field Detail
-
SYSPROP_IS_TRASHED
public static final String SYSPROP_IS_TRASHED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PropertyTrashService
public PropertyTrashService()
-
-
Method Detail
-
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.
-
-