@Scope(value=CONVERSATION) @Name(value="routingActions") @Install(precedence=10) public class DocumentRoutingActionsBean extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected org.nuxeo.ecm.core.api.NuxeoPrincipal |
currentUser |
protected org.nuxeo.ecm.core.api.CoreSession |
documentManager |
protected DocumentsListsManager |
documentsListsManager |
protected String |
docWithAttachedRouteId |
protected EventManager |
eventManager |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected String |
hiddenDocOrder |
protected String |
hiddenSourceDocId |
protected LockActions |
lockActions |
protected NavigationContext |
navigationContext |
protected RelatedRouteActionBean |
relatedRouteAction |
protected String |
relatedRouteModelDocumentId |
protected List<org.nuxeo.ecm.core.api.DocumentModel> |
relatedRoutes |
protected ResourcesAccessor |
resourcesAccessor |
static String |
ROUTE_DOCUMENT_REF |
static String |
SOURCE_DOC_NAME |
protected String |
stepId |
protected org.nuxeo.ecm.platform.types.TypeManager |
typeManager |
protected TypesTool |
typesTool |
protected WebActions |
webActions |
| Constructor and Description |
|---|
DocumentRoutingActionsBean() |
| Modifier and Type | Method and Description |
|---|---|
String |
cancelRoute()
Cancels the first workflow found on the current document
|
boolean |
canLockRoute() |
boolean |
canUnlockRoute() |
protected List<DocumentRouteTableElement> |
computeRelatedRouteElements()
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
protected List<DocumentRouteTableElement> |
computeRouteElements()
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
String |
createRouteElement(String typeName)
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
boolean |
currentRouteModelIsDraft() |
String |
editStep() |
boolean |
getCanDuplicateRouteInstance() |
org.nuxeo.ecm.core.api.DocumentModel |
getChildWithPosition(org.nuxeo.ecm.core.api.DocumentModel docRouteElement,
String pos)
Deprecated.
|
List<Task> |
getCurrentRouteAllTasks() |
List<Task> |
getCurrentRouteCurrentUserTasks() |
Map<String,Serializable> |
getCurrentRouteLockDetails() |
String |
getCurrentWorkflowInitiator() |
javax.faces.convert.Converter |
getDocumentModelConverter() |
DocumentRoutingService |
getDocumentRoutingService() |
String |
getDocWithAttachedRouteId() |
protected List<DocumentRouteTableElement> |
getElements(DocumentRoute currentRoute)
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
List<org.nuxeo.ecm.core.api.DocumentModel> |
getFilteredRouteModels() |
String |
getHiddenDocOrder() |
String |
getHiddenSourceDocId() |
List<org.nuxeo.ecm.core.api.DocumentModel> |
getOrderedChildren(String docRouteElementId,
String type)
Deprecated.
|
String |
getPositionForChild(org.nuxeo.ecm.core.api.DocumentModel docRouteElement,
org.nuxeo.ecm.core.api.DocumentModel docChild)
Deprecated.
|
DocumentRoute |
getRelatedRoute()
Gets the first related route.
|
String |
getRelatedRouteModelDocumentId() |
List<DocumentRoute> |
getRelatedRoutes()
Gets the list of routes related to the current document, by querying the
routing service.
|
org.nuxeo.ecm.core.api.DocumentModel |
getRouteInstanceFor(Task task) |
org.nuxeo.ecm.core.api.DocumentModel |
getRouteModel(String routeId) |
String |
getTypeDescription(DocumentRouteTableElement localizable) |
String |
goBackToRoute() |
boolean |
hasRelatedRoute()
Check if the related route to this case is started (ready or running) or
no
|
boolean |
isCurrentRouteGraph()
since 5.7
|
boolean |
isCurrentRouteLocked() |
boolean |
isCurrentRouteLockedByCurrentUser() |
boolean |
isEditableRouteElement(org.nuxeo.ecm.core.api.DocumentModel stepDoc)
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
boolean |
isEditableStep(org.nuxeo.ecm.core.api.DocumentModel stepDoc)
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
boolean |
isEmptyFork(org.nuxeo.ecm.core.api.DocumentModel forkDoc) |
boolean |
isRoutable() |
boolean |
isRouteGraph(DocumentRoute route)
Checks if a given route is a Graph.
|
boolean |
isStep(org.nuxeo.ecm.core.api.DocumentModel doc) |
String |
lockCurrentRoute() |
protected String |
lockRoute(DocumentRoute docRouteElement) |
String |
moveRouteElement(String direction)
Deprecated.
since 5.9.2 - Use only routes of type 'graph'
|
protected void |
queryForRelatedRoutes() |
String |
removeStep()
Deprecated.
|
void |
resetCache() |
void |
resetRelatedRouteDocumentId() |
boolean |
routeRelatedToCurrentDocumentIsRunning()
returns true if the routeStarted on the current Document is editable (is
Ready )
|
void |
saveRouteAsNewInstance() |
String |
saveRouteElement() |
void |
saveSelectedRouteAsNewInstance() |
void |
setDocWithAttachedRouteId(String docWithAttachedRouteId) |
void |
setHiddenDocOrder(String hiddenDocOrder) |
void |
setHiddenSourceDocId(String hiddenSourceDocId) |
void |
setRelatedRouteModelDocumentId(String relatedRouteModelDocumentId) |
String |
startRoute() |
String |
startRouteRelatedToCurrentDocument() |
String |
unlockCurrentRoute() |
String |
updateRouteElement() |
String |
validateRouteModel() |
public static final String SOURCE_DOC_NAME
public static final String ROUTE_DOCUMENT_REF
@In(required=true,
create=true)
protected NavigationContext navigationContext
@In(create=true,
required=false)
protected org.nuxeo.ecm.core.api.CoreSession documentManager
@In(create=true,
required=false)
protected org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true) protected WebActions webActions
@In(create=true) protected LockActions lockActions
@In(create=true,
required=false)
protected TypesTool typesTool
@In(create=true) protected ResourcesAccessor resourcesAccessor
@In(create=true) protected org.nuxeo.ecm.platform.types.TypeManager typeManager
@In(create=true) protected EventManager eventManager
@In(required=true,
create=true)
protected org.nuxeo.ecm.core.api.NuxeoPrincipal currentUser
@In(create=true) protected List<org.nuxeo.ecm.core.api.DocumentModel> relatedRoutes
@In(create=true) protected RelatedRouteActionBean relatedRouteAction
@In(create=true) protected DocumentsListsManager documentsListsManager
@RequestParameter(value="stepId") protected String stepId
protected String relatedRouteModelDocumentId
protected String docWithAttachedRouteId
protected String hiddenSourceDocId
protected String hiddenDocOrder
public DocumentRoutingService getDocumentRoutingService()
@Observer(value={"documentChanged","documentSelectionChanged"})
public void resetRelatedRouteDocumentId()
public boolean isRoutable()
public String startRoute() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic DocumentRoute getRelatedRoute()
When called on an actual route or route element, the route is returned.
When called on a regular document, the routing service is queried to get the routes which have the current document attached.
When dealing with a regular document, this is DEPRECATED as several
graph routes may be related to the current document (for instance in the
case of sub-workflows). Use getRelatedRoutes() instead.
public List<DocumentRoute> getRelatedRoutes()
protected void queryForRelatedRoutes()
public String cancelRoute() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic void saveRouteAsNewInstance()
public void saveSelectedRouteAsNewInstance()
public boolean getCanDuplicateRouteInstance()
public String validateRouteModel() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated protected List<DocumentRouteTableElement> computeRouteElements() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated protected List<DocumentRouteTableElement> computeRelatedRouteElements() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated protected List<DocumentRouteTableElement> getElements(DocumentRoute currentRoute)
public boolean hasRelatedRoute()
public String startRouteRelatedToCurrentDocument() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean routeRelatedToCurrentDocumentIsRunning()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String getTypeDescription(DocumentRouteTableElement localizable)
public javax.faces.convert.Converter getDocumentModelConverter()
public boolean isStep(org.nuxeo.ecm.core.api.DocumentModel doc)
public boolean currentRouteModelIsDraft()
@Deprecated public String removeStep() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated public boolean isEditableStep(org.nuxeo.ecm.core.api.DocumentModel stepDoc) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated public boolean isEditableRouteElement(org.nuxeo.ecm.core.api.DocumentModel stepDoc) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Factory(value="currentRouteLockedByCurrentUser",
scope=EVENT)
public boolean isCurrentRouteLockedByCurrentUser()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean isCurrentRouteLocked()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean canUnlockRoute()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean canLockRoute()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic Map<String,Serializable> getCurrentRouteLockDetails() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String lockCurrentRoute() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionprotected String lockRoute(DocumentRoute docRouteElement) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String unlockCurrentRoute() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean isEmptyFork(org.nuxeo.ecm.core.api.DocumentModel forkDoc)
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String editStep() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String updateRouteElement() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String goBackToRoute() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated public String createRouteElement(String typeName) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated public String moveRouteElement(String direction) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String saveRouteElement() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated public List<org.nuxeo.ecm.core.api.DocumentModel> getOrderedChildren(String docRouteElementId, String type) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated public org.nuxeo.ecm.core.api.DocumentModel getChildWithPosition(org.nuxeo.ecm.core.api.DocumentModel docRouteElement, String pos) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Deprecated public String getPositionForChild(org.nuxeo.ecm.core.api.DocumentModel docRouteElement, org.nuxeo.ecm.core.api.DocumentModel docChild) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String getHiddenSourceDocId()
public void setHiddenSourceDocId(String hiddenSourceDocId)
public String getHiddenDocOrder()
public void setHiddenDocOrder(String hiddenDocOrder)
public String getRelatedRouteModelDocumentId()
public void setRelatedRouteModelDocumentId(String relatedRouteModelDocumentId)
public String getDocWithAttachedRouteId()
public void setDocWithAttachedRouteId(String docWithAttachedRouteId)
@Observer(value={"workflowProcessEnded","workflowProcessCanceled"},
create=false)
public void resetCache()
public org.nuxeo.ecm.core.api.DocumentModel getRouteModel(String routeId) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic org.nuxeo.ecm.core.api.DocumentModel getRouteInstanceFor(Task task) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic List<org.nuxeo.ecm.core.api.DocumentModel> getFilteredRouteModels() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic List<Task> getCurrentRouteAllTasks() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic List<Task> getCurrentRouteCurrentUserTasks() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String getCurrentWorkflowInitiator() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean isCurrentRouteGraph()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean isRouteGraph(DocumentRoute route) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionCopyright © 2019 Nuxeo SA. All rights reserved.