org.kuali.rice.kew.impl.document
Class WorkflowDocumentImpl

java.lang.Object
  extended by org.kuali.rice.kew.impl.document.WorkflowDocumentImpl
All Implemented Interfaces:
Serializable, DocumentContract, WorkflowDocument, WorkflowDocumentPrototype

public class WorkflowDocumentImpl
extends Object
implements Serializable, WorkflowDocumentPrototype

The implementation of WorkflowDocument. Implements WorkflowDocumentPrototype to expose and initialization method used for construction.

NOTE: operations against document data on this are only "flushed" when an action is performed.

This class is *not* thread safe.

See Also:
WorkflowDocument, Serialized Form

Nested Class Summary
protected static class WorkflowDocumentImpl.ModifiableDocument
          A wrapper around Document which keeps track of local changes and generates a new updated Document as necessary.
protected static class WorkflowDocumentImpl.ModifiableDocumentContent
          A wrapper around DocumentContent which keeps track of local changes and generates a new updated DocumentContent as necessary.
 
Constructor Summary
WorkflowDocumentImpl()
           
 
Method Summary
 void acknowledge(String annotation)
          Acknowledges the document, commits updates.
 void addAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
          Adds a workflow attribute definition.
 void addSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
          Adds a searchable workflow attribute definition.
 void adHocToGroup(ActionRequestType actionRequested, String annotation, String targetGroupId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified group; commits updates.
 void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation, String targetGroupId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified group; commits updates.
 void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation, String targetGroupId, String responsibilityDescription, boolean forceAction, String requestLabel)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToGroup(AdHocToGroup adHocToGroup, String annotation)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(ActionRequestType actionRequested, String annotation, String targetPrincipalId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation, String targetPrincipalId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation, String targetPrincipalId, String responsibilityDescription, boolean forceAction, String requestLabel)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(AdHocToPrincipal adHocToPrincipal, String annotation)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void approve(String annotation)
          Approves the document, commits updates.
 void blanketApprove(String annotation)
          Cancels the document, commits updates.
 void blanketApprove(String annotation, String... nodeNames)
          Blanket-approves the document, commits updates.
 void cancel(String annotation)
          Approves the document, commits updates.
 boolean checkStatus(DocumentStatus status)
          Helper that checks whether the document has the given status NOTE: does this really need to be in the public API? it only appears to be used internally
 void clearAttributeContent()
          Clears the document's attribute content.
 void clearAttributeDefinitions()
          Clears workflow attribute definitions.
 void clearSearchableContent()
          Clears the searchable content.
 void clearSearchableDefinitions()
          Clears searchable workflow attribute definitions.
 void complete(String annotation)
          Completes the document, commits updates.
protected  DocumentActionParameters constructDocumentActionParameters(String annotation)
           
 void delete()
          Deletes the document.
 void disapprove(String annotation)
          Disapproves the document, commits updates.
 void fyi()
          Clears an outstanding FYI on the document without an annotation, commits updates.
 void fyi(String annotation)
          Clears an outstanding FYI on the document, commits updates.
 List<ActionTaken> getActionsTaken()
          Return the list of past actions taken on the document
 List<RouteNodeInstance> getActiveRouteNodeInstances()
          Returns the list of active route node instances
 String getApplicationContent()
          Returns the currently set application content.
 String getApplicationDocumentId()
          Retrieve the application document id.
 String getApplicationDocumentStatus()
          Retrieve the application document status.
 org.joda.time.DateTime getApplicationDocumentStatusDate()
          Retrieve the last application document status transition date.
 String getAttributeContent()
          Returns the currently set document attribute content.
 List<WorkflowAttributeDefinition> getAttributeDefinitions()
          Returns the currently set workflow attribute definitions
 String getClearFutureRequestsValue()
          Returns whether the workflow variable that specifies that ...
 Set<String> getCurrentNodeNames()
          Returns the names of the nodes at which the document is currently at in it's route path.
 List<RouteNodeInstance> getCurrentRouteNodeInstances()
          Returns the list of active route node instances
 org.joda.time.DateTime getDateApproved()
          Retrieve the document approval date
 org.joda.time.DateTime getDateCreated()
          Retrieve the document creation date
 org.joda.time.DateTime getDateFinalized()
          Retrieve the document finalization date
 org.joda.time.DateTime getDateLastModified()
          Retrieve the document last-modified date
 Document getDocument()
          Returns a read-only view of the underlying document meta-data
 DocumentContent getDocumentContent()
          Returns a read-only view of the underlying mutable document content
protected  DocumentContentUpdate getDocumentContentUpdateIfDirty()
           
 DocumentDetail getDocumentDetail()
          Returns detailed document information TODO: consolidate with Document/ModifiableDocument or eliminate? currently bypasses locally cached Document data
 String getDocumentHandlerUrl()
          Retrieve the document handler url
 String getDocumentId()
          Retrieve the document id
 String getDocumentTypeId()
          Retrieve the id of the type of this document
 String getDocumentTypeName()
          Retrieve the name of the type of this document
protected  DocumentUpdate getDocumentUpdateIfDirty()
           
 String getDoNotReceiveFutureRequestsValue()
          Returns whether the workflow variable that specifies that this principal should NOT receive future requests has been set
protected  String getFutureRequestsKey(String principalId)
           
 String getInitiatorPrincipalId()
          Retrieve the initiator principal id
protected  WorkflowDocumentImpl.ModifiableDocument getModifiableDocument()
           
protected  WorkflowDocumentImpl.ModifiableDocumentContent getModifiableDocumentContent()
           
 Set<String> getNodeNames()
          Returns the names of the route nodes on the document which are currently active.
 List<String> getPreviousNodeNames()
          Returns the list of previous route node names
 String getPrincipalId()
          Returns the principalId with which this WorkflowDocument was constructed
 String getReceiveFutureRequestsValue()
          Returns whether the workflow variable that specifies that this principal should receive future requests has been set
 RequestedActions getRequestedActions()
          Returns the list of requested actions on this document for the current user
 List<ActionRequest> getRootActionRequests()
          Return the list of root action requests on the document.
 String getRoutedByPrincipalId()
          Retrieve the router principal id
 List<RouteNodeInstance> getRouteNodeInstances()
          Returns the flattened list of route node instances
 List<WorkflowAttributeDefinition> getSearchableDefinitions()
          Returns the currently set searchable workflow attribute definitions
 DocumentStatus getStatus()
          Retrieve the document status
 String getTitle()
          Retrieve the document title
 ValidActions getValidActions()
          Returns the list of valid actions on this document for the current user
 Map<String,String> getVariables()
          Retrieve the currently defined internal workflow engine variables for the document NOTE: use of workflow engine variables is an advanced technique requiring specific crafting of the workflow document routing; these variables will not be useful for the majority of workflow use cases
 String getVariableValue(String name)
          Gets a workflow variable value.
 WorkflowDocumentActionsService getWorkflowDocumentActionsService()
           
 WorkflowDocumentService getWorkflowDocumentService()
           
 void init(String principalId, Document document)
          Initialize the WorkflowDocument
 boolean isAcknowledgeRequested()
          Returns whether an acknowledge request is one of the requested actions.
 boolean isApprovalRequested()
          Returns whether an approval request is one of the requested actions.
 boolean isApproved()
          Indicates if the document is in the Processed or Finalized state.
 boolean isBlanketApproveCapable()
          Returns whether a blank-approve action is a valid action.
 boolean isCanceled()
          Indicates if the document is in the canceled state or not.
 boolean isCompletionRequested()
          Returns whether a completion request is one of the requested actions.
 boolean isDisapproved()
          Indicates if the document is in the disapproved state or not.
 boolean isEnroute()
          Indicates if the document is in the enroute state or not.
 boolean isException()
          Indicates if the document is in the exception state or not.
 boolean isFinal()
          Indicates if the document is in the final state or not.
 boolean isFYIRequested()
          Returns whether an FYI is one of the requested actions.
 boolean isInitiated()
          Indicates if the document is in the initiated state or not.
 boolean isProcessed()
          Indicates if the document is in the processed state or not.
 boolean isRecalled()
          Indicates if the document is in the recalled state or not.
 boolean isRouteCapable()
          Returns whether a route action is a valid action.
 boolean isSaved()
          Indicates if the document is in the saved state or not.
 boolean isValidAction(ActionType actionType)
          Returns whether the specified action type is valid
 void logAnnotation(String annotation)
          Records a log action which adds an annotation on the document but does not affect routing.
 void move(MovePoint movePoint, String annotation)
          Moves the document to a different node; commits updates.
 void placeInExceptionRouting(String annotation)
          Places the document in exception routing; commits updates.
 void recall(String annotation, boolean cancel)
          Recalls the document, commits updates.
 void refresh()
          Reloads the document state, any pending changes will be discarded
 void releaseGroupAuthority(String annotation, String groupId)
          Releases authority of a group by a member of that group; commits updates.
 void removeAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
          Removes a workflow attribute definition.
 void removeSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
          Removes a searchable workflow attribute definition.
protected  void resetStateAfterAction(DocumentActionResult response)
           
 void returnToPreviousNode(String annotation, ReturnPoint returnPoint)
          Returns the document to a previous node; commits updates.
 void returnToPreviousNode(String annotation, String nodeName)
          Returns the document to a previous node; commits updates.
 void revokeAdHocRequestById(String actionRequestId, String annotation)
          Revokes an Ad-Hoc request by id; commits updates.
 void revokeAdHocRequests(AdHocRevoke revoke, String annotation)
          Revokes an Ad-Hoc request by the specified criteria; commits updates.
 void revokeAllAdHocRequests(String annotation)
          Revokes all Ad-Hoc requests; commits updates; commits updates.
 void route(String annotation)
          Routes the document, commits updates.
 void saveDocument(String annotation)
          Saves the document, commits updates.
 void saveDocumentData()
          Save the document data without affecting routing, commits updates.
 void setApplicationContent(String applicationContent)
          Sets the document's application content.
 void setApplicationDocumentId(String applicationDocumentId)
          Sets the application document id.
 void setApplicationDocumentStatus(String applicationDocumentStatus)
          Sets the application document status.
 void setAttributeContent(String attributeContent)
          Sets the document's attribute content.
 void setClearFutureRequests()
          Sets the workflow variable that specifies that ...
 void setDoNotReceiveFutureRequests()
          Sets the workflow variable that specifies that this principal should NOT receive future requests
 void setReceiveFutureRequests()
          Sets the workflow variable that specifies that this principal should receive future requests
 void setSearchableContent(String searchableContent)
          Sets the document's searchable content.
 void setTitle(String title)
          Sets the document title.
 void setVariable(String name, String value)
          Sets a workflow variable.
 void setWorkflowDocumentActionsService(WorkflowDocumentActionsService workflowDocumentActionsService)
           
 void setWorkflowDocumentService(WorkflowDocumentService workflowDocumentService)
           
 void superUserBlanketApprove(String annotation)
          Performs a super-user blanket-approve action; commits updates.
 void superUserCancel(String annotation)
          Performs a super-user cancel action; commits updates.
 void superUserDisapprove(String annotation)
          Performs a super-user disapprove action; commits updates.
 void superUserNodeApprove(String nodeName, String annotation)
          Performs a super-user approve action for the specified node; commits updates.
 void superUserReturnToPreviousNode(ReturnPoint returnPoint, String annotation)
          Performs a super-user "return to previous node" action; commits updates.
 void superUserTakeRequestedAction(String actionRequestId, String annotation)
          Performs a super-user approve action for the specified node; commits updates.
 void switchPrincipal(String principalId)
          Switches the principalId under which WorkflowDocument API are performed.
 void takeGroupAuthority(String annotation, String groupId)
          Takes authority of a group by a member of that group; commits updates.
 void updateDocumentContent(DocumentContentUpdate documentContentUpdate)
          Sets internal DocumentContentUpdate object TODO: exposes internal API and used only by tests, candidate for elimination?
 List<? extends RemotableAttributeErrorContract> validateAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
          Validates a workflow attribute definition and returns a list of validation errors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowDocumentImpl

public WorkflowDocumentImpl()
Method Detail

init

public void init(String principalId,
                 Document document)
Description copied from interface: WorkflowDocumentPrototype
Initialize the WorkflowDocument

Specified by:
init in interface WorkflowDocumentPrototype
Parameters:
principalId - the interacting/consuming user principal id
document - the DTO of the document this WorkflowDocument represents

getWorkflowDocumentActionsService

public WorkflowDocumentActionsService getWorkflowDocumentActionsService()

setWorkflowDocumentActionsService

public void setWorkflowDocumentActionsService(WorkflowDocumentActionsService workflowDocumentActionsService)

getWorkflowDocumentService

public WorkflowDocumentService getWorkflowDocumentService()

setWorkflowDocumentService

public void setWorkflowDocumentService(WorkflowDocumentService workflowDocumentService)

getModifiableDocument

protected WorkflowDocumentImpl.ModifiableDocument getModifiableDocument()

getModifiableDocumentContent

protected WorkflowDocumentImpl.ModifiableDocumentContent getModifiableDocumentContent()

getDocumentId

public String getDocumentId()
Description copied from interface: DocumentContract
Retrieve the document id

Specified by:
getDocumentId in interface DocumentContract
Returns:
the document id

getDocument

public Document getDocument()
Description copied from interface: WorkflowDocument
Returns a read-only view of the underlying document meta-data

Specified by:
getDocument in interface WorkflowDocument
Returns:
a read-only view of the underlying document meta-data

getDocumentContent

public DocumentContent getDocumentContent()
Description copied from interface: WorkflowDocument
Returns a read-only view of the underlying mutable document content

Specified by:
getDocumentContent in interface WorkflowDocument
Returns:
a read-only view of the underlying mutable document content

getApplicationContent

public String getApplicationContent()
Description copied from interface: WorkflowDocument
Returns the currently set application content.

Specified by:
getApplicationContent in interface WorkflowDocument
Returns:
the currently set application content.
See Also:
WorkflowDocument.getDocumentContent()

setApplicationContent

public void setApplicationContent(String applicationContent)
Description copied from interface: WorkflowDocument
Sets the document's application content. The update will be committed with the next document operation.

Specified by:
setApplicationContent in interface WorkflowDocument
Parameters:
applicationContent - the document application content to set

setAttributeContent

public void setAttributeContent(String attributeContent)
Description copied from interface: WorkflowDocument
Sets the document's attribute content. The update will be committed with the next document operation.

Specified by:
setAttributeContent in interface WorkflowDocument
Parameters:
attributeContent - the document attribute content to set

clearAttributeContent

public void clearAttributeContent()
Description copied from interface: WorkflowDocument
Clears the document's attribute content. The update will be committed with the next document operation.

Specified by:
clearAttributeContent in interface WorkflowDocument

getAttributeContent

public String getAttributeContent()
Description copied from interface: WorkflowDocument
Returns the currently set document attribute content.

Specified by:
getAttributeContent in interface WorkflowDocument

addAttributeDefinition

public void addAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
Description copied from interface: WorkflowDocument
Adds a workflow attribute definition. The update will be committed with the next document operation.

Specified by:
addAttributeDefinition in interface WorkflowDocument
Parameters:
attributeDefinition - the WorkflowAttributeDefinition to add

removeAttributeDefinition

public void removeAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
Description copied from interface: WorkflowDocument
Removes a workflow attribute definition. The update will be committed with the next document operation. Equality is determined on the basis of WorkflowAttributeDefinition fields.

Specified by:
removeAttributeDefinition in interface WorkflowDocument
Parameters:
attributeDefinition - the WorkflowAttributeDefinition to remove
See Also:
AbstractDataTransferObject.equals(Object)

clearAttributeDefinitions

public void clearAttributeDefinitions()
Description copied from interface: WorkflowDocument
Clears workflow attribute definitions. The update will be committed with the next document operation.

Specified by:
clearAttributeDefinitions in interface WorkflowDocument

getAttributeDefinitions

public List<WorkflowAttributeDefinition> getAttributeDefinitions()
Description copied from interface: WorkflowDocument
Returns the currently set workflow attribute definitions

Specified by:
getAttributeDefinitions in interface WorkflowDocument
Returns:
the currently set workflow attribute definitions

setSearchableContent

public void setSearchableContent(String searchableContent)
Description copied from interface: WorkflowDocument
Sets the document's searchable content. The update will be committed with the next document operation.

Specified by:
setSearchableContent in interface WorkflowDocument
Parameters:
searchableContent - the searchable content to set

addSearchableDefinition

public void addSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
Description copied from interface: WorkflowDocument
Adds a searchable workflow attribute definition. The update will be committed with the next document operation.

Specified by:
addSearchableDefinition in interface WorkflowDocument
Parameters:
searchableDefinition - the WorkflowAttributeDefinition to add

removeSearchableDefinition

public void removeSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
Description copied from interface: WorkflowDocument
Removes a searchable workflow attribute definition. The update will be committed with the next document operation. Equality is determined on the basis of WorkflowAttributeDefinition fields.

Specified by:
removeSearchableDefinition in interface WorkflowDocument
Parameters:
searchableDefinition - the WorkflowAttributeDefinition to remove
See Also:
AbstractDataTransferObject.equals(Object)

clearSearchableDefinitions

public void clearSearchableDefinitions()
Description copied from interface: WorkflowDocument
Clears searchable workflow attribute definitions. The update will be committed with the next document operation.

Specified by:
clearSearchableDefinitions in interface WorkflowDocument

clearSearchableContent

public void clearSearchableContent()
Description copied from interface: WorkflowDocument
Clears the searchable content. The update will be committed with the next document operation.

Specified by:
clearSearchableContent in interface WorkflowDocument

getSearchableDefinitions

public List<WorkflowAttributeDefinition> getSearchableDefinitions()
Description copied from interface: WorkflowDocument
Returns the currently set searchable workflow attribute definitions

Specified by:
getSearchableDefinitions in interface WorkflowDocument
Returns:
the currently set searchable workflow attribute definitions

validateAttributeDefinition

public List<? extends RemotableAttributeErrorContract> validateAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
Description copied from interface: WorkflowDocument
Validates a workflow attribute definition and returns a list of validation errors. This action is stateless and does not cause a commit of document updates. Implementation note: this is currently only used by EDL.

Specified by:
validateAttributeDefinition in interface WorkflowDocument
Parameters:
attributeDefinition - the workflow attribute definition to validate
Returns:
list of attribute validation errors
See Also:
WorkflowDocumentActionsService.validateWorkflowAttributeDefinition(org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition)

getRootActionRequests

public List<ActionRequest> getRootActionRequests()
Description copied from interface: WorkflowDocument
Return the list of root action requests on the document.

Specified by:
getRootActionRequests in interface WorkflowDocument
Returns:
the list of root action requests on the document.
See Also:
WorkflowDocumentService.getRootActionRequests(String)

getActionsTaken

public List<ActionTaken> getActionsTaken()
Description copied from interface: WorkflowDocument
Return the list of past actions taken on the document

Specified by:
getActionsTaken in interface WorkflowDocument
Returns:
the list of past actions taken on the document
See Also:
WorkflowDocumentService.getActionsTaken(String)

setApplicationDocumentId

public void setApplicationDocumentId(String applicationDocumentId)
Description copied from interface: WorkflowDocument
Sets the application document id. The update will be committed with the next document operation.

Specified by:
setApplicationDocumentId in interface WorkflowDocument
Parameters:
applicationDocumentId - the application document id to set.

getApplicationDocumentId

public String getApplicationDocumentId()
Description copied from interface: DocumentContract
Retrieve the application document id. The Application Document Id is used to record an application-relevant id for the workflow document.

Specified by:
getApplicationDocumentId in interface DocumentContract
Returns:
the application document id

getDateCreated

public org.joda.time.DateTime getDateCreated()
Description copied from interface: DocumentContract
Retrieve the document creation date

Specified by:
getDateCreated in interface DocumentContract
Returns:
the document creation date or null

getTitle

public String getTitle()
Description copied from interface: DocumentContract
Retrieve the document title

Specified by:
getTitle in interface DocumentContract
Returns:
the document title

getValidActions

public ValidActions getValidActions()
Description copied from interface: WorkflowDocument
Returns the list of valid actions on this document for the current user

Specified by:
getValidActions in interface WorkflowDocument
Returns:
the list of valid actions on this document for the current user
See Also:
WorkflowDocumentActionsService.determineValidActions(String, String)

getRequestedActions

public RequestedActions getRequestedActions()
Description copied from interface: WorkflowDocument
Returns the list of requested actions on this document for the current user

Specified by:
getRequestedActions in interface WorkflowDocument
Returns:
the list of requested actions on this document for the current user
See Also:
WorkflowDocumentActionsService.determineRequestedActions(String, String)

getDocumentUpdateIfDirty

protected DocumentUpdate getDocumentUpdateIfDirty()

getDocumentContentUpdateIfDirty

protected DocumentContentUpdate getDocumentContentUpdateIfDirty()

resetStateAfterAction

protected void resetStateAfterAction(DocumentActionResult response)

saveDocument

public void saveDocument(String annotation)
Description copied from interface: WorkflowDocument
Saves the document, commits updates.

Specified by:
saveDocument in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.save(org.kuali.rice.kew.api.action.DocumentActionParameters)

route

public void route(String annotation)
Description copied from interface: WorkflowDocument
Routes the document, commits updates.

Specified by:
route in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.route(org.kuali.rice.kew.api.action.DocumentActionParameters)

disapprove

public void disapprove(String annotation)
Description copied from interface: WorkflowDocument
Disapproves the document, commits updates.

Specified by:
disapprove in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.route(org.kuali.rice.kew.api.action.DocumentActionParameters)

approve

public void approve(String annotation)
Description copied from interface: WorkflowDocument
Approves the document, commits updates.

Specified by:
approve in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.approve(org.kuali.rice.kew.api.action.DocumentActionParameters)

cancel

public void cancel(String annotation)
Description copied from interface: WorkflowDocument
Approves the document, commits updates.

Specified by:
cancel in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.approve(org.kuali.rice.kew.api.action.DocumentActionParameters)

recall

public void recall(String annotation,
                   boolean cancel)
Description copied from interface: WorkflowDocument
Recalls the document, commits updates.

Specified by:
recall in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.approve(org.kuali.rice.kew.api.action.DocumentActionParameters)

blanketApprove

public void blanketApprove(String annotation)
Description copied from interface: WorkflowDocument
Cancels the document, commits updates.

Specified by:
blanketApprove in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.cancel(org.kuali.rice.kew.api.action.DocumentActionParameters)

blanketApprove

public void blanketApprove(String annotation,
                           String... nodeNames)
Description copied from interface: WorkflowDocument
Blanket-approves the document, commits updates.

Specified by:
blanketApprove in interface WorkflowDocument
Parameters:
annotation - the document action annotation
nodeNames - a set of node names to which to blanket approve the given document
See Also:
WorkflowDocumentActionsService.blanketApproveToNodes(org.kuali.rice.kew.api.action.DocumentActionParameters, java.util.Set)

saveDocumentData

public void saveDocumentData()
Description copied from interface: WorkflowDocument
Save the document data without affecting routing, commits updates.

Specified by:
saveDocumentData in interface WorkflowDocument
See Also:
WorkflowDocumentActionsService.saveDocumentData(org.kuali.rice.kew.api.action.DocumentActionParameters)

setApplicationDocumentStatus

public void setApplicationDocumentStatus(String applicationDocumentStatus)
Description copied from interface: WorkflowDocument
Sets the application document status. The update will be committed with the next document operation.

Specified by:
setApplicationDocumentStatus in interface WorkflowDocument
Parameters:
applicationDocumentStatus - the application document status to set

acknowledge

public void acknowledge(String annotation)
Description copied from interface: WorkflowDocument
Acknowledges the document, commits updates.

Specified by:
acknowledge in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.acknowledge(org.kuali.rice.kew.api.action.DocumentActionParameters)

fyi

public void fyi(String annotation)
Description copied from interface: WorkflowDocument
Clears an outstanding FYI on the document, commits updates.

Specified by:
fyi in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.clearFyi(org.kuali.rice.kew.api.action.DocumentActionParameters)

fyi

public void fyi()
Description copied from interface: WorkflowDocument
Clears an outstanding FYI on the document without an annotation, commits updates.

Specified by:
fyi in interface WorkflowDocument
See Also:
WorkflowDocument.fyi(String)

delete

public void delete()
Description copied from interface: WorkflowDocument
Deletes the document. Any pending updates are NOT committed, they are discarded. After deletion this WorkflowDocument object will no longer be valid, and any operations that interact with the workflow system will throws an IllegalStateException

Specified by:
delete in interface WorkflowDocument
See Also:
WorkflowDocumentActionsService.delete(String, String)

refresh

public void refresh()
Description copied from interface: WorkflowDocument
Reloads the document state, any pending changes will be discarded

Specified by:
refresh in interface WorkflowDocument
See Also:
WorkflowDocumentService.getDocument(String)

adHocToPrincipal

public void adHocToPrincipal(ActionRequestType actionRequested,
                             String annotation,
                             String targetPrincipalId,
                             String responsibilityDescription,
                             boolean forceAction)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified principal; commits updates.

Specified by:
adHocToPrincipal in interface WorkflowDocument
Parameters:
actionRequested - the request action type
annotation - the route annotation
targetPrincipalId - the target principal id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToPrincipal

public void adHocToPrincipal(ActionRequestType actionRequested,
                             String nodeName,
                             String annotation,
                             String targetPrincipalId,
                             String responsibilityDescription,
                             boolean forceAction)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified principal; commits updates.

Specified by:
adHocToPrincipal in interface WorkflowDocument
Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetPrincipalId - the target principal id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToPrincipal

public void adHocToPrincipal(ActionRequestType actionRequested,
                             String nodeName,
                             String annotation,
                             String targetPrincipalId,
                             String responsibilityDescription,
                             boolean forceAction,
                             String requestLabel)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified principal; commits updates.

Specified by:
adHocToPrincipal in interface WorkflowDocument
Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetPrincipalId - the target principal id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
requestLabel - the request label
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToPrincipal

public void adHocToPrincipal(AdHocToPrincipal adHocToPrincipal,
                             String annotation)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified principal; commits updates.

Specified by:
adHocToPrincipal in interface WorkflowDocument
Parameters:
adHocToPrincipal - a pre-constructed AdHocToPrincipal object
annotation - the route annotation
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToGroup

public void adHocToGroup(ActionRequestType actionRequested,
                         String annotation,
                         String targetGroupId,
                         String responsibilityDescription,
                         boolean forceAction)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified group; commits updates.

Specified by:
adHocToGroup in interface WorkflowDocument
Parameters:
actionRequested - the request action type
annotation - the route annotation
targetGroupId - the target group id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
See Also:
WorkflowDocumentActionsService.adHocToGroup(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToGroup)

adHocToGroup

public void adHocToGroup(ActionRequestType actionRequested,
                         String nodeName,
                         String annotation,
                         String targetGroupId,
                         String responsibilityDescription,
                         boolean forceAction)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified group; commits updates.

Specified by:
adHocToGroup in interface WorkflowDocument
Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetGroupId - the target group id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
See Also:
WorkflowDocumentActionsService.adHocToGroup(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToGroup)

adHocToGroup

public void adHocToGroup(ActionRequestType actionRequested,
                         String nodeName,
                         String annotation,
                         String targetGroupId,
                         String responsibilityDescription,
                         boolean forceAction,
                         String requestLabel)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified principal; commits updates.

Specified by:
adHocToGroup in interface WorkflowDocument
Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetGroupId - the target group id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
requestLabel - the request label
See Also:
WorkflowDocumentActionsService.adHocToGroup(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToGroup)

adHocToGroup

public void adHocToGroup(AdHocToGroup adHocToGroup,
                         String annotation)
Description copied from interface: WorkflowDocument
Sends an "ad-hoc" action request to the specified principal; commits updates.

Specified by:
adHocToGroup in interface WorkflowDocument
Parameters:
adHocToGroup - a pre-constructed AdHocToGroup object
annotation - the route annotation
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

revokeAdHocRequestById

public void revokeAdHocRequestById(String actionRequestId,
                                   String annotation)
Description copied from interface: WorkflowDocument
Revokes an Ad-Hoc request by id; commits updates.

Specified by:
revokeAdHocRequestById in interface WorkflowDocument
Parameters:
actionRequestId - the action request id to revoke
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.revokeAdHocRequestById(org.kuali.rice.kew.api.action.DocumentActionParameters, String)

revokeAdHocRequests

public void revokeAdHocRequests(AdHocRevoke revoke,
                                String annotation)
Description copied from interface: WorkflowDocument
Revokes an Ad-Hoc request by the specified criteria; commits updates.

Specified by:
revokeAdHocRequests in interface WorkflowDocument
Parameters:
revoke - the criteria for matching ad hoc action requests on the specified document that should be revoked
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.revokeAdHocRequests(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocRevoke)

revokeAllAdHocRequests

public void revokeAllAdHocRequests(String annotation)
Description copied from interface: WorkflowDocument
Revokes all Ad-Hoc requests; commits updates; commits updates.

Specified by:
revokeAllAdHocRequests in interface WorkflowDocument
Parameters:
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.revokeAllAdHocRequests(org.kuali.rice.kew.api.action.DocumentActionParameters)

setTitle

public void setTitle(String title)
Description copied from interface: WorkflowDocument
Sets the document title. The update will be committed with the next document operation.

Specified by:
setTitle in interface WorkflowDocument
Parameters:
title - the document title to set

getDocumentTypeName

public String getDocumentTypeName()
Description copied from interface: DocumentContract
Retrieve the name of the type of this document

Specified by:
getDocumentTypeName in interface DocumentContract
Returns:
the name of the type of this document

isCompletionRequested

public boolean isCompletionRequested()
Description copied from interface: WorkflowDocument
Returns whether a completion request is one of the requested actions.

Specified by:
isCompletionRequested in interface WorkflowDocument
Returns:
whether a completion request is one of the requested actions.
See Also:
WorkflowDocument.getRequestedActions()

isApprovalRequested

public boolean isApprovalRequested()
Description copied from interface: WorkflowDocument
Returns whether an approval request is one of the requested actions.

Specified by:
isApprovalRequested in interface WorkflowDocument
Returns:
whether an approval request is one of the requested actions.
See Also:
WorkflowDocument.getRequestedActions()

isAcknowledgeRequested

public boolean isAcknowledgeRequested()
Description copied from interface: WorkflowDocument
Returns whether an acknowledge request is one of the requested actions.

Specified by:
isAcknowledgeRequested in interface WorkflowDocument
Returns:
whether an acknowledge request is one of the requested actions.
See Also:
WorkflowDocument.getRequestedActions()

isFYIRequested

public boolean isFYIRequested()
Description copied from interface: WorkflowDocument
Returns whether an FYI is one of the requested actions.

Specified by:
isFYIRequested in interface WorkflowDocument
Returns:
whether an FYI is one of the requested actions.
See Also:
WorkflowDocument.getRequestedActions()

isBlanketApproveCapable

public boolean isBlanketApproveCapable()
Description copied from interface: WorkflowDocument
Returns whether a blank-approve action is a valid action.

Specified by:
isBlanketApproveCapable in interface WorkflowDocument
Returns:
whether a blank-approve action is a valid action.
See Also:
WorkflowDocument.getValidActions()

isRouteCapable

public boolean isRouteCapable()
Description copied from interface: WorkflowDocument
Returns whether a route action is a valid action.

Specified by:
isRouteCapable in interface WorkflowDocument
Returns:
whether a route action is a valid action.
See Also:
WorkflowDocument.getValidActions()

isValidAction

public boolean isValidAction(ActionType actionType)
Description copied from interface: WorkflowDocument
Returns whether the specified action type is valid

Specified by:
isValidAction in interface WorkflowDocument
Parameters:
actionType - the non-null ActionType to check
Returns:
whether the specified action type is valid
See Also:
WorkflowDocument.getValidActions()

superUserBlanketApprove

public void superUserBlanketApprove(String annotation)
Description copied from interface: WorkflowDocument
Performs a super-user blanket-approve action; commits updates. The current user must be a super-user for this document.

Specified by:
superUserBlanketApprove in interface WorkflowDocument
Parameters:
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.superUserBlanketApprove(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean)

superUserNodeApprove

public void superUserNodeApprove(String nodeName,
                                 String annotation)
Description copied from interface: WorkflowDocument
Performs a super-user approve action for the specified node; commits updates. The current user must be a super-user for this document.

Specified by:
superUserNodeApprove in interface WorkflowDocument
Parameters:
nodeName - the node to super-user approve
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.superUserNodeApprove(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean, String)

superUserTakeRequestedAction

public void superUserTakeRequestedAction(String actionRequestId,
                                         String annotation)
Description copied from interface: WorkflowDocument
Performs a super-user approve action for the specified node; commits updates. The current user must be a super-user for this document.

Specified by:
superUserTakeRequestedAction in interface WorkflowDocument
Parameters:
actionRequestId - the action request to satisfy/approve
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.superUserTakeRequestedAction(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean, String)

superUserDisapprove

public void superUserDisapprove(String annotation)
Description copied from interface: WorkflowDocument
Performs a super-user disapprove action; commits updates. The current user must be a super-user for this document.

Specified by:
superUserDisapprove in interface WorkflowDocument
Parameters:
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.superUserDisapprove(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean)

superUserCancel

public void superUserCancel(String annotation)
Description copied from interface: WorkflowDocument
Performs a super-user cancel action; commits updates. The current user must be a super-user for this document.

Specified by:
superUserCancel in interface WorkflowDocument
Parameters:
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.superUserCancel(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean)

superUserReturnToPreviousNode

public void superUserReturnToPreviousNode(ReturnPoint returnPoint,
                                          String annotation)
Description copied from interface: WorkflowDocument
Performs a super-user "return to previous node" action; commits updates. The current user must be a super-user for this document.

Specified by:
superUserReturnToPreviousNode in interface WorkflowDocument
Parameters:
returnPoint - the node to return to
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.superUserReturnToPreviousNode(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean, org.kuali.rice.kew.api.action.ReturnPoint)

complete

public void complete(String annotation)
Description copied from interface: WorkflowDocument
Completes the document, commits updates.

Specified by:
complete in interface WorkflowDocument
Parameters:
annotation - the document action annotation
See Also:
WorkflowDocumentActionsService.complete(org.kuali.rice.kew.api.action.DocumentActionParameters)

logAnnotation

public void logAnnotation(String annotation)
Description copied from interface: WorkflowDocument
Records a log action which adds an annotation on the document but does not affect routing. This action is stateless and does not cause a commit of document updates.

Specified by:
logAnnotation in interface WorkflowDocument
Parameters:
annotation - the annotation to log

getStatus

public DocumentStatus getStatus()
Description copied from interface: DocumentContract
Retrieve the document status

Specified by:
getStatus in interface DocumentContract
Returns:
the document status

checkStatus

public boolean checkStatus(DocumentStatus status)
Description copied from interface: WorkflowDocument
Helper that checks whether the document has the given status NOTE: does this really need to be in the public API? it only appears to be used internally

Specified by:
checkStatus in interface WorkflowDocument
Parameters:
status - the status to check
Returns:
whether the document status is the specified status
See Also:
DocumentContract.getStatus()

isInitiated

public boolean isInitiated()
Indicates if the document is in the initiated state or not.

Specified by:
isInitiated in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isSaved

public boolean isSaved()
Indicates if the document is in the saved state or not.

Specified by:
isSaved in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isEnroute

public boolean isEnroute()
Indicates if the document is in the enroute state or not.

Specified by:
isEnroute in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isException

public boolean isException()
Indicates if the document is in the exception state or not.

Specified by:
isException in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isCanceled

public boolean isCanceled()
Indicates if the document is in the canceled state or not.

Specified by:
isCanceled in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isRecalled

public boolean isRecalled()
Indicates if the document is in the recalled state or not.

Specified by:
isRecalled in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isDisapproved

public boolean isDisapproved()
Indicates if the document is in the disapproved state or not.

Specified by:
isDisapproved in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isApproved

public boolean isApproved()
Indicates if the document is in the Processed or Finalized state.

Specified by:
isApproved in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isProcessed

public boolean isProcessed()
Indicates if the document is in the processed state or not.

Specified by:
isProcessed in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isFinal

public boolean isFinal()
Indicates if the document is in the final state or not.

Specified by:
isFinal in interface WorkflowDocument
Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

getPrincipalId

public String getPrincipalId()
Returns the principalId with which this WorkflowDocument was constructed

Specified by:
getPrincipalId in interface WorkflowDocument
Returns:
the principalId with which this WorkflowDocument was constructed

switchPrincipal

public void switchPrincipal(String principalId)
Description copied from interface: WorkflowDocument
Switches the principalId under which WorkflowDocument API are performed. This method necessitates clearing of any state associated with the principalId such as requested and valid actions.

Specified by:
switchPrincipal in interface WorkflowDocument
Parameters:
principalId - the new principalId

takeGroupAuthority

public void takeGroupAuthority(String annotation,
                               String groupId)
Description copied from interface: WorkflowDocument
Takes authority of a group by a member of that group; commits updates.

Specified by:
takeGroupAuthority in interface WorkflowDocument
Parameters:
annotation - the routing annotation
groupId - the group for which to take authority
See Also:
WorkflowDocumentActionsService.takeGroupAuthority(org.kuali.rice.kew.api.action.DocumentActionParameters, String)

releaseGroupAuthority

public void releaseGroupAuthority(String annotation,
                                  String groupId)
Description copied from interface: WorkflowDocument
Releases authority of a group by a member of that group; commits updates.

Specified by:
releaseGroupAuthority in interface WorkflowDocument
Parameters:
annotation - the routing annotation
groupId - the group for which to take authority
See Also:
WorkflowDocumentActionsService.releaseGroupAuthority(org.kuali.rice.kew.api.action.DocumentActionParameters, String)

getNodeNames

public Set<String> getNodeNames()
Description copied from interface: WorkflowDocument
Returns the names of the route nodes on the document which are currently active.

If the document has completed its routing (i.e. it is in processed or final status) then this method may return an empty set since no nodes are active at that time. In order to get either the active *or* terminal nodes, use the WorkflowDocument.getCurrentNodeNames() method.

Specified by:
getNodeNames in interface WorkflowDocument
Returns:
an unmodifiable set containing the names of the active nodes for this document
See Also:
WorkflowDocument.getActiveRouteNodeInstances(), WorkflowDocumentService.getActiveRouteNodeInstances(String)

getCurrentNodeNames

public Set<String> getCurrentNodeNames()
Description copied from interface: WorkflowDocument
Returns the names of the nodes at which the document is currently at in it's route path.

This method differs from WorkflowDocument.getNodeNames() in the fact that if there are no active nodes, it will return the last nodes on the document instead (a.k.a. the document's terminal nodes).

Specified by:
getCurrentNodeNames in interface WorkflowDocument
Returns:
an unmodifiable set containing the names of the nodes at which this document is currently located within it's route path
See Also:
WorkflowDocument.getCurrentRouteNodeInstances(), WorkflowDocumentService.getCurrentRouteNodeInstances(String)

returnToPreviousNode

public void returnToPreviousNode(String annotation,
                                 String nodeName)
Description copied from interface: WorkflowDocument
Returns the document to a previous node; commits updates.

Specified by:
returnToPreviousNode in interface WorkflowDocument
Parameters:
annotation - the routing annotation
nodeName - the node to return to
See Also:
WorkflowDocumentActionsService.returnToPreviousNode(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.ReturnPoint)

returnToPreviousNode

public void returnToPreviousNode(String annotation,
                                 ReturnPoint returnPoint)
Description copied from interface: WorkflowDocument
Returns the document to a previous node; commits updates.

Specified by:
returnToPreviousNode in interface WorkflowDocument
Parameters:
annotation - the routing annotation
returnPoint - the node to return to
See Also:
WorkflowDocument.returnToPreviousNode(String, String), WorkflowDocumentActionsService.returnToPreviousNode(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.ReturnPoint)

move

public void move(MovePoint movePoint,
                 String annotation)
Description copied from interface: WorkflowDocument
Moves the document to a different node; commits updates.

Specified by:
move in interface WorkflowDocument
Parameters:
movePoint - the node to move to
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.move(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.MovePoint)

getActiveRouteNodeInstances

public List<RouteNodeInstance> getActiveRouteNodeInstances()
Description copied from interface: WorkflowDocument
Returns the list of active route node instances

Specified by:
getActiveRouteNodeInstances in interface WorkflowDocument
Returns:
the list of active route node instances
See Also:
WorkflowDocumentService.getActiveRouteNodeInstances(String)

getCurrentRouteNodeInstances

public List<RouteNodeInstance> getCurrentRouteNodeInstances()
Description copied from interface: WorkflowDocument
Returns the list of active route node instances

Specified by:
getCurrentRouteNodeInstances in interface WorkflowDocument
Returns:
the list of active route node instances
See Also:
WorkflowDocumentService.getCurrentRouteNodeInstances(String)

getRouteNodeInstances

public List<RouteNodeInstance> getRouteNodeInstances()
Description copied from interface: WorkflowDocument
Returns the flattened list of route node instances

Specified by:
getRouteNodeInstances in interface WorkflowDocument
Returns:
the flattened list of route node instances
See Also:
WorkflowDocumentService.getRouteNodeInstances(String)

getPreviousNodeNames

public List<String> getPreviousNodeNames()
Description copied from interface: WorkflowDocument
Returns the list of previous route node names

Specified by:
getPreviousNodeNames in interface WorkflowDocument
Returns:
the list of previous route node names
See Also:
WorkflowDocumentService.getPreviousRouteNodeNames(String)

getDocumentDetail

public DocumentDetail getDocumentDetail()
Description copied from interface: WorkflowDocument
Returns detailed document information TODO: consolidate with Document/ModifiableDocument or eliminate? currently bypasses locally cached Document data

Specified by:
getDocumentDetail in interface WorkflowDocument
Returns:
detailed document information
See Also:
WorkflowDocumentService.getDocumentDetail(String)

updateDocumentContent

public void updateDocumentContent(DocumentContentUpdate documentContentUpdate)
Description copied from interface: WorkflowDocument
Sets internal DocumentContentUpdate object TODO: exposes internal API and used only by tests, candidate for elimination?

Specified by:
updateDocumentContent in interface WorkflowDocument
Parameters:
documentContentUpdate - the DocumentContentUpdate to set

placeInExceptionRouting

public void placeInExceptionRouting(String annotation)
Description copied from interface: WorkflowDocument
Places the document in exception routing; commits updates.

Specified by:
placeInExceptionRouting in interface WorkflowDocument
Parameters:
annotation - the routing annotation
See Also:
WorkflowDocumentActionsService.placeInExceptionRouting(org.kuali.rice.kew.api.action.DocumentActionParameters)

setVariable

public void setVariable(String name,
                        String value)
Description copied from interface: WorkflowDocument
Sets a workflow variable. The update will be committed with the next document operation.

Specified by:
setVariable in interface WorkflowDocument
Parameters:
name - variable name
value - variable value
See Also:
DocumentContract.getVariables()

getVariableValue

public String getVariableValue(String name)
Description copied from interface: WorkflowDocument
Gets a workflow variable value.

Specified by:
getVariableValue in interface WorkflowDocument
Parameters:
name - variable name
See Also:
DocumentContract.getVariables()

setReceiveFutureRequests

public void setReceiveFutureRequests()
Description copied from interface: WorkflowDocument
Sets the workflow variable that specifies that this principal should receive future requests

Specified by:
setReceiveFutureRequests in interface WorkflowDocument
See Also:
KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_KEY, KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_VALUE

setDoNotReceiveFutureRequests

public void setDoNotReceiveFutureRequests()
Description copied from interface: WorkflowDocument
Sets the workflow variable that specifies that this principal should NOT receive future requests

Specified by:
setDoNotReceiveFutureRequests in interface WorkflowDocument
See Also:
KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_KEY, KewApiConstants.DONT_RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_VALUE

setClearFutureRequests

public void setClearFutureRequests()
Description copied from interface: WorkflowDocument
Sets the workflow variable that specifies that ... TODO: what does this do? (org.kuali.rice.kew.util.FutureRequestDocumentStateManager#clearStateFromDocument)

Specified by:
setClearFutureRequests in interface WorkflowDocument
See Also:
KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_KEY, KewApiConstants.CLEAR_FUTURE_REQUESTS_BRANCH_STATE_VALUE

getFutureRequestsKey

protected String getFutureRequestsKey(String principalId)

getReceiveFutureRequestsValue

public String getReceiveFutureRequestsValue()
Description copied from interface: WorkflowDocument
Returns whether the workflow variable that specifies that this principal should receive future requests has been set

Specified by:
getReceiveFutureRequestsValue in interface WorkflowDocument
Returns:
whether the workflow variable that specifies that this principal should receive future requests has been set
See Also:
WorkflowDocument.setReceiveFutureRequests()

getDoNotReceiveFutureRequestsValue

public String getDoNotReceiveFutureRequestsValue()
Description copied from interface: WorkflowDocument
Returns whether the workflow variable that specifies that this principal should NOT receive future requests has been set

Specified by:
getDoNotReceiveFutureRequestsValue in interface WorkflowDocument
Returns:
whether the workflow variable that specifies that this principal should NOT receive future requests has been set
See Also:
WorkflowDocument.setDoNotReceiveFutureRequests()

getClearFutureRequestsValue

public String getClearFutureRequestsValue()
Description copied from interface: WorkflowDocument
Returns whether the workflow variable that specifies that ... has been set

Specified by:
getClearFutureRequestsValue in interface WorkflowDocument
Returns:
whether the workflow variable that specifies that ... has been set

constructDocumentActionParameters

protected DocumentActionParameters constructDocumentActionParameters(String annotation)

getDateLastModified

public org.joda.time.DateTime getDateLastModified()
Description copied from interface: DocumentContract
Retrieve the document last-modified date

Specified by:
getDateLastModified in interface DocumentContract
Returns:
the document last-modified date or null

getDateApproved

public org.joda.time.DateTime getDateApproved()
Description copied from interface: DocumentContract
Retrieve the document approval date

Specified by:
getDateApproved in interface DocumentContract
Returns:
the document approval date or null

getDateFinalized

public org.joda.time.DateTime getDateFinalized()
Description copied from interface: DocumentContract
Retrieve the document finalization date

Specified by:
getDateFinalized in interface DocumentContract
Returns:
the document finalization date or null

getInitiatorPrincipalId

public String getInitiatorPrincipalId()
Description copied from interface: DocumentContract
Retrieve the initiator principal id

Specified by:
getInitiatorPrincipalId in interface DocumentContract
Returns:
the initiator principal id

getRoutedByPrincipalId

public String getRoutedByPrincipalId()
Description copied from interface: DocumentContract
Retrieve the router principal id

Specified by:
getRoutedByPrincipalId in interface DocumentContract
Returns:
the router principal id

getDocumentTypeId

public String getDocumentTypeId()
Description copied from interface: DocumentContract
Retrieve the id of the type of this document

Specified by:
getDocumentTypeId in interface DocumentContract
Returns:
the id of the type of this document

getDocumentHandlerUrl

public String getDocumentHandlerUrl()
Description copied from interface: DocumentContract
Retrieve the document handler url

Specified by:
getDocumentHandlerUrl in interface DocumentContract
Returns:
the document handler url

getApplicationDocumentStatus

public String getApplicationDocumentStatus()
Description copied from interface: DocumentContract
Retrieve the application document status. The Application Document Status is used to track document/applicaiton specific statuses

Specified by:
getApplicationDocumentStatus in interface DocumentContract
Returns:
the application document status

getApplicationDocumentStatusDate

public org.joda.time.DateTime getApplicationDocumentStatusDate()
Description copied from interface: DocumentContract
Retrieve the last application document status transition date. The Application Document Status date is the date the application document status last transitioned.

Specified by:
getApplicationDocumentStatusDate in interface DocumentContract
Returns:
the application document status date

getVariables

public Map<String,String> getVariables()
Description copied from interface: DocumentContract
Retrieve the currently defined internal workflow engine variables for the document NOTE: use of workflow engine variables is an advanced technique requiring specific crafting of the workflow document routing; these variables will not be useful for the majority of workflow use cases

Specified by:
getVariables in interface DocumentContract
Returns:
the currently defined workflow engine variables for the document


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.