public class DocumentRoutingTreePersister extends Object implements DocumentRoutingPersister
DocumentRoute in a tree hierarchy ressembling the current date. New
model created from instance are stored in the personal workspace of the user.| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log |
DocumentRouteInstanceRootName| Constructor and Description |
|---|
DocumentRoutingTreePersister() |
| Modifier and Type | Method and Description |
|---|---|
DocumentModel |
createDocumentRouteInstanceFromDocumentRouteModel(DocumentModel model,
CoreSession session)
Creates a blank
DocumentRoute instance from a model. |
protected DocumentModel |
createDocumentRoutesStructure(String routeStructureDocType,
String id,
CoreSession session)
Finds the first domain by name, and creates under it the root container for the structure containing the route
instances.
|
protected DocumentModel |
createModelsRoutesStructure(String routeStructureDocType,
String id,
CoreSession session)
Create the rootModels under to root document.
|
protected List<ACE> |
getACEs() |
protected DocumentModel |
getDocumentRoutesStructure(String type,
CoreSession session) |
String |
getNewModelName(DocumentModel instance)
Return the new name of a model when it is created from an instance.
|
DocumentModel |
getOrCreateRootOfDocumentRouteInstanceStructure(CoreSession session)
Will get, and create if it does not exists the root document in which
DocumentRoute structure will be
created. |
DocumentModel |
getParentFolderForDocumentRouteInstance(DocumentModel document,
CoreSession session)
Get or create the parent folder for a
DocumentRoute route instance. |
DocumentModel |
getParentFolderForDocumentRouteModels(CoreSession session)
Gets or creates the parent folder for a
DocumentRoute route instance. |
DocumentModel |
getParentFolderForNewModel(CoreSession session,
DocumentModel instance)
Returns a folder in which new model, created from an instance of route will be stored.
|
protected UserManager |
getUserManager() |
DocumentModel |
saveDocumentRouteInstanceAsNewModel(DocumentModel routeInstance,
DocumentModel parentFolder,
String newName,
CoreSession session) |
protected DocumentModel |
undoReadOnlySecurityPolicy(DocumentModel instance,
CoreSession session) |
protected static final org.apache.commons.logging.Log log
public DocumentRoutingTreePersister()
public DocumentModel getParentFolderForDocumentRouteInstance(DocumentModel document, CoreSession session)
DocumentRoutingPersisterDocumentRoute route instance.getParentFolderForDocumentRouteInstance in interface DocumentRoutingPersisterdocument - The DocumentRoute model from which the instance will be created. Its metadata may be used
when creating the parent.DocumentRoute will be persisted.public DocumentModel createDocumentRouteInstanceFromDocumentRouteModel(DocumentModel model, CoreSession session)
DocumentRoutingPersisterDocumentRoute instance from a model.createDocumentRouteInstanceFromDocumentRouteModel in interface DocumentRoutingPersistermodel - the modelDocumentRoutepublic DocumentModel saveDocumentRouteInstanceAsNewModel(DocumentModel routeInstance, DocumentModel parentFolder, String newName, CoreSession session)
saveDocumentRouteInstanceAsNewModel in interface DocumentRoutingPersisterpublic DocumentModel getOrCreateRootOfDocumentRouteInstanceStructure(CoreSession session)
DocumentRoutingPersisterDocumentRoute structure will be
created.getOrCreateRootOfDocumentRouteInstanceStructure in interface DocumentRoutingPersistersession - The session use to get or create the document.DocumentRoute structure.protected DocumentModel createDocumentRoutesStructure(String routeStructureDocType, String id, CoreSession session)
protected DocumentModel createModelsRoutesStructure(String routeStructureDocType, String id, CoreSession session)
routeStructureDocType - id - session - protected UserManager getUserManager()
protected DocumentModel getDocumentRoutesStructure(String type, CoreSession session)
public DocumentModel getParentFolderForNewModel(CoreSession session, DocumentModel instance)
DocumentRoutingPersistergetParentFolderForNewModel in interface DocumentRoutingPersistersession - the session of the userinstance - the instance that will be persisted as new model.public String getNewModelName(DocumentModel instance)
DocumentRoutingPersistergetNewModelName in interface DocumentRoutingPersisterDocumentRoutingService#saveRouteAsNewModel(DocumentRoute, String, CoreSession)protected DocumentModel undoReadOnlySecurityPolicy(DocumentModel instance, CoreSession session)
public DocumentModel getParentFolderForDocumentRouteModels(CoreSession session)
DocumentRoutingPersisterDocumentRoute route instance.getParentFolderForDocumentRouteModels in interface DocumentRoutingPersisterDocumentRoute will be persisted.Copyright © 2016 Nuxeo SA. All rights reserved.