org.kuali.rice.kew.actionrequest
Class ActionRequestValue

java.lang.Object
  extended by org.kuali.rice.kew.actionrequest.ActionRequestValue
All Implemented Interfaces:
Serializable

@Entity
public class ActionRequestValue
extends Object
implements Serializable

Bean mapped to DB. Represents ActionRequest to a workgroup, user or role. Contains references to children/parent if a member of a graph

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Constructor Summary
ActionRequestValue()
           
 
Method Summary
 void beforeInsert()
           
static int compareActionCode(String code1, String code2, boolean completeAndApproveTheSame)
          Allows comparison of action requests to see which is greater responsibility.
static int compareDelegationType(DelegationType type1, DelegationType type2)
           
static int compareRecipientType(String type1, String type2)
          Allows comparison of action requests to see which is greater responsibility.
static ActionRequestValue from(ActionRequest actionRequest)
          TODO - this javadoc copied from DTOConverter, needs to be updated! Converts an ActionRequestVO to an ActionRequest.
static ActionRequestValue from(ActionRequest actionRequest, DTOConverter.RouteNodeInstanceLoader routeNodeInstanceLoader)
          Converts an ActionRequestVO to an ActionRequest.
 List<ActionItem> getActionItems()
           
 String getActionRequested()
           
 String getActionRequestedLabel()
           
 String getActionRequestId()
           
 ActionTakenValue getActionTaken()
           
 String getActionTakenId()
           
 String getAnnotation()
           
 String getApprovePolicy()
           
 List<ActionRequestValue> getChildrenRequests()
           
 Timestamp getCreateDate()
           
 String getCreateDateString()
           
 Boolean getCurrentIndicator()
           
 DelegationType getDelegationType()
           
 String getDelegationTypeCode()
           
 String getDisplayName()
           
 String getDisplayStatus()
           
 String getDocumentId()
           
 Integer getDocVersion()
           
 Boolean getForceAction()
           
 Group getGroup()
           
 String getGroupId()
           
 String getGroupName()
           
 boolean getHasApprovePolicy()
           
 Integer getJrfVerNbr()
           
 RouteNodeInstance getNodeInstance()
           
 ActionRequestValue getParentActionRequest()
           
 String getParentActionRequestId()
           
 Person getPerson()
           
 String getPotentialNodeName()
           
 List<ActionRequestValue> getPrimaryDelegateRequests()
          Used to get primary delegate names on route log in the 'Requested Of' section so primary delegate requests list the delegate and not the delegator as having the request 'IN ACTION LIST'.
 Principal getPrincipal()
           
 String getPrincipalId()
           
 Integer getPriority()
           
 String getQualifiedRoleName()
           
 String getQualifiedRoleNameLabel()
           
 Recipient getRecipient()
           
 String getRecipientTypeCd()
           
 String getRecipientTypeLabel()
           
 String getRequestLabel()
           
 boolean getResolveResponsibility()
           
 String getResponsibilityDesc()
           
 String getResponsibilityId()
           
 String getRoleName()
           
 DocumentRouteHeaderValue getRouteHeader()
           
 Integer getRouteLevel()
           
 String getRouteLevelName()
           
 RuleBaseValues getRuleBaseValues()
           
 String getRuleBaseValuesId()
           
 List<ActionItem> getSimulatedActionItems()
           
 String getStatus()
           
 String getStatusLabel()
           
 boolean hasChild(ActionRequestValue actionRequest)
           
 boolean hasParent()
           
 boolean isAcknowledgeRequest()
           
 boolean isActive()
           
 boolean isAdHocRequest()
           
 boolean isApproveOrCompleteRequest()
           
 boolean isApproveRequest()
           
 boolean isCompleteRequst()
           
 boolean isDeactivated()
           
 boolean isDone()
           
 boolean isExceptionRequest()
           
 boolean isFYIRequest()
           
 boolean isGeneratedRequest()
           
 boolean isGroupRequest()
           
 boolean isInitialized()
           
 boolean isPending()
           
 boolean isPrimaryDelegator()
           
 boolean isRecipientRoutedRequest(Recipient recipient)
           
 boolean isRecipientRoutedRequest(String principalId)
           
 boolean isReviewerUser()
           
 boolean isRoleRequest()
           
 boolean isRouteModuleRequest()
           
 boolean isUserRequest()
           
 void setActionRequested(String actionRequested)
           
 void setActionRequestId(String actionRequestId)
           
 void setActionTaken(ActionTakenValue actionTaken)
           
 void setActionTakenId(String actionTakenId)
           
 void setAnnotation(String annotation)
           
 void setApprovePolicy(String requestType)
           
 void setChildrenRequests(List<ActionRequestValue> childrenRequests)
           
 void setCreateDate(Timestamp createDate)
           
 void setCreateDateString(String createDateString)
           
 void setCurrentIndicator(Boolean currentIndicator)
           
 void setDelegationType(DelegationType delegationPolicy)
           
 void setDelegationTypeCode(String delegationTypeCode)
           
 void setDisplayStatus(String displayStatus)
           
 void setDocumentId(String documentId)
           
 void setDocVersion(Integer docVersion)
           
 void setForceAction(Boolean forceAction)
           
 void setGroupId(String groupId)
           
 void setJrfVerNbr(Integer jrfVerNbr)
           
 void setNodeInstance(RouteNodeInstance nodeInstance)
           
 void setParentActionRequest(ActionRequestValue parentActionRequest)
           
 void setParentActionRequestId(String parentActionRequestId)
           
 void setPrincipalId(String principalId)
           
 void setPriority(Integer priority)
           
 void setQualifiedRoleName(String roleName)
           
 void setQualifiedRoleNameLabel(String qualifiedRoleNameLabel)
           
 void setRecipientTypeCd(String recipientTypeCd)
           
 void setRequestLabel(String requestLabel)
           
 void setResolveResponsibility(boolean resolveResponsibility)
           
 void setResponsibilityDesc(String responsibilityDesc)
           
 void setResponsibilityId(String responsibilityId)
           
 void setRoleName(String roleName)
           
 void setRouteHeader(DocumentRouteHeaderValue routeHeader)
           
 void setRouteLevel(Integer routeLevel)
           
 void setRuleBaseValuesId(String ruleBaseValuesId)
           
 void setSimulatedActionItems(List<ActionItem> simulatedActionItems)
           
 void setStatus(String status)
           
static ActionRequest to(ActionRequestValue actionRequestBo)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionRequestValue

public ActionRequestValue()
Method Detail

beforeInsert

public void beforeInsert()

getGroup

public Group getGroup()

getRouteLevelName

public String getRouteLevelName()

isUserRequest

public boolean isUserRequest()

getPrincipal

public Principal getPrincipal()

getPerson

public Person getPerson()

getDisplayName

public String getDisplayName()

getRecipient

public Recipient getRecipient()

isPending

public boolean isPending()

getStatusLabel

public String getStatusLabel()

getActionRequestedLabel

public String getActionRequestedLabel()

getActionTaken

public ActionTakenValue getActionTaken()
Returns:
Returns the actionTaken.

setActionTaken

public void setActionTaken(ActionTakenValue actionTaken)
Parameters:
actionTaken - The actionTaken to set.

getActionRequested

public String getActionRequested()
Returns:
Returns the actionRequested.

setActionRequested

public void setActionRequested(String actionRequested)
Parameters:
actionRequested - The actionRequested to set.

getActionRequestId

public String getActionRequestId()
Returns:
Returns the actionRequestId.

setActionRequestId

public void setActionRequestId(String actionRequestId)
Parameters:
actionRequestId - The actionRequestId to set.

getActionTakenId

public String getActionTakenId()
Returns:
Returns the actionTakenId.

setActionTakenId

public void setActionTakenId(String actionTakenId)
Parameters:
actionTakenId - The actionTakenId to set.

getAnnotation

public String getAnnotation()
Returns:
Returns the annotation.

setAnnotation

public void setAnnotation(String annotation)
Parameters:
annotation - The annotation to set.

getCreateDate

public Timestamp getCreateDate()
Returns:
Returns the createDate.

setCreateDate

public void setCreateDate(Timestamp createDate)
Parameters:
createDate - The createDate to set.

getDocVersion

public Integer getDocVersion()
Returns:
Returns the docVersion.

setDocVersion

public void setDocVersion(Integer docVersion)
Parameters:
docVersion - The docVersion to set.

getPrincipalId

public String getPrincipalId()

setPrincipalId

public void setPrincipalId(String principalId)

getForceAction

public Boolean getForceAction()
Returns:
Returns the forceAction.

setForceAction

public void setForceAction(Boolean forceAction)
Parameters:
forceAction - The forceAction to set.

getJrfVerNbr

public Integer getJrfVerNbr()
Returns:
Returns the jrfVerNbr.

setJrfVerNbr

public void setJrfVerNbr(Integer jrfVerNbr)
Parameters:
jrfVerNbr - The jrfVerNbr to set.

getPriority

public Integer getPriority()
Returns:
Returns the priority.

setPriority

public void setPriority(Integer priority)
Parameters:
priority - The priority to set.

getRecipientTypeCd

public String getRecipientTypeCd()
Returns:
Returns the recipientTypeCd.

setRecipientTypeCd

public void setRecipientTypeCd(String recipientTypeCd)
Parameters:
recipientTypeCd - The recipientTypeCd to set.

getResponsibilityDesc

public String getResponsibilityDesc()
Returns:
Returns the responsibilityDesc.

setResponsibilityDesc

public void setResponsibilityDesc(String responsibilityDesc)
Parameters:
responsibilityDesc - The responsibilityDesc to set.

getResponsibilityId

public String getResponsibilityId()
Returns:
Returns the responsibilityId.

setResponsibilityId

public void setResponsibilityId(String responsibilityId)
Parameters:
responsibilityId - The responsibilityId to set.

getDocumentId

public String getDocumentId()
Returns:
Returns the documentId.

setDocumentId

public void setDocumentId(String documentId)

getRouteLevel

public Integer getRouteLevel()

setRouteLevel

public void setRouteLevel(Integer routeLevel)

getStatus

public String getStatus()

setStatus

public void setStatus(String status)

getGroupId

public String getGroupId()

setGroupId

public void setGroupId(String groupId)

isInitialized

public boolean isInitialized()

isActive

public boolean isActive()

isApproveOrCompleteRequest

public boolean isApproveOrCompleteRequest()

isDone

public boolean isDone()

isReviewerUser

public boolean isReviewerUser()

isRecipientRoutedRequest

public boolean isRecipientRoutedRequest(String principalId)

isRecipientRoutedRequest

public boolean isRecipientRoutedRequest(Recipient recipient)

isGroupRequest

public boolean isGroupRequest()

isRoleRequest

public boolean isRoleRequest()

isAcknowledgeRequest

public boolean isAcknowledgeRequest()

isApproveRequest

public boolean isApproveRequest()

isCompleteRequst

public boolean isCompleteRequst()

isFYIRequest

public boolean isFYIRequest()

compareActionCode

public static int compareActionCode(String code1,
                                    String code2,
                                    boolean completeAndApproveTheSame)
Allows comparison of action requests to see which is greater responsibility. -1 : indicates code 1 is lesser responsibility than code 2 0 : indicates the same responsibility 1 : indicates code1 is greater responsibility than code 2 The priority of action requests is as follows: fyi < acknowledge < (approve == complete)

Parameters:
code1 -
code2 -
completeAndApproveTheSame -
Returns:
-1 if less than, 0 if equal, 1 if greater than

compareRecipientType

public static int compareRecipientType(String type1,
                                       String type2)
Allows comparison of action requests to see which is greater responsibility. -1 : indicates type 1 is lesser responsibility than type 2 0 : indicates the same responsibility 1 : indicates type1 is greater responsibility than type 2

Parameters:
type1 -
type2 -
Returns:
-1 if less than, 0 if equal, 1 if greater than

compareDelegationType

public static int compareDelegationType(DelegationType type1,
                                        DelegationType type2)

getActionItems

public List<ActionItem> getActionItems()

getSimulatedActionItems

public List<ActionItem> getSimulatedActionItems()

setSimulatedActionItems

public void setSimulatedActionItems(List<ActionItem> simulatedActionItems)

getCurrentIndicator

public Boolean getCurrentIndicator()

setCurrentIndicator

public void setCurrentIndicator(Boolean currentIndicator)

getParentActionRequestId

public String getParentActionRequestId()

setParentActionRequestId

public void setParentActionRequestId(String parentActionRequestId)

getParentActionRequest

public ActionRequestValue getParentActionRequest()

setParentActionRequest

public void setParentActionRequest(ActionRequestValue parentActionRequest)

getChildrenRequests

public List<ActionRequestValue> getChildrenRequests()

setChildrenRequests

public void setChildrenRequests(List<ActionRequestValue> childrenRequests)

getQualifiedRoleName

public String getQualifiedRoleName()

setQualifiedRoleName

public void setQualifiedRoleName(String roleName)

getDelegationType

public DelegationType getDelegationType()

setDelegationType

public void setDelegationType(DelegationType delegationPolicy)

getDelegationTypeCode

public String getDelegationTypeCode()

setDelegationTypeCode

public void setDelegationTypeCode(String delegationTypeCode)

getRoleName

public String getRoleName()

setRoleName

public void setRoleName(String roleName)

getApprovePolicy

public String getApprovePolicy()

setApprovePolicy

public void setApprovePolicy(String requestType)

getHasApprovePolicy

public boolean getHasApprovePolicy()

isDeactivated

public boolean isDeactivated()

hasParent

public boolean hasParent()

hasChild

public boolean hasChild(ActionRequestValue actionRequest)

getDisplayStatus

public String getDisplayStatus()

setDisplayStatus

public void setDisplayStatus(String displayStatus)

getQualifiedRoleNameLabel

public String getQualifiedRoleNameLabel()

setQualifiedRoleNameLabel

public void setQualifiedRoleNameLabel(String qualifiedRoleNameLabel)

getCreateDateString

public String getCreateDateString()

setCreateDateString

public void setCreateDateString(String createDateString)

getNodeInstance

public RouteNodeInstance getNodeInstance()

getPotentialNodeName

public String getPotentialNodeName()

setNodeInstance

public void setNodeInstance(RouteNodeInstance nodeInstance)

getRecipientTypeLabel

public String getRecipientTypeLabel()

getRuleBaseValues

public RuleBaseValues getRuleBaseValues()

getRuleBaseValuesId

public String getRuleBaseValuesId()

setRuleBaseValuesId

public void setRuleBaseValuesId(String ruleBaseValuesId)

isPrimaryDelegator

public boolean isPrimaryDelegator()

getPrimaryDelegateRequests

public List<ActionRequestValue> getPrimaryDelegateRequests()
Used to get primary delegate names on route log in the 'Requested Of' section so primary delegate requests list the delegate and not the delegator as having the request 'IN ACTION LIST'. This method doesn't recurse and therefore assume an AR structure.

Returns:
primary delgate requests

isAdHocRequest

public boolean isAdHocRequest()

isGeneratedRequest

public boolean isGeneratedRequest()

isExceptionRequest

public boolean isExceptionRequest()

isRouteModuleRequest

public boolean isRouteModuleRequest()

toString

public String toString()
Overrides:
toString in class Object

getRequestLabel

public String getRequestLabel()

setRequestLabel

public void setRequestLabel(String requestLabel)

getGroupName

public String getGroupName()

getResolveResponsibility

public boolean getResolveResponsibility()
Returns:
the resolveResponsibility

setResolveResponsibility

public void setResolveResponsibility(boolean resolveResponsibility)
Parameters:
resolveResponsibility - the resolveResponsibility to set

getRouteHeader

public DocumentRouteHeaderValue getRouteHeader()

setRouteHeader

public void setRouteHeader(DocumentRouteHeaderValue routeHeader)

to

public static ActionRequest to(ActionRequestValue actionRequestBo)

from

public static ActionRequestValue from(ActionRequest actionRequest)
TODO - this javadoc copied from DTOConverter, needs to be updated! Converts an ActionRequestVO to an ActionRequest. The ActionRequestDTO passed in must be the root action request in the graph, otherwise an IllegalArgumentException is thrown. This is to avoid potentially sticky issues with circular references in the conversion. NOTE: This method's primary purpose is to convert ActionRequestVOs returned from a RouteModule. Incidentally, the DTO's returned from the route module will be lacking some information (like the node instance) so no attempts are made to convert this data since further initialization is handled by a higher level component (namely ActionRequestService.initializeActionRequestGraph).


from

public static ActionRequestValue from(ActionRequest actionRequest,
                                      DTOConverter.RouteNodeInstanceLoader routeNodeInstanceLoader)
Converts an ActionRequestVO to an ActionRequest. The ActionRequestDTO passed in must be the root action request in the graph, otherwise an IllegalArgumentException is thrown. This is to avoid potentially sticky issues with circular references in the conversion.

Parameters:
routeNodeInstanceLoader - a service that will provide routeNodeInstanceS based on their IDs.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.