|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kew.actions.ActionTakenEvent
public abstract class ActionTakenEvent
Super class containing mostly often used methods by all actions. Holds common
state as well, DocumentRouteHeaderValue
document,
ActionTakenValue
action taken (once saved), PrincipalContract
principal
that has taken the action
Field Summary | |
---|---|
protected String |
annotation
|
protected static String |
DEFAULT_ANNOTATION
Default annotation - none. |
protected static boolean |
DEFAULT_QUEUE_DOCUMENT_AFTER_ACTION
Default value for queueing document after the action is recorded |
protected static boolean |
DEFAULT_RUN_POSTPROCESSOR_LOGIC
Default value for running postprocessor logic after the action is recorded. |
protected DocumentRouteHeaderValue |
routeHeader
This is in spirit immutable, however for expediency it is mutable as at least one action (ReturnToPreviousNodeAction) attempts to reload the route header after every pp notification. |
Constructor Summary | |
---|---|
ActionTakenEvent(String actionTakenCode,
DocumentRouteHeaderValue routeHeader,
PrincipalContract principal)
|
|
ActionTakenEvent(String actionTakenCode,
DocumentRouteHeaderValue routeHeader,
PrincipalContract principal,
String annotation)
|
|
ActionTakenEvent(String actionTakenCode,
DocumentRouteHeaderValue routeHeader,
PrincipalContract principal,
String annotation,
boolean runPostProcessorLogic)
|
|
ActionTakenEvent(String actionTakenCode,
DocumentRouteHeaderValue routeHeader,
PrincipalContract principal,
String annotation,
boolean runPostProcessorLogic,
boolean queueDocumentAfterAction)
|
Method Summary | |
---|---|
protected List<ActionRequestValue> |
filterActionRequestsByCode(List<ActionRequestValue> actionRequests,
String requestCode)
Filters action requests based on if they occur after the given requestCode, and if they relate to this event's principal |
protected Recipient |
findDelegatorForActionRequests(List actionRequests)
Returns the highest priority delegator in the list of action requests. |
protected void |
generateAcknowledgementsToPreviousActionTakers(RouteNodeInstance notificationNodeInstance)
Utility for generating Acknowledgements to previous document action takers. |
protected String |
getActionPerformedCode()
Code of the action performed by the user Method may be overriden is action performed will be different than action taken |
ActionRequestService |
getActionRequestService()
|
String |
getActionTakenCode()
|
protected String |
getDocumentId()
|
protected List<String> |
getGroupIdsForPrincipal()
|
protected PrincipalContract |
getPrincipal()
|
protected DocumentRouteHeaderValue |
getRouteHeader()
|
protected void |
invokePostProcessor(String message,
Callable<ProcessDocReport> invocation)
Wraps PostProcessor invocation with error handling |
protected boolean |
isActionCompatibleRequest(List<ActionRequestValue> requests)
|
protected boolean |
isActionValid()
Validates whether or not this action is valid for the given principal and DocumentRouteHeaderValue. |
protected static boolean |
isPolicySet(DocumentType docType,
DocumentTypePolicy policy)
Determines whether a specific policy is set on the document type. |
protected static boolean |
isPolicySet(DocumentType docType,
DocumentTypePolicy policy,
boolean deflt)
Determines whether a specific policy is set on the document type. |
protected boolean |
isRunPostProcessorLogic()
|
protected void |
notifyActionTaken(ActionTakenValue actionTaken)
|
protected void |
notifyAfterActionTaken(ActionTakenValue actionTaken)
|
protected void |
notifyStatusChange(String newStatusCode,
String oldStatusCode)
|
void |
performAction()
|
protected void |
queueDocumentProcessing()
Asynchronously queues the documented to be processed by the workflow engine. |
protected abstract void |
recordAction()
|
protected ActionTakenValue |
saveActionTaken()
|
protected ActionTakenValue |
saveActionTaken(Boolean currentInd)
|
protected ActionTakenValue |
saveActionTaken(Boolean currentInd,
Recipient delegator)
|
protected ActionTakenValue |
saveActionTaken(Recipient delegator)
|
protected void |
setActionTakenCode(String string)
|
protected void |
setRouteHeader(DocumentRouteHeaderValue routeHeader)
|
protected void |
updateSearchableAttributesIfPossible()
|
abstract String |
validateActionRules()
Placeholder for validation rules for each action |
protected abstract String |
validateActionRules(List<ActionRequestValue> actionRequests)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final boolean DEFAULT_QUEUE_DOCUMENT_AFTER_ACTION
protected static final boolean DEFAULT_RUN_POSTPROCESSOR_LOGIC
protected static final String DEFAULT_ANNOTATION
protected final String annotation
protected DocumentRouteHeaderValue routeHeader
Constructor Detail |
---|
public ActionTakenEvent(String actionTakenCode, DocumentRouteHeaderValue routeHeader, PrincipalContract principal)
public ActionTakenEvent(String actionTakenCode, DocumentRouteHeaderValue routeHeader, PrincipalContract principal, String annotation)
public ActionTakenEvent(String actionTakenCode, DocumentRouteHeaderValue routeHeader, PrincipalContract principal, String annotation, boolean runPostProcessorLogic)
public ActionTakenEvent(String actionTakenCode, DocumentRouteHeaderValue routeHeader, PrincipalContract principal, String annotation, boolean runPostProcessorLogic, boolean queueDocumentAfterAction)
Method Detail |
---|
public ActionRequestService getActionRequestService()
protected DocumentRouteHeaderValue getRouteHeader()
protected void setRouteHeader(DocumentRouteHeaderValue routeHeader)
protected PrincipalContract getPrincipal()
protected String getActionPerformedCode()
protected boolean isActionValid()
protected static boolean isPolicySet(DocumentType docType, DocumentTypePolicy policy, boolean deflt)
docType
- the document typepolicy
- the DocumentTypePolicydeflt
- the default value if the policy is not present
protected static boolean isPolicySet(DocumentType docType, DocumentTypePolicy policy)
docType
- the document typepolicy
- the DocumentTypePolicy
public abstract String validateActionRules()
protected abstract String validateActionRules(List<ActionRequestValue> actionRequests)
protected List<ActionRequestValue> filterActionRequestsByCode(List<ActionRequestValue> actionRequests, String requestCode)
actionRequests
- the List of ActionRequestValues to filterrequestCode
- the request code for all ActionRequestValues to be after
protected boolean isActionCompatibleRequest(List<ActionRequestValue> requests)
public void performAction() throws InvalidActionTakenException
InvalidActionTakenException
protected abstract void recordAction() throws InvalidActionTakenException
InvalidActionTakenException
protected void updateSearchableAttributesIfPossible()
protected void invokePostProcessor(String message, Callable<ProcessDocReport> invocation)
message
- log messageinvocation
- the callable that invokes the postprocessorprotected void notifyActionTaken(ActionTakenValue actionTaken)
protected void notifyAfterActionTaken(ActionTakenValue actionTaken)
protected void notifyStatusChange(String newStatusCode, String oldStatusCode) throws InvalidActionTakenException
InvalidActionTakenException
protected void queueDocumentProcessing()
protected ActionTakenValue saveActionTaken()
protected ActionTakenValue saveActionTaken(Boolean currentInd)
protected ActionTakenValue saveActionTaken(Recipient delegator)
protected ActionTakenValue saveActionTaken(Boolean currentInd, Recipient delegator)
protected Recipient findDelegatorForActionRequests(List actionRequests)
public String getActionTakenCode()
protected void setActionTakenCode(String string)
protected String getDocumentId()
protected boolean isRunPostProcessorLogic()
protected List<String> getGroupIdsForPrincipal()
protected void generateAcknowledgementsToPreviousActionTakers(RouteNodeInstance notificationNodeInstance)
notificationNodeInstance
- the node instance with which generated actionrequests will be associatedActionRequestFactory.generateNotifications(java.util.List, org.kuali.rice.kim.api.identity.principal.PrincipalContract, org.kuali.rice.kew.actionrequest.Recipient, String, String)
,
ActionRequestFactory.generateNotifications(org.kuali.rice.kew.actionrequest.ActionRequestValue, java.util.List, org.kuali.rice.kim.api.identity.principal.PrincipalContract, org.kuali.rice.kew.actionrequest.Recipient, String, String, org.kuali.rice.kim.api.group.Group)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |