|
Nuxeo Enterprise Platform 5.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.core.trash.TrashServiceImpl
public class TrashServiceImpl
| Constructor Summary | |
|---|---|
TrashServiceImpl()
|
|
| Method Summary | |
|---|---|
boolean |
canDelete(java.util.List<DocumentModel> docs,
java.security.Principal principal,
boolean checkProxies)
Is at least one doc deletable? |
boolean |
canPurgeOrUndelete(java.util.List<DocumentModel> docs,
java.security.Principal principal)
Are all documents purgeable/undeletable? |
boolean |
canUndelete(java.util.List<DocumentModel> docs)
|
boolean |
checkDeletePermOnParents(java.util.List<DocumentModel> docs)
Is at least one doc deletable according to its container? |
boolean |
folderAllowsDelete(DocumentModel folder)
Can a child of the folder be deleted? |
DocumentModel |
getAboveDocument(DocumentModel doc,
java.util.Set<Path> rootPaths)
Gets the closest document's ancestor above all the paths. |
TrashInfo |
getTrashInfo(java.util.List<DocumentModel> docs,
java.security.Principal principal,
boolean checkProxies,
boolean checkDeleted)
Gets the trash info for a list of documents. |
void |
purgeDocuments(CoreSession session,
java.util.List<DocumentRef> docRefs)
Purges (completely deletes) documents . |
void |
trashDocuments(java.util.List<DocumentModel> docs)
Moves documents to the trash, or directly deletes them if their lifecycle does not allow trash use. |
java.util.Set<DocumentRef> |
undeleteDocuments(java.util.List<DocumentModel> docs)
Undeletes documents (and ancestors if needed to make them visible). |
| Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
|---|
activate, deactivate, getAdapter, registerContribution, registerExtension, unregisterContribution, unregisterExtension |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TrashServiceImpl()
| Method Detail |
|---|
public boolean folderAllowsDelete(DocumentModel folder)
throws ClientException
TrashService
folderAllowsDelete in interface TrashServicefolder - the folder
true if the folder allows its children to be deleted
ClientException
public boolean checkDeletePermOnParents(java.util.List<DocumentModel> docs)
throws ClientException
TrashService
checkDeletePermOnParents in interface TrashServicedocs - the documents
true if one doc is in a folder that allows its children
to be deleted
ClientException
public boolean canDelete(java.util.List<DocumentModel> docs,
java.security.Principal principal,
boolean checkProxies)
throws ClientException
TrashService
canDelete in interface TrashServicedocs - the documentsprincipal - the current user (to check locks)checkProxies - true to count proxies as non-deletable
true if at least one doc is deletable
ClientException
public boolean canPurgeOrUndelete(java.util.List<DocumentModel> docs,
java.security.Principal principal)
throws ClientException
TrashServiceDocuments need to be in the deleted lifecycle state for this to be true, in addition to the standard permission checks.
canPurgeOrUndelete in interface TrashServicedocs - the documentsprincipal - the current user (to check locks)
true if the documents are purgeable/undeletable
ClientException
public boolean canUndelete(java.util.List<DocumentModel> docs)
throws ClientException
ClientException
public TrashInfo getTrashInfo(java.util.List<DocumentModel> docs,
java.security.Principal principal,
boolean checkProxies,
boolean checkDeleted)
throws ClientException
TrashService
getTrashInfo in interface TrashServicedocs - the documentsprincipal - the current user (to check locks)checkProxies - true to count proxies as non-deletablecheckDeleted - true if documents have to be in the deleted
state to be considered (otherwise forbidden)
ClientException
public DocumentModel getAboveDocument(DocumentModel doc,
java.util.Set<Path> rootPaths)
throws ClientException
TrashServiceThis is used to find what safe document to redirect to when deleting some.
getAboveDocument in interface TrashServicedoc - the documentrootPaths - the paths
ClientException
public void trashDocuments(java.util.List<DocumentModel> docs)
throws ClientException
TrashService
trashDocuments in interface TrashServicedocs - the documents to trash
ClientException
public void purgeDocuments(CoreSession session,
java.util.List<DocumentRef> docRefs)
throws ClientException
TrashService
purgeDocuments in interface TrashServicesession - the sessiondocRefs - the documents to purge
ClientException
public java.util.Set<DocumentRef> undeleteDocuments(java.util.List<DocumentModel> docs)
throws ClientException
TrashServiceAlso fires async events to undelete the children.
undeleteDocuments in interface TrashServicedocs - the documents to undelete
ClientException
|
Nuxeo Enterprise Platform 5.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||