public interface DocumentRoutingService
DocumentRoute
.Modifier and Type | Method and Description |
---|---|
void |
addRouteElementToRoute(DocumentRef parentDocumentRef,
int idx,
DocumentRouteElement routeElement,
CoreSession session)
Add a route element in another route element.
|
void |
addRouteElementToRoute(DocumentRef parentDocumentRef,
String sourceName,
DocumentRouteElement routeElement,
CoreSession session)
Add a route element in another route element.
|
boolean |
canUserValidateRoute(NuxeoPrincipal currentUser)
Deprecated.
use
canValidateRoute(DocumentModel, CoreSession)
instead. |
boolean |
canValidateRoute(DocumentModel documentRoute,
CoreSession coreSession)
Checks if the principal that created the client session can validate the
route
|
DocumentRoute |
createNewInstance(DocumentRoute model,
List<String> documentIds,
CoreSession session) |
DocumentRoute |
createNewInstance(DocumentRoute model,
List<String> documentIds,
CoreSession session,
boolean startInstance)
Create a new
DocumentRoute instance from this
DocumentRoute model. |
DocumentRoute |
createNewInstance(DocumentRoute model,
String documentId,
CoreSession session) |
DocumentRoute |
createNewInstance(DocumentRoute model,
String documentId,
CoreSession session,
boolean startInstance) |
List<DocumentRoute> |
getAvailableDocumentRouteModel(CoreSession session)
Return the list of available
DocumentRoute model the user can
start. |
List<DocumentRoute> |
getDocumentRoutesForAttachedDocument(CoreSession session,
String attachedDocId) |
List<DocumentRoute> |
getDocumentRoutesForAttachedDocument(CoreSession session,
String attachedDocId,
List<DocumentRouteElement.ElementLifeCycleState> states)
Return the list of related
DocumentRoute in a state for a given
attached document. |
String |
getOperationChainId(String documentType)
Return the operation chain to run for a documentType.
|
DocumentModelList |
getOrderedRouteElement(String routeElementId,
CoreSession session)
Get the children of the given stepFolder ordered by the ecm:pos metadata.
|
List<DocumentRouteTableElement> |
getRouteElements(DocumentRoute route,
CoreSession session)
Computes the list of elements
DocumentRouteTableElement for this
DocumentRoute . |
String |
getUndoFromDoneOperationChainId(String documentType)
Return the operation chain to undo a step when the step is in done state.
|
String |
getUndoFromRunningOperationChainId(String documentType)
Return the operation chain to undo a step when the step is in running
state.
|
boolean |
isLockedByCurrentUser(DocumentRoute routeModel,
CoreSession session)
Verify is this
DocumentRoute is already locked by the current
user. |
void |
lockDocumentRoute(DocumentRoute routeModel,
CoreSession session)
Locks this
DocumentRoute if not already locked by the current
user. |
void |
removeRouteElement(DocumentRouteElement routeElement,
CoreSession session)
Remove the given route element
|
DocumentRoute |
saveRouteAsNewModel(DocumentRoute route,
CoreSession session)
Save a route instance as a new model of route.
|
void |
unlockDocumentRoute(DocumentRoute routeModel,
CoreSession session)
Unlocks this
DocumentRoute .If the document is not locked throws a
DocumentRouteNotLockedException |
DocumentRoute |
unlockDocumentRouteUnrestrictedSession(DocumentRoute routeModel,
CoreSession userSession)
Unlock the given
DocumentRoute model under unrestricted session. |
void |
updateRouteElement(DocumentRouteElement routeModel,
CoreSession session)
Update the given route element
|
DocumentRoute |
validateRouteModel(DocumentRoute routeModel,
CoreSession session)
Validates the given
DocumentRoute model by changing its lifecycle
state and setting it and all its children in ReadOnly. |
DocumentRoute createNewInstance(DocumentRoute model, List<String> documentIds, CoreSession session, boolean startInstance)
DocumentRoute
instance from this
DocumentRoute
model.model
- The model used to create the instance.documents
- The list of document bound to the instance.startInstance
- if the DocumentRoute
is automatically
started.DocumentRoute
instance.DocumentRoute createNewInstance(DocumentRoute model, String documentId, CoreSession session, boolean startInstance)
with
only one document attached.
DocumentRoute createNewInstance(DocumentRoute model, List<String> documentIds, CoreSession session)
with
startInstance true
DocumentRoute createNewInstance(DocumentRoute model, String documentId, CoreSession session)
DocumentRoute saveRouteAsNewModel(DocumentRoute route, CoreSession session)
DocumentRoutingPersister
. The route instance should be in either
running, done or ready state. The new route model will be in draft state
and won't have any attached documents.route
- the instance from which we create a new model.List<DocumentRoute> getAvailableDocumentRouteModel(CoreSession session)
DocumentRoute
model the user can
start.session
- The session of the user.DocumentRoute
String getOperationChainId(String documentType)
chainsToType
extension point to contribute new mapping.documentType
- The document typeString getUndoFromRunningOperationChainId(String documentType)
chainsToType
extension point to contribute new mapping.documentType
- String getUndoFromDoneOperationChainId(String documentType)
chainsToType
extension point to contribute new mapping.documentType
- DocumentRoute validateRouteModel(DocumentRoute routeModel, CoreSession session) throws DocumentRouteNotLockedException, ClientException
DocumentRoute
model by changing its lifecycle
state and setting it and all its children in ReadOnly.DocumentRouteNotLockedException
ClientException
DocumentRoute unlockDocumentRouteUnrestrictedSession(DocumentRoute routeModel, CoreSession userSession) throws ClientException
DocumentRoute
model under unrestricted session.routeModel
- userSession
- ClientException
List<DocumentRouteTableElement> getRouteElements(DocumentRoute route, CoreSession session)
DocumentRouteTableElement
for this
DocumentRoute
.routeDocument
- DocumentRoute
.session
- The session used to query the DocumentRoute
.A
- list of DocumentRouteElement
List<DocumentRoute> getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId, List<DocumentRouteElement.ElementLifeCycleState> states)
DocumentRoute
in a state for a given
attached document.session
- The session used to query the DocumentRoute
.states
- the list of states.DocumentRoute
List<DocumentRoute> getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId)
session
- attachedDocId
- for
route running or ready.
@Deprecated boolean canUserValidateRoute(NuxeoPrincipal currentUser)
canValidateRoute(DocumentModel, CoreSession)
instead.boolean canValidateRoute(DocumentModel documentRoute, CoreSession coreSession) throws ClientException
documentRoute
- coreSession
- ClientException
void addRouteElementToRoute(DocumentRef parentDocumentRef, int idx, DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException, ClientException
parentDocumentRef
- The DocumentRef of the parent document.idx
- The position of the document in its container.routeElement
- The document to add.session
- ClientException
DocumentRouteNotLockedException
void addRouteElementToRoute(DocumentRef parentDocumentRef, String sourceName, DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException, ClientException
parentDocumentRef
- The DocumentRef of the parent document.sourceName
- the name of the previous document in the container.routeElement
- the document to add.session
- ClientException
DocumentRouteNotLockedException
void removeRouteElement(DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException, ClientException
The
- route element document.session
- ClientException
DocumentRouteNotLockedException
DocumentModelList getOrderedRouteElement(String routeElementId, CoreSession session) throws ClientException
stepFolderId
- session
- ClientException
void lockDocumentRoute(DocumentRoute routeModel, CoreSession session) throws DocumentRouteAlredayLockedException, ClientException
DocumentRoute
if not already locked by the current
user. If the document is already locked by another user and
DocumentRouteAlredayLockedException
is thrownrouteDocument
- DocumentRoute
.session
- The session used to lock the DocumentRoute
.ClientException
{@link
- DocumentRouteAlredayLockedException}DocumentRouteAlredayLockedException
void unlockDocumentRoute(DocumentRoute routeModel, CoreSession session) throws DocumentRouteNotLockedException, ClientException
DocumentRoute
.If the document is not locked throws a
DocumentRouteNotLockedException
routeDocument
- DocumentRoute
.session
- The session used to lock the DocumentRoute
.{@link
- ClientException}DocumentRouteNotLockedException
ClientException
void updateRouteElement(DocumentRouteElement routeModel, CoreSession session) throws DocumentRouteNotLockedException, ClientException
The
- route element document.session
- ClientException
DocumentRouteNotLockedException
boolean isLockedByCurrentUser(DocumentRoute routeModel, CoreSession session) throws ClientException
DocumentRoute
is already locked by the current
user.routeDocument
- DocumentRoute
.session
- ClientException
Copyright © 2011 Nuxeo SA. All Rights Reserved.