Package org.nuxeo.ecm.core.trash
Class BridgeTrashService
- java.lang.Object
-
- org.nuxeo.ecm.core.trash.AbstractTrashService
-
- org.nuxeo.ecm.core.trash.BridgeTrashService
-
- All Implemented Interfaces:
TrashService
,TrashService
public class BridgeTrashService extends AbstractTrashService
Trash service delegating to two different backends, for use during migration.- Since:
- 10.2
-
-
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 protected TrashService
first
protected TrashService
second
-
Fields inherited from class org.nuxeo.ecm.core.trash.AbstractTrashService
COLLISION_PATTERN, LEGAL_HOLD_QUERY, PATH_SEPARATOR, RETENTION_QUERY, TRASHED_PATTERN, TRASHED_QUERY
-
Fields inherited from interface org.nuxeo.ecm.core.api.trash.TrashService
ABOUT_TO_TRASH, ABOUT_TO_UNTRASH, DISABLE_TRASH_RENAMING, DOCUMENT_TRASHED, DOCUMENT_UNTRASHED
-
-
Constructor Summary
Constructors Constructor Description BridgeTrashService(TrashService first, TrashService second)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasFeature(TrashService.Feature feature)
Checks if a feature is available.boolean
isTrashed(CoreSession session, DocumentRef doc)
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, checkCanTrash, checkDeletePermOnParents, folderAllowsDelete, getAboveDocument, getAboveDocument, getDocumentLocker, getDocuments, getFirstGroup, getInfo, getTrashInfo, isMangledName, mangleName, notifyEvent, 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
-
first
protected final TrashService first
-
second
protected final TrashService second
-
-
Constructor Detail
-
BridgeTrashService
public BridgeTrashService(TrashService first, TrashService second)
-
-
Method Detail
-
isTrashed
public boolean isTrashed(CoreSession session, DocumentRef doc)
- 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
-
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)
-
hasFeature
public boolean hasFeature(TrashService.Feature feature)
Description copied from interface:TrashService
Checks if a feature is available.
-
-