public class DocumentRoutingServiceImpl extends DefaultComponent implements DocumentRoutingService
Modifier and Type | Field and Description |
---|---|
static String |
ACTOR_ACE_CREATOR |
static String |
CHAINS_TO_TYPE_XP |
protected DocumentRoutingPersister |
persister |
static String |
PERSISTER_XP |
protected RepositoryInitializationHandler |
repositoryInitializationHandler |
static String |
ROUTE_MODELS_IMPORTER_XP |
protected RouteTemplateResourceRegistry |
routeResourcesRegistry |
protected Map<String,String> |
typeToChain |
protected Map<String,String> |
undoChainIdFromDone |
protected Map<String,String> |
undoChainIdFromRunning |
lastModified
Constructor and Description |
---|
DocumentRoutingServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
addRouteElementToRoute(DocumentRef parentDocumentRef,
int idx,
DocumentRouteElement routeElement,
CoreSession session)
Deprecated.
|
void |
addRouteElementToRoute(DocumentRef parentDocumentRef,
String sourceName,
DocumentRouteElement routeElement,
CoreSession session)
Deprecated.
|
void |
cancelTask(CoreSession session,
String taskId)
Cancels an open task.
|
boolean |
canUserValidateRoute(NuxeoPrincipal currentUser)
if the user can validate a route.
|
boolean |
canValidateRoute(DocumentModel documentRoute,
CoreSession coreSession)
Checks if the principal that created the client session can validate the route
|
void |
cleanupDoneAndCanceledRouteInstances(String reprositoryName,
int limit)
Query for the routes 'done' or 'canceled' and delete them.
|
void |
completeTask(String routeId,
String taskId,
Map<String,Object> data,
String status,
CoreSession session)
Completes a task on a give node.
|
protected void |
completeTask(String routeId,
String nodeId,
Task task,
Map<String,Object> data,
String status,
CoreSession session) |
DocumentRoute |
createNewInstance(DocumentRoute model,
List<String> documentIds,
CoreSession session)
Deprecated.
|
DocumentRoute |
createNewInstance(DocumentRoute model,
List<String> docIds,
CoreSession session,
boolean startInstance)
Create a new
DocumentRoute instance from this DocumentRoute model. |
DocumentRoute |
createNewInstance(DocumentRoute model,
String documentId,
CoreSession session)
Deprecated.
|
DocumentRoute |
createNewInstance(DocumentRoute model,
String documentId,
CoreSession session,
boolean startInstance)
Deprecated.
|
String |
createNewInstance(String routeModelId,
List<String> docIds,
CoreSession session,
boolean startInstance)
Creates a new route instance and optionally starts it.
|
String |
createNewInstance(String routeModelId,
List<String> docIds,
Map<String,Serializable> map,
CoreSession session,
boolean startInstance)
Creates a new route instance and optionally starts it.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
void |
delegateTask(CoreSession session,
String taskId,
List<String> delegatedActors,
String comment)
Reassigns the given task to the list of actors.
|
int |
doCleanupDoneAndCanceledRouteInstances(String reprositoryName,
int limit)
Query for the routes 'done' or 'canceled' and delete them.
|
void |
endTask(CoreSession session,
Task task,
Map<String,Object> data,
String status)
Ends a task.
|
void |
finishTask(CoreSession session,
DocumentRoute route,
Task task,
boolean delete)
Finishes an open task.
|
protected static void |
fireEvent(String eventName,
Map<String,Serializable> eventProperties,
DocumentRoute route,
CoreSession session) |
protected void |
fireEventAfterWorkflowStarted(DocumentRoute route,
CoreSession session) |
List<DocumentRoute> |
getAvailableDocumentRoute(CoreSession session)
Return the list of available
DocumentRoute document route. |
List<DocumentRoute> |
getAvailableDocumentRouteModel(CoreSession session)
Return the list of available
DocumentRoute model the user can start. |
protected static String |
getDelegationACLName(String taskId) |
protected static String |
getDelegationACLName(Task task) |
List<DocumentRoute> |
getDocumentRelatedWorkflows(DocumentModel document,
CoreSession session) |
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. |
protected FileManager |
getFileManager() |
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)
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
protected List<DocumentRouteTableElement> |
getRouteElements(DocumentRouteElement routeElementDocument,
CoreSession session,
List<DocumentRouteTableElement> routeElements,
int depth)
Deprecated.
|
String |
getRouteModelDocIdWithId(CoreSession session,
String id)
Returns the doc id of the route model with the given id
|
List<URL> |
getRouteModelTemplateResources()
Returns all the route models resource templates.
|
DocumentRoute |
getRouteModelWithId(CoreSession session,
String id)
Returns the route model with the given id
|
protected static String |
getRoutingACLName(String taskId) |
protected static String |
getRoutingACLName(Task task)
Finds an ACL name specific to the task (there may be several tasks applying permissions to the same document).
|
List<DocumentRoute> |
getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session) |
List<DocumentRoute> |
getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session,
String worflowModelName) |
List<Task> |
getTasks(DocumentModel document,
String actorId,
String workflowInstanceId,
String worflowModelName,
CoreSession session) |
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.
|
protected URL |
getUrlFromPath(RouteModelResourceType res,
RuntimeContext extensionContext) |
List<DocumentModel> |
getWorkflowInputDocuments(CoreSession session,
Task task)
Gets the documents following the workflow to which the given task belongs
|
void |
grantPermissionToTaskAssignees(CoreSession session,
String permission,
List<DocumentModel> docs,
Task task)
Grants on these documents the specified assignees permissions for this task.
|
void |
grantPermissionToTaskDelegatedActors(CoreSession session,
String permission,
List<DocumentModel> docs,
Task task)
Grants on these documents the specified assignees permissions for this task to the tasks delegated actors.
|
void |
importAllRouteModels(CoreSession session)
Imports all the route models resource templates.
|
DocumentRoute |
importRouteModel(URL modelToImport,
boolean overwrite,
CoreSession session)
Creates a route model in the root models folder defined by the current persister.
|
void |
invalidateRouteModelsCache() |
boolean |
isLockedByCurrentUser(DocumentRoute routeModel,
CoreSession session)
Verify is this
DocumentRoute is already locked by the current user. |
boolean |
isRoutable(DocumentModel doc)
Checks if the given document can be associated to a DocumentRoute.
|
boolean |
isWorkflowModel(DocumentRoute documentRoute)
Returns true id the document route is a model, false if it is just an instance i.e.
|
void |
lockDocumentRoute(DocumentRoute routeModel,
CoreSession session)
Locks this
DocumentRoute if not already locked by the current user. |
void |
makeRoutingTasks(CoreSession coreSession,
List<Task> tasks)
Deprecated.
|
protected void |
processElementsInFolder(DocumentModel doc,
List<DocumentRouteTableElement> elements,
RouteTable table,
CoreSession session,
int depth,
RouteFolderElement folder)
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
void |
reassignTask(CoreSession session,
String taskId,
List<String> actors,
String comment)
Reassigns the given task to the list of actors.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
registerRouteResource(RouteModelResourceType res,
RuntimeContext context)
Registers a new route model template to be imported at application startup.
|
void |
removePermissionFromTaskAssignees(CoreSession session,
List<DocumentModel> docs,
Task task)
Removes on these documents the specified assignees permissions for this task.
|
void |
removePermissionsForTaskActors(CoreSession session,
List<DocumentModel> docs,
String taskId)
Removes on these documents the specified assignees permissions for the task actors and also tasks delegated
actors if this task was delegated
|
void |
removePermissionsForTaskActors(CoreSession session,
List<DocumentModel> docs,
Task task)
Removes on these documents the specified assignees permissions for the task actors and also tasks delegated
actors if this task was delegated
|
void |
removeRouteElement(DocumentRouteElement routeElement,
CoreSession session)
Remove the given route element
|
void |
resumeInstance(String routeId,
String nodeId,
Map<String,Object> data,
String status,
CoreSession session)
Resumes a route instance on a give node.
|
DocumentRoute |
saveRouteAsNewModel(DocumentRoute instance,
CoreSession session)
Save a route instance as a new model of route.
|
List<DocumentModel> |
searchRouteModels(CoreSession session,
String searchString)
Returns the route models matching the
searchString . |
protected void |
setAclForActors(CoreSession session,
String aclName,
String permission,
List<DocumentModel> docs,
List<String> actors) |
void |
startInstance(String routeInstanceId,
List<String> docIds,
Map<String,Serializable> map,
CoreSession session)
Starts an instance that was created with
DocumentRoutingService.createNewInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession, boolean) but with startInstance = false . |
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 |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
updateRouteElement(DocumentRouteElement routeElement,
CoreSession session)
Update the given route element
|
protected void |
updateTaskInfo(CoreSession session,
GraphRoute graph,
Task task,
String status) |
DocumentRoute |
validateRouteModel(DocumentRoute routeModel,
CoreSession userSession)
Validates the given
DocumentRoute model by changing its lifecycle state and setting it and all its
children in ReadOnly. |
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension
public static final String CHAINS_TO_TYPE_XP
public static final String PERSISTER_XP
public static final String ACTOR_ACE_CREATOR
public static final String ROUTE_MODELS_IMPORTER_XP
protected Map<String,String> typeToChain
protected Map<String,String> undoChainIdFromRunning
protected Map<String,String> undoChainIdFromDone
protected DocumentRoutingPersister persister
protected RouteTemplateResourceRegistry routeResourcesRegistry
protected RepositoryInitializationHandler repositoryInitializationHandler
public DocumentRoutingServiceImpl()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
protected static void fireEvent(String eventName, Map<String,Serializable> eventProperties, DocumentRoute route, CoreSession session)
public String createNewInstance(String routeModelId, List<String> docIds, Map<String,Serializable> map, CoreSession session, boolean startInstance)
DocumentRoutingService
If startInstance = false
, then the route can be started later by calling DocumentRoutingService.startInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession)
.
createNewInstance
in interface DocumentRoutingService
routeModelId
- the route model iddocIds
- the list of document bound to the instancemap
- the values to pass as initial workflow variablessession
- the sessionstartInstance
- if the route is automatically startedpublic String createNewInstance(String routeModelId, List<String> docIds, CoreSession session, boolean startInstance)
DocumentRoutingService
If startInstance = false
, then the route can be started later by calling DocumentRoutingService.startInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession)
.
createNewInstance
in interface DocumentRoutingService
routeModelId
- the route model iddocIds
- The list of document bound to the instance.session
- the sessionstartInstance
- if the route is automatically startedpublic DocumentRoute createNewInstance(DocumentRoute model, List<String> docIds, CoreSession session, boolean startInstance)
DocumentRoutingService
DocumentRoute
instance from this DocumentRoute
model.createNewInstance
in interface DocumentRoutingService
model
- The model used to create the instance.docIds
- The list of document bound to the instance.startInstance
- if the DocumentRoute
is automatically started.DocumentRoute
instance.@Deprecated public DocumentRoute createNewInstance(DocumentRoute model, String documentId, CoreSession session, boolean startInstance)
createNewInstance
in interface DocumentRoutingService
@Deprecated public DocumentRoute createNewInstance(DocumentRoute model, List<String> documentIds, CoreSession session)
createNewInstance
in interface DocumentRoutingService
@Deprecated public DocumentRoute createNewInstance(DocumentRoute model, String documentId, CoreSession session)
createNewInstance
in interface DocumentRoutingService
public void startInstance(String routeInstanceId, List<String> docIds, Map<String,Serializable> map, CoreSession session)
DocumentRoutingService
DocumentRoutingService.createNewInstance(java.lang.String, java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.io.Serializable>, org.nuxeo.ecm.core.api.CoreSession, boolean)
but with startInstance = false
.startInstance
in interface DocumentRoutingService
routeInstanceId
- the route instance iddocIds
- the list of document bound to the instancemap
- the values to pass as initial workflow variablessession
- the sessionprotected void fireEventAfterWorkflowStarted(DocumentRoute route, CoreSession session)
public void resumeInstance(String routeId, String nodeId, Map<String,Object> data, String status, CoreSession session)
DocumentRoutingService
resumeInstance
in interface DocumentRoutingService
routeId
- the id of the route instancenodeId
- the node id to resume ondata
- the data coming from UI formstatus
- the status coming from UI formsession
- the sessionpublic void completeTask(String routeId, String taskId, Map<String,Object> data, String status, CoreSession session)
DocumentRoutingService
completeTask
in interface DocumentRoutingService
routeId
- the id of the route instancetaskId
- the id of the taskdata
- the data coming from UI formstatus
- the status coming from UI formsession
- the sessionprotected void completeTask(String routeId, String nodeId, Task task, Map<String,Object> data, String status, CoreSession session)
public List<DocumentRoute> getAvailableDocumentRouteModel(CoreSession session)
DocumentRoutingService
DocumentRoute
model the user can start.getAvailableDocumentRouteModel
in interface DocumentRoutingService
session
- The session of the user.DocumentRoute
public List<DocumentRoute> getAvailableDocumentRoute(CoreSession session)
DocumentRoutingService
DocumentRoute
document route.getAvailableDocumentRoute
in interface DocumentRoutingService
session
- The session of the user.DocumentRoute
public String getOperationChainId(String documentType)
DocumentRoutingService
chainsToType
extension point to contribute new mapping.getOperationChainId
in interface DocumentRoutingService
documentType
- The document typepublic String getUndoFromRunningOperationChainId(String documentType)
DocumentRoutingService
chainsToType
extension point to contribute new mapping.getUndoFromRunningOperationChainId
in interface DocumentRoutingService
public String getUndoFromDoneOperationChainId(String documentType)
DocumentRoutingService
chainsToType
extension point to contribute new mapping.getUndoFromDoneOperationChainId
in interface DocumentRoutingService
public DocumentRoute unlockDocumentRouteUnrestrictedSession(DocumentRoute routeModel, CoreSession userSession)
DocumentRoutingService
DocumentRoute
model under unrestricted session.unlockDocumentRouteUnrestrictedSession
in interface DocumentRoutingService
public DocumentRoute validateRouteModel(DocumentRoute routeModel, CoreSession userSession) throws DocumentRouteNotLockedException
DocumentRoutingService
DocumentRoute
model by changing its lifecycle state and setting it and all its
children in ReadOnly.validateRouteModel
in interface DocumentRoutingService
DocumentRouteNotLockedException
@Deprecated public List<DocumentRouteTableElement> getRouteElements(DocumentRoute route, CoreSession session)
DocumentRoutingService
DocumentRouteTableElement
for this DocumentRoute
.getRouteElements
in interface DocumentRoutingService
session
- The session used to query the DocumentRoute
.@Deprecated protected void processElementsInFolder(DocumentModel doc, List<DocumentRouteTableElement> elements, RouteTable table, CoreSession session, int depth, RouteFolderElement folder)
@Deprecated protected List<DocumentRouteTableElement> getRouteElements(DocumentRouteElement routeElementDocument, CoreSession session, List<DocumentRouteTableElement> routeElements, int depth)
public List<DocumentRoute> getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId)
getDocumentRoutesForAttachedDocument
in interface DocumentRoutingService
for route running or ready.
public List<DocumentRoute> getDocumentRoutesForAttachedDocument(CoreSession session, String attachedDocId, List<DocumentRouteElement.ElementLifeCycleState> states)
DocumentRoutingService
DocumentRoute
in a state for a given attached document.getDocumentRoutesForAttachedDocument
in interface DocumentRoutingService
session
- The session used to query the DocumentRoute
.states
- the list of states.DocumentRoute
public boolean canUserValidateRoute(NuxeoPrincipal currentUser)
DocumentRoutingService
canUserValidateRoute
in interface DocumentRoutingService
public boolean canValidateRoute(DocumentModel documentRoute, CoreSession coreSession)
DocumentRoutingService
canValidateRoute
in interface DocumentRoutingService
@Deprecated public void addRouteElementToRoute(DocumentRef parentDocumentRef, int idx, DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException
DocumentRoutingService
addRouteElementToRoute
in interface DocumentRoutingService
parentDocumentRef
- The DocumentRef of the parent document.idx
- The position of the document in its container.routeElement
- The document to add.DocumentRouteNotLockedException
@Deprecated public void addRouteElementToRoute(DocumentRef parentDocumentRef, String sourceName, DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException
DocumentRoutingService
addRouteElementToRoute
in interface DocumentRoutingService
parentDocumentRef
- The DocumentRef of the parent document.sourceName
- the name of the previous document in the container.routeElement
- the document to add.DocumentRouteNotLockedException
public void removeRouteElement(DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException
DocumentRoutingService
removeRouteElement
in interface DocumentRoutingService
DocumentRouteNotLockedException
public DocumentModelList getOrderedRouteElement(String routeElementId, CoreSession session)
DocumentRoutingService
getOrderedRouteElement
in interface DocumentRoutingService
public void lockDocumentRoute(DocumentRoute routeModel, CoreSession session) throws DocumentRouteAlredayLockedException
DocumentRoutingService
DocumentRoute
if not already locked by the current user. If the document is already locked by
another user and DocumentRouteAlredayLockedException
is thrownlockDocumentRoute
in interface DocumentRoutingService
session
- The session used to lock the DocumentRoute
.DocumentRouteAlredayLockedException
public void unlockDocumentRoute(DocumentRoute routeModel, CoreSession session) throws DocumentRouteNotLockedException
DocumentRoutingService
DocumentRoute
.If the document is not locked throws a DocumentRouteNotLockedException
unlockDocumentRoute
in interface DocumentRoutingService
session
- The session used to lock the DocumentRoute
.DocumentRouteNotLockedException
public boolean isLockedByCurrentUser(DocumentRoute routeModel, CoreSession session)
DocumentRoutingService
DocumentRoute
is already locked by the current user.isLockedByCurrentUser
in interface DocumentRoutingService
public void updateRouteElement(DocumentRouteElement routeElement, CoreSession session) throws DocumentRouteNotLockedException
DocumentRoutingService
updateRouteElement
in interface DocumentRoutingService
DocumentRouteNotLockedException
public DocumentRoute saveRouteAsNewModel(DocumentRoute instance, CoreSession session)
DocumentRoutingService
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.saveRouteAsNewModel
in interface DocumentRoutingService
instance
- the instance from which we create a new model.public boolean isRoutable(DocumentModel doc)
DocumentRoutingService
isRoutable
in interface DocumentRoutingService
doc
- the documenttrue
if the document can be routedpublic void importAllRouteModels(CoreSession session)
DocumentRoutingService
importAllRouteModels
in interface DocumentRoutingService
session
- the core session to usepublic DocumentRoute importRouteModel(URL modelToImport, boolean overwrite, CoreSession session)
DocumentRoutingService
importRouteModel
in interface DocumentRoutingService
protected FileManager getFileManager()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic List<URL> getRouteModelTemplateResources()
DocumentRoutingService
routeModelImporter
extension point to
contribute new resources.getRouteModelTemplateResources
in interface DocumentRoutingService
public List<DocumentModel> searchRouteModels(CoreSession session, String searchString)
DocumentRoutingService
searchString
.searchRouteModels
in interface DocumentRoutingService
public void registerRouteResource(RouteModelResourceType res, RuntimeContext context)
DocumentRoutingService
registerRouteResource
in interface DocumentRoutingService
res
- the resourceprotected URL getUrlFromPath(RouteModelResourceType res, RuntimeContext extensionContext)
public DocumentRoute getRouteModelWithId(CoreSession session, String id)
DocumentRoutingService
getRouteModelWithId
in interface DocumentRoutingService
public String getRouteModelDocIdWithId(CoreSession session, String id)
DocumentRoutingService
getRouteModelDocIdWithId
in interface DocumentRoutingService
@Deprecated public void makeRoutingTasks(CoreSession coreSession, List<Task> tasks)
DocumentRoutingService
This allows the related documents to be adapted to RoutingTask
.
makeRoutingTasks
in interface DocumentRoutingService
coreSession
- the sessiontasks
- the taskspublic void endTask(CoreSession session, Task task, Map<String,Object> data, String status)
DocumentRoutingService
endTask
in interface DocumentRoutingService
status
- name of the button clicked to submit the task formpublic List<DocumentModel> getWorkflowInputDocuments(CoreSession session, Task task)
DocumentRoutingService
getWorkflowInputDocuments
in interface DocumentRoutingService
public void grantPermissionToTaskAssignees(CoreSession session, String permission, List<DocumentModel> docs, Task task)
DocumentRoutingService
grantPermissionToTaskAssignees
in interface DocumentRoutingService
session
- the sessionpermission
- the permissiondocs
- the documentstask
- the taskpublic void grantPermissionToTaskDelegatedActors(CoreSession session, String permission, List<DocumentModel> docs, Task task)
DocumentRoutingService
grantPermissionToTaskDelegatedActors
in interface DocumentRoutingService
session
- the sessionpermission
- the permissiondocs
- the documentstask
- the taskpublic void removePermissionFromTaskAssignees(CoreSession session, List<DocumentModel> docs, Task task)
DocumentRoutingService
removePermissionFromTaskAssignees
in interface DocumentRoutingService
session
- the sessiondocs
- the documentstask
- the taskpublic void removePermissionsForTaskActors(CoreSession session, List<DocumentModel> docs, String taskId)
DocumentRoutingService
removePermissionsForTaskActors
in interface DocumentRoutingService
session
- the sessiondocs
- the documentstaskId
- the taskIdpublic void removePermissionsForTaskActors(CoreSession session, List<DocumentModel> docs, Task task)
DocumentRoutingService
removePermissionsForTaskActors
in interface DocumentRoutingService
session
- the sessiondocs
- the documentstask
- the taskprotected static String getRoutingACLName(Task task)
protected static String getRoutingACLName(String taskId)
protected static String getDelegationACLName(Task task)
protected static String getDelegationACLName(String taskId)
public void finishTask(CoreSession session, DocumentRoute route, Task task, boolean delete) throws DocumentRouteException
DocumentRoutingService
completeTask
method. Not executed using an unrestricted
session.finishTask
in interface DocumentRoutingService
DocumentRouteException
public void cancelTask(CoreSession session, String taskId) throws DocumentRouteException
DocumentRoutingService
completeTask
method.cancelTask
in interface DocumentRoutingService
DocumentRouteException
protected void updateTaskInfo(CoreSession session, GraphRoute graph, Task task, String status)
public void reassignTask(CoreSession session, String taskId, List<String> actors, String comment) throws DocumentRouteException
DocumentRoutingService
reassignTask
in interface DocumentRoutingService
DocumentRouteException
public void delegateTask(CoreSession session, String taskId, List<String> delegatedActors, String comment) throws DocumentRouteException
DocumentRoutingService
delegateTask
in interface DocumentRoutingService
DocumentRouteException
protected void setAclForActors(CoreSession session, String aclName, String permission, List<DocumentModel> docs, List<String> actors)
public void cleanupDoneAndCanceledRouteInstances(String reprositoryName, int limit)
DocumentRoutingService
cleanupDoneAndCanceledRouteInstances
in interface DocumentRoutingService
public int doCleanupDoneAndCanceledRouteInstances(String reprositoryName, int limit)
DocumentRoutingService
doCleanupDoneAndCanceledRouteInstances
in interface DocumentRoutingService
public void invalidateRouteModelsCache()
invalidateRouteModelsCache
in interface DocumentRoutingService
public List<Task> getTasks(DocumentModel document, String actorId, String workflowInstanceId, String worflowModelName, CoreSession session)
getTasks
in interface DocumentRoutingService
public List<DocumentRoute> getDocumentRelatedWorkflows(DocumentModel document, CoreSession session)
getDocumentRelatedWorkflows
in interface DocumentRoutingService
public List<DocumentRoute> getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session)
getRunningWorkflowInstancesLaunchedByCurrentUser
in interface DocumentRoutingService
public List<DocumentRoute> getRunningWorkflowInstancesLaunchedByCurrentUser(CoreSession session, String worflowModelName)
getRunningWorkflowInstancesLaunchedByCurrentUser
in interface DocumentRoutingService
public boolean isWorkflowModel(DocumentRoute documentRoute)
isWorkflowModel
in interface DocumentRoutingService
Copyright © 2015 Nuxeo SA. All rights reserved.