public class DocumentRouteElementImpl extends Object implements DocumentRouteElement, DocumentRouteStep
DocumentRouteElement.ElementLifeCycleState, DocumentRouteElement.ElementLifeCycleTransistion
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.
|
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.
|
String |
getTitle() |
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.
|
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.
|
public DocumentRouteElementImpl(DocumentModel doc, ElementRunner runner)
public DocumentModelList getAttachedDocuments(CoreSession session)
DocumentRouteElement
getAttachedDocuments
in interface DocumentRouteElement
session
- the session used to fetch the documentspublic void run(CoreSession session)
DocumentRouteElement
run
in interface DocumentRouteElement
public void run(CoreSession session, Map<String,Serializable> map)
DocumentRouteElement
run
in interface DocumentRouteElement
map
- the values to pass as initial workflow variablespublic void resume(CoreSession session, String nodeId, String taskId, Map<String,Object> data, String status)
DocumentRouteElement
resume
in interface DocumentRouteElement
session
- 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)
DocumentRouteElement
getDocumentRoute
in interface DocumentRouteElement
session
- The session use to fetch the route.public DocumentModel getDocument()
DocumentRouteElement
getDocument
in interface DocumentRouteElement
public String getName()
DocumentRouteElement
getName
in interface DocumentRouteElement
public String getTitle()
getTitle
in interface DocumentRouteElement
public boolean isValidated()
DocumentRouteElement
isValidated
in interface DocumentRouteElement
public boolean isReady()
DocumentRouteElement
isReady
in interface DocumentRouteElement
public boolean isDone()
DocumentRouteElement
isDone
in interface DocumentRouteElement
public String getDescription()
DocumentRouteElement
getDescription
in interface DocumentRouteElement
public boolean isRunning()
DocumentRouteElement
isRunning
in interface DocumentRouteElement
public boolean isCanceled()
isCanceled
in interface DocumentRouteElement
public boolean isDraft()
DocumentRouteElement
isDraft
in interface DocumentRouteElement
public void setRunning(CoreSession session)
DocumentRouteElement
setRunning
in interface DocumentRouteElement
public void followTransition(DocumentRouteElement.ElementLifeCycleTransistion transition, CoreSession session, boolean recursive)
DocumentRouteElement
followTransition
in interface DocumentRouteElement
transition
- the followed transition.session
- the session used to follow the transition.recursive
- If this element has children, do we recurse the follow transition.BulkLifeCycleChangeListener
public void save(CoreSession session)
DocumentRouteElement
save
in interface DocumentRouteElement
public void setDone(CoreSession session)
DocumentRouteElement
setDone
in interface DocumentRouteElement
public void setValidated(CoreSession session)
DocumentRouteElement
setValidated
in interface DocumentRouteElement
public void setReady(CoreSession session)
DocumentRouteElement
setReady
in interface DocumentRouteElement
public void validate(CoreSession session) throws ClientException
DocumentRouteElement
validate
in interface DocumentRouteElement
ClientException
public void setReadOnly(CoreSession session) throws ClientException
DocumentRouteElement
setReadOnly
in interface DocumentRouteElement
ClientException
public boolean canValidateStep(CoreSession session)
DocumentRouteElement
canValidateStep
in interface DocumentRouteElement
public void setCanValidateStep(CoreSession session, String userOrGroup)
DocumentRouteElement
setCanValidateStep
in interface DocumentRouteElement
public boolean canUpdateStep(CoreSession session)
DocumentRouteElement
canUpdateStep
in interface DocumentRouteElement
public void setCanUpdateStep(CoreSession session, String userOrGroup)
DocumentRouteElement
setCanUpdateStep
in interface DocumentRouteElement
public void setCanReadStep(CoreSession session, String userOrGroup)
DocumentRouteElement
setCanReadStep
in interface DocumentRouteElement
public boolean canDeleteStep(CoreSession session)
DocumentRouteElement
canDeleteStep
in interface DocumentRouteElement
public void setCanDeleteStep(CoreSession session, String userOrGroup)
DocumentRouteElement
setCanDeleteStep
in interface DocumentRouteElement
public void backToReady(CoreSession session)
DocumentRouteElement
backToReady
in interface DocumentRouteElement
public DocumentRouteStep undo(CoreSession session)
DocumentRouteStep
undo
in interface DocumentRouteStep
public boolean canUndoStep(CoreSession session)
DocumentRouteElement
canUndoStep
in interface DocumentRouteElement
public void cancel(CoreSession session)
DocumentRouteElement
cancel
in interface DocumentRouteElement
public void setCanceled(CoreSession session)
DocumentRouteElement
setCanceled
in interface DocumentRouteElement
public boolean isModifiable()
isModifiable
in interface DocumentRouteElement
Copyright © 2015 Nuxeo SA. All rights reserved.