Interface DocumentRoutingPersister
- All Known Implementing Classes:
DocumentRoutingTreePersister
public interface DocumentRoutingPersister
The DocumentRoutingPersister is responsible creating a folder structure to persist
DocumentRoute instance,
persisting new DocumentRoute instances and creating DocumentRoute model from DocumentRoute
instance.- Author:
- arussel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the document in which will be create -
Method Summary
Modifier and TypeMethodDescriptionCreates a blankDocumentRouteinstance from a model.getNewModelName(DocumentModel instance) Return the new name of a model when it is created from an instance.Will get, and create if it does not exists the root document in whichDocumentRoutestructure will be created.getParentFolderForDocumentRouteInstance(DocumentModel document, CoreSession session) Get or create the parent folder for aDocumentRouteroute instance.Gets or creates the parent folder for aDocumentRouteroute instance.getParentFolderForNewModel(CoreSession session, DocumentModel instance) Returns a folder in which new model, created from an instance of route will be stored.saveDocumentRouteInstanceAsNewModel(DocumentModel routeInstance, DocumentModel parentFolder, String newName, CoreSession session)
-
Field Details
-
DocumentRouteInstanceRootName
The name of the document in which will be create- See Also:
-
-
Method Details
-
getParentFolderForDocumentRouteInstance
Get or create the parent folder for aDocumentRouteroute instance.- Parameters:
document- TheDocumentRoutemodel from which the instance will be created. Its metadata may be used when creating the parent.- Returns:
- The parent folder in which the
DocumentRoutewill be persisted.
-
createDocumentRouteInstanceFromDocumentRouteModel
DocumentModel createDocumentRouteInstanceFromDocumentRouteModel(DocumentModel model, CoreSession session) Creates a blankDocumentRouteinstance from a model.- Parameters:
model- the model- Returns:
- The created
DocumentRoute
-
saveDocumentRouteInstanceAsNewModel
DocumentModel saveDocumentRouteInstanceAsNewModel(DocumentModel routeInstance, DocumentModel parentFolder, String newName, CoreSession session) -
getOrCreateRootOfDocumentRouteInstanceStructure
Will get, and create if it does not exists the root document in whichDocumentRoutestructure will be created.- Parameters:
session- The session use to get or create the document.- Returns:
- The root of the
DocumentRoutestructure.
-
getParentFolderForNewModel
Returns a folder in which new model, created from an instance of route will be stored.- Parameters:
session- the session of the userinstance- the instance that will be persisted as new model.
-
getNewModelName
Return the new name of a model when it is created from an instance.- Returns:
- the new name
- See Also:
-
getParentFolderForDocumentRouteModels
Gets or creates the parent folder for aDocumentRouteroute instance.- Returns:
- The parent folder in which the
DocumentRoutewill be persisted. - Since:
- 5.6
-