Class DocumentRouteHeaderValue
- All Implemented Interfaces:
Serializable,Cloneable,org.eclipse.persistence.descriptors.changetracking.ChangeTracker,org.eclipse.persistence.internal.descriptors.PersistenceEntity,org.eclipse.persistence.internal.descriptors.PersistenceObject,org.eclipse.persistence.internal.weaving.PersistenceWeaved,org.eclipse.persistence.internal.weaving.PersistenceWeavedChangeTracking,org.eclipse.persistence.internal.weaving.PersistenceWeavedFetchGroups,org.eclipse.persistence.internal.weaving.PersistenceWeavedRest,org.eclipse.persistence.queries.FetchGroupTracker,org.kuali.rice.core.api.mo.common.GloballyUnique,org.kuali.rice.core.api.mo.common.Versioned,org.kuali.rice.core.api.mo.ModelObjectBasic,org.kuali.rice.kew.api.document.DocumentContract,DocumentSearchCriteriaEbo,org.kuali.rice.krad.bo.BusinessObject,org.kuali.rice.krad.bo.ExternalizableBusinessObject
DocumentType and follows
the route path defined by that DocumentType.
During a document's lifecycle it progresses through a series of statuses, starting
with INITIATED and moving to one of the terminal states (such as FINAL, CANCELED, etc).
The list of status on a document are defined in the KewApiConstants class and
include the constants starting with "ROUTE_HEADER_" and ending with "_CD".
Associated with the document is the document content. The document content is XML which represents the content of that document. This XML content is typically used to make routing decisions for the document.
A document has associated with it a set of ActionRequestValue object and
ActionTakenValue objects. Action Requests represent requests for user
action (such as Approve, Acknowledge, etc). Action Takens represent action that
users have performed on the document, such as approvals or cancelling of the document.
The instantiated route path of a document is defined by it's graph of
RouteNodeInstance objects. The path starts at the initial node of the document
and progresses from there following the next nodes of each node instance. The current
active nodes on the document are defined by the "active" flag on the node instance
where are not marked as "complete".
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsFields inherited from class org.kuali.rice.krad.bo.DataObjectBase
_persistence_cacheKey, _persistence_fetchGroup, _persistence_href, _persistence_links, _persistence_listener, _persistence_primaryKey, _persistence_relationshipInfo, _persistence_session, _persistence_shouldRefreshFetchGroup, objectId, versionNumber -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDocumentUpdate(org.kuali.rice.kew.api.document.DocumentUpdate documentUpdate) copy(boolean preserveKeys) static DocumentRouteHeaderValuefrom(org.kuali.rice.kew.api.document.Document document) This method returns the Application Document Status.org.joda.time.DateTimeThis method returns a combination of the route status label and the app doc status.org.joda.time.DateTimeorg.joda.time.DateTimeorg.joda.time.DateTimeorg.joda.time.DateTimegetDocActionItem(int index) getDocActionRequest(int index) getDocActionTaken(int index) This method returns the Document Status Policy for the document type associated with this Route Header.org.kuali.rice.kim.api.identity.principal.PrincipalgetNotes()Convenience method that returns the branch of the first (and presumably only?)org.kuali.rice.kim.api.identity.principal.Principalorg.kuali.rice.kew.api.document.DocumentStatusgetTitle()getVariable(String name) Gets a variablebooleanbooleanbooleanbooleanisFinal()booleanbooleanbooleanbooleanisRouted()booleanbooleanbooleanbooleanisValidActionToTake(String actionCd) Return true if the given action code is valid for this document's current state.booleanisValidStatusChange(String newStatus) voidMark document cancled.voidMark document disapprovedvoidMark the document as being actively routed.voidMark document finalized.voidMark the document as being in the exception state.voidMark the document as being processed.voidMark document recalled.voidMark document savedvoidrefresh()voidvoidsetAppDocId(String appDocId) voidsetAppDocStatus(String appDocStatus) voidsetAppDocStatusDate(Timestamp appDocStatusDate) voidsetAppDocStatusHistory(List<DocumentStatusTransition> appDocStatusHistory) voidsetApprovedDate(Timestamp approvedDate) voidsetCreateDate(Timestamp createDate) voidsetDateModified(Timestamp dateModified) voidsetDocContent(String docContent) voidsetDocRouteLevel(Integer docRouteLevel) voidsetDocRouteStatus(String docRouteStatus) voidsetDocTitle(String docTitle) voidsetDocumentContent(DocumentRouteHeaderValueContent documentContent) voidsetDocumentId(String documentId) voidsetDocumentTypeId(String documentTypeId) voidsetDocVersion(Integer docVersion) voidsetFinalizedDate(Timestamp finalizedDate) voidsetInitialRouteNodeInstances(List<RouteNodeInstance> initialRouteNodeInstances) voidsetInitiatorWorkflowId(String initiatorWorkflowId) voidvoidsetRoutedByUserWorkflowId(String routedByUserWorkflowId) voidsetRouteHeaderData(org.kuali.rice.kew.api.document.Document routeHeaderVO) This method takes data from a VO and sets it on this route headervoidsetRouteStatus(String newStatus, boolean finalState) voidsetRouteStatusDate(Timestamp routeStatusDate) voidsetRoutingReport(boolean routingReport) voidsetSimulatedActionRequests(List<ActionRequestValue> simulatedActionRequests) voidsetVariable(String name, String value) Sets a variablestatic org.kuali.rice.kew.api.document.Documentto(DocumentRouteHeaderValue documentBo) voidupdateAppDocStatus(String appDocStatus) This method sets the appDocStatus.Methods inherited from class org.kuali.rice.krad.bo.DataObjectBase
_persistence_checkFetched, _persistence_checkFetchedForSet, _persistence_get, _persistence_get_objectId, _persistence_get_versionNumber, _persistence_getCacheKey, _persistence_getFetchGroup, _persistence_getHref, _persistence_getId, _persistence_getLinks, _persistence_getPropertyChangeListener, _persistence_getRelationships, _persistence_getSession, _persistence_isAttributeFetched, _persistence_new, _persistence_post_clone, _persistence_propertyChange, _persistence_resetFetchGroup, _persistence_set, _persistence_set_objectId, _persistence_set_versionNumber, _persistence_setCacheKey, _persistence_setFetchGroup, _persistence_setHref, _persistence_setId, _persistence_setLinks, _persistence_setPropertyChangeListener, _persistence_setRelationships, _persistence_setSession, _persistence_setShouldRefreshFetchGroup, _persistence_shallow_clone, _persistence_shouldRefreshFetchGroup, generateAndSetObjectIdIfNeeded, getExtensionObject, getObjectId, getVersionNumber, prePersist, preUpdate, setExtensionObject, setObjectId, setVersionNumber, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
-
Field Details
-
legalActions
-
stateTransitionMap
-
CURRENT_ROUTE_NODE_NAME_DELIMITER
- See Also:
-
-
Constructor Details
-
DocumentRouteHeaderValue
public DocumentRouteHeaderValue()
-
-
Method Details
-
getInitiatorPrincipal
public org.kuali.rice.kim.api.identity.principal.Principal getInitiatorPrincipal() -
getRoutedByPrincipal
public org.kuali.rice.kim.api.identity.principal.Principal getRoutedByPrincipal() -
getInitiatorDisplayName
-
getRoutedByDisplayName
-
getCurrentRouteLevelName
-
getCurrentNodeNames
-
getRouteStatusLabel
-
getDocRouteStatusLabel
-
getDocStatusPolicy
This method returns the Document Status Policy for the document type associated with this Route Header. The Document Status Policy denotes whether the KEW Route Status, or the Application Document Status, or both are to be displayed.- Returns:
-
getActionItems
-
getActionsTaken
-
getActionRequests
-
getSimulatedActionRequests
-
setSimulatedActionRequests
-
getDocumentType
-
getAppDocId
-
setAppDocId
-
getApprovedDate
-
setApprovedDate
-
getCreateDate
-
setCreateDate
-
getDocContent
-
setDocContent
-
getDocRouteLevel
-
setDocRouteLevel
-
getDocRouteStatus
-
setDocRouteStatus
-
getDocTitle
-
setDocTitle
-
getDocumentTypeId
- Specified by:
getDocumentTypeIdin interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
setDocumentTypeId
-
getDocVersion
-
setDocVersion
-
getFinalizedDate
-
setFinalizedDate
-
getInitiatorWorkflowId
-
setInitiatorWorkflowId
-
getRoutedByUserWorkflowId
-
setRoutedByUserWorkflowId
-
getDocumentId
- Specified by:
getDocumentIdin interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getDocumentIdin interfaceDocumentSearchCriteriaEbo
-
setDocumentId
-
getRouteStatusDate
-
setRouteStatusDate
-
getDateModified
-
setDateModified
-
getAppDocStatus
This method returns the Application Document Status. This status is an alternative to the Route Status that may be used for a document. It is configurable per document type.- Returns:
- See Also:
-
setAppDocStatus
-
getCombinedStatus
This method returns a combination of the route status label and the app doc status.- Returns:
-
updateAppDocStatus
public void updateAppDocStatus(String appDocStatus) throws org.kuali.rice.kew.api.WorkflowRuntimeException This method sets the appDocStatus. It firsts validates the new value against the defined acceptable values, if defined. It also updates the AppDocStatus date, and saves the status transition information- Parameters:
appDocStatus-- Throws:
org.kuali.rice.kew.api.WorkflowRuntimeException
-
getAppDocStatusDate
-
setAppDocStatusDate
-
copy
-
isStateInitiated
public boolean isStateInitiated()- Returns:
- True if the document is in the state of Initiated
-
isStateSaved
public boolean isStateSaved()- Returns:
- True if the document is in the state of Saved
-
isRouted
public boolean isRouted()- Returns:
- true if the document has ever been inte enroute state
-
isInException
public boolean isInException() -
isDisaproved
public boolean isDisaproved() -
isCanceled
public boolean isCanceled() -
isFinal
public boolean isFinal() -
isEnroute
public boolean isEnroute() -
isProcessed
public boolean isProcessed()- Returns:
- true if the document is in the processed state
-
isRoutable
public boolean isRoutable() -
isValidActionToTake
Return true if the given action code is valid for this document's current state. This method only verifies statically defined action/state transitions, it does not perform full action validation logic.- Parameters:
actionCd- The action code to be tested.- Returns:
- True if the action code is valid for the document's status.
- See Also:
-
isValidStatusChange
-
setRouteStatus
public void setRouteStatus(String newStatus, boolean finalState) throws org.kuali.rice.kew.api.exception.InvalidActionTakenException - Throws:
org.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentProcessed
public void markDocumentProcessed() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark the document as being processed.- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentCanceled
public void markDocumentCanceled() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark document cancled.- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentRecalled
public void markDocumentRecalled() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark document recalled.- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentDisapproved
public void markDocumentDisapproved() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark document disapproved- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentSaved
public void markDocumentSaved() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark document saved- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentInException
public void markDocumentInException() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark the document as being in the exception state.- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentEnroute
public void markDocumentEnroute() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark the document as being actively routed.- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
markDocumentFinalized
public void markDocumentFinalized() throws org.kuali.rice.kew.api.exception.InvalidActionTakenExceptionMark document finalized.- Throws:
org.kuali.rice.kew.api.exception.ResourceUnavailableExceptionorg.kuali.rice.kew.api.exception.InvalidActionTakenException
-
setRouteHeaderData
public void setRouteHeaderData(org.kuali.rice.kew.api.document.Document routeHeaderVO) throws org.kuali.rice.kew.api.exception.WorkflowException This method takes data from a VO and sets it on this route header- Parameters:
routeHeaderVO-- Throws:
org.kuali.rice.kew.api.exception.WorkflowException
-
applyDocumentUpdate
public void applyDocumentUpdate(org.kuali.rice.kew.api.document.DocumentUpdate documentUpdate) -
getRootBranch
Convenience method that returns the branch of the first (and presumably only?) initial node- Returns:
- the branch of the first (and presumably only?) initial node
-
getVariable
Gets a variable- Parameters:
name- variable name- Returns:
- variable value, or null if variable is not defined
-
removeVariableThatContains
-
setVariable
Sets a variable- Parameters:
name- variable namevalue- variable value, or null if variable should be removed
-
getRootBranchState
-
getCustomActionListAttribute
public CustomActionListAttribute getCustomActionListAttribute() throws org.kuali.rice.kew.api.exception.WorkflowException- Throws:
org.kuali.rice.kew.api.exception.WorkflowException
-
getCustomEmailAttribute
public CustomEmailAttribute getCustomEmailAttribute() throws org.kuali.rice.kew.api.exception.WorkflowException- Throws:
org.kuali.rice.kew.api.exception.WorkflowException
-
getCustomNoteAttribute
public CustomNoteAttribute getCustomNoteAttribute() throws org.kuali.rice.kew.api.exception.WorkflowException- Throws:
org.kuali.rice.kew.api.exception.WorkflowException
-
getDocActionRequest
-
getDocActionTaken
-
getDocActionItem
-
isRoutingReport
public boolean isRoutingReport() -
setRoutingReport
public void setRoutingReport(boolean routingReport) -
getInitialRouteNodeInstances
-
setInitialRouteNodeInstances
-
getNotes
-
setNotes
-
getDocumentContent
-
setDocumentContent
-
getAppDocStatusHistory
-
setAppDocStatusHistory
-
getStatus
public org.kuali.rice.kew.api.document.DocumentStatus getStatus()- Specified by:
getStatusin interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getStatusin interfaceDocumentSearchCriteriaEbo
-
getDateCreated
public org.joda.time.DateTime getDateCreated()- Specified by:
getDateCreatedin interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getDateCreatedin interfaceDocumentSearchCriteriaEbo
-
getDateLastModified
public org.joda.time.DateTime getDateLastModified()- Specified by:
getDateLastModifiedin interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
getDateApproved
public org.joda.time.DateTime getDateApproved()- Specified by:
getDateApprovedin interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
getDateFinalized
public org.joda.time.DateTime getDateFinalized()- Specified by:
getDateFinalizedin interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
getTitle
- Specified by:
getTitlein interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getTitlein interfaceDocumentSearchCriteriaEbo
-
getApplicationDocumentId
- Specified by:
getApplicationDocumentIdin interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getApplicationDocumentIdin interfaceDocumentSearchCriteriaEbo
-
getInitiatorPrincipalId
- Specified by:
getInitiatorPrincipalIdin interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getInitiatorPrincipalIdin interfaceDocumentSearchCriteriaEbo
-
getRoutedByPrincipalId
- Specified by:
getRoutedByPrincipalIdin interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
getDocumentTypeName
- Specified by:
getDocumentTypeNamein interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getDocumentTypeNamein interfaceDocumentSearchCriteriaEbo
-
getDocumentHandlerUrl
- Specified by:
getDocumentHandlerUrlin interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
getApplicationDocumentStatus
- Specified by:
getApplicationDocumentStatusin interfaceorg.kuali.rice.kew.api.document.DocumentContract- Specified by:
getApplicationDocumentStatusin interfaceDocumentSearchCriteriaEbo
-
getApplicationDocumentStatusDate
public org.joda.time.DateTime getApplicationDocumentStatusDate()- Specified by:
getApplicationDocumentStatusDatein interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
getVariables
- Specified by:
getVariablesin interfaceorg.kuali.rice.kew.api.document.DocumentContract
-
to
-
from
-
refresh
public void refresh()- Specified by:
refreshin interfaceorg.kuali.rice.krad.bo.BusinessObject
-
deepCopy
-