public class DocumentRouteElementImpl extends Object implements DocumentRouteElement, DocumentRouteStep
| Modifier and Type | Class and Description |
|---|---|
protected class |
DocumentRouteElementImpl.GetIsParentRunningUnrestricted |
protected class |
DocumentRouteElementImpl.SetDocumentOnReadOnlyUnrestrictedSessionRunner |
DocumentRouteElement.ElementLifeCycleState, DocumentRouteElement.ElementLifeCycleTransistion| Modifier and Type | Field and Description |
|---|---|
protected DocumentModel |
document |
protected ElementRunner |
runner |
| Constructor and Description |
|---|
DocumentRouteElementImpl(DocumentModel doc,
ElementRunner runner) |
| Modifier and Type | Method and Description |
|---|---|
void |
backToReady(CoreSession session)
Set the step back to the ready state from running or done.
|
void |
cancel(CoreSession session)
Cancel this element.
|
boolean |
canDeleteStep(CoreSession session)
If this session can delete this step.
|
boolean |
canUndoStep(CoreSession session)
If this step can be undone.
|
boolean |
canUpdateStep(CoreSession session)
If this session can update this step.
|
boolean |
canValidateStep(CoreSession session)
If this session can validate the step.
|
protected boolean |
checkLifeCycleState(DocumentRouteElement.ElementLifeCycleState state) |
void |
followTransition(DocumentRouteElement.ElementLifeCycleTransistion transition,
CoreSession session,
boolean recursive)
make this element follow a transition.
|
DocumentModelList |
getAttachedDocuments(CoreSession session)
Return the list of documents that this route processes.
|
String |
getDescription()
the description of this element.
|
DocumentModel |
getDocument()
Get the underlying document representing this element.
|
DocumentRoute |
getDocumentRoute(CoreSession session)
Return the DocumentRoute this element is part of.
|
String |
getName()
The name of this element.
|
protected Object |
getProperty(String propertyName) |
String |
getTitle() |
protected boolean |
hasPermissionOnDocument(CoreSession session,
String permission) |
boolean |
isCanceled() |
boolean |
isDone()
if this route is done.
|
boolean |
isDraft()
if this route is draft.
|
boolean |
isModifiable() |
boolean |
isReady()
if this element is ready.
|
boolean |
isRunning()
if this route is running.
|
boolean |
isValidated()
if the route this element is part of has been validated.
|
void |
resume(CoreSession session,
String nodeId,
String taskId,
Map<String,Object> data,
String status)
Resumes execution on a route node.
|
void |
run(CoreSession session)
Execute this element.
|
void |
run(CoreSession session,
Map<String,Serializable> map)
Execute this element.
|
void |
save(CoreSession session)
save the document representing this DocumentRoute.
|
void |
setCanceled(CoreSession session)
Set the step to a cancel step.
|
void |
setCanDeleteStep(CoreSession session,
String userOrGroup)
make this user or group step deleter.
|
void |
setCanReadStep(CoreSession session,
String userOrGroup)
make this user or group a step reader.
|
void |
setCanUpdateStep(CoreSession session,
String userOrGroup)
make this user or group a step updater.
|
void |
setCanValidateStep(CoreSession session,
String userOrGroup)
make this user or group a validator for this step.
|
void |
setDone(CoreSession session)
set this element as done.
|
protected void |
setPermissionOnDocument(CoreSession session,
String userOrGroup,
String permission) |
void |
setReadOnly(CoreSession session)
remove write rights to everyone but the administrators.
|
void |
setReady(CoreSession session)
set this element as ready.
|
void |
setRunning(CoreSession session)
set this element as running.
|
void |
setValidated(CoreSession session)
set this element as validated.
|
DocumentRouteStep |
undo(CoreSession session)
Undo this step.
|
void |
validate(CoreSession session)
Set this element to the validate state and put it in read only mode.
|
protected DocumentModel document
protected ElementRunner runner
public DocumentRouteElementImpl(DocumentModel doc, ElementRunner runner)
public DocumentModelList getAttachedDocuments(CoreSession session)
DocumentRouteElementgetAttachedDocuments in interface DocumentRouteElementsession - the session used to fetch the documentspublic void run(CoreSession session)
DocumentRouteElementrun in interface DocumentRouteElementpublic void run(CoreSession session, Map<String,Serializable> map)
DocumentRouteElementrun in interface DocumentRouteElementmap - the values to pass as initial workflow variablespublic void resume(CoreSession session, String nodeId, String taskId, Map<String,Object> data, String status)
DocumentRouteElementresume in interface DocumentRouteElementsession - the sessionnodeId - the node id to resume ontaskId - the task iddata - the data coming from UI formstatus - the id of the button clicked to submit the related task formpublic DocumentRoute getDocumentRoute(CoreSession session)
DocumentRouteElementgetDocumentRoute in interface DocumentRouteElementsession - The session use to fetch the route.public DocumentModel getDocument()
DocumentRouteElementgetDocument in interface DocumentRouteElementprotected Object getProperty(String propertyName)
public String getName()
DocumentRouteElementgetName in interface DocumentRouteElementpublic String getTitle()
getTitle in interface DocumentRouteElementpublic boolean isValidated()
DocumentRouteElementisValidated in interface DocumentRouteElementpublic boolean isReady()
DocumentRouteElementisReady in interface DocumentRouteElementpublic boolean isDone()
DocumentRouteElementisDone in interface DocumentRouteElementprotected boolean checkLifeCycleState(DocumentRouteElement.ElementLifeCycleState state)
public String getDescription()
DocumentRouteElementgetDescription in interface DocumentRouteElementpublic boolean isRunning()
DocumentRouteElementisRunning in interface DocumentRouteElementpublic boolean isCanceled()
isCanceled in interface DocumentRouteElementpublic boolean isDraft()
DocumentRouteElementisDraft in interface DocumentRouteElementpublic void setRunning(CoreSession session)
DocumentRouteElementsetRunning in interface DocumentRouteElementpublic void followTransition(DocumentRouteElement.ElementLifeCycleTransistion transition, CoreSession session, boolean recursive)
DocumentRouteElementfollowTransition in interface DocumentRouteElementtransition - the followed transition.session - the session used to follow the transition.recursive - If this element has children, do we recurse the follow transition.BulkLifeCycleChangeListenerpublic void save(CoreSession session)
DocumentRouteElementsave in interface DocumentRouteElementpublic void setDone(CoreSession session)
DocumentRouteElementsetDone in interface DocumentRouteElementpublic void setValidated(CoreSession session)
DocumentRouteElementsetValidated in interface DocumentRouteElementpublic void setReady(CoreSession session)
DocumentRouteElementsetReady in interface DocumentRouteElementpublic void validate(CoreSession session)
DocumentRouteElementvalidate in interface DocumentRouteElementpublic void setReadOnly(CoreSession session)
DocumentRouteElementsetReadOnly in interface DocumentRouteElementpublic boolean canValidateStep(CoreSession session)
DocumentRouteElementcanValidateStep in interface DocumentRouteElementprotected boolean hasPermissionOnDocument(CoreSession session, String permission)
public void setCanValidateStep(CoreSession session, String userOrGroup)
DocumentRouteElementsetCanValidateStep in interface DocumentRouteElementprotected void setPermissionOnDocument(CoreSession session, String userOrGroup, String permission)
public boolean canUpdateStep(CoreSession session)
DocumentRouteElementcanUpdateStep in interface DocumentRouteElementpublic void setCanUpdateStep(CoreSession session, String userOrGroup)
DocumentRouteElementsetCanUpdateStep in interface DocumentRouteElementpublic void setCanReadStep(CoreSession session, String userOrGroup)
DocumentRouteElementsetCanReadStep in interface DocumentRouteElementpublic boolean canDeleteStep(CoreSession session)
DocumentRouteElementcanDeleteStep in interface DocumentRouteElementpublic void setCanDeleteStep(CoreSession session, String userOrGroup)
DocumentRouteElementsetCanDeleteStep in interface DocumentRouteElementpublic void backToReady(CoreSession session)
DocumentRouteElementbackToReady in interface DocumentRouteElementpublic DocumentRouteStep undo(CoreSession session)
DocumentRouteStepundo in interface DocumentRouteSteppublic boolean canUndoStep(CoreSession session)
DocumentRouteElementcanUndoStep in interface DocumentRouteElementpublic void cancel(CoreSession session)
DocumentRouteElementcancel in interface DocumentRouteElementpublic void setCanceled(CoreSession session)
DocumentRouteElementsetCanceled in interface DocumentRouteElementpublic boolean isModifiable()
isModifiable in interface DocumentRouteElementCopyright © 2019 Nuxeo. All rights reserved.