org.kuali.rice.kew.actions
Class ActionTakenEvent

java.lang.Object
  extended by org.kuali.rice.kew.actions.ActionTakenEvent
Direct Known Subclasses:
AcknowledgeAction, AdHocAction, ApproveAction, BlanketApproveAction, CancelAction, ClearFYIAction, CompleteAction, DisapproveAction, LogDocumentActionAction, MoveDocumentAction, ReleaseWorkgroupAuthority, ReturnToPreviousNodeAction, RevokeAdHocAction, RouteDocumentAction, SaveActionEvent, SuperUserActionTakenEvent, TakeWorkgroupAuthority

public abstract class ActionTakenEvent
extends Object

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

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
protected  String annotation
           
protected  DocumentRouteHeaderValue routeHeader
           
 
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)
           
 
Method Summary
 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  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()
           
 PrincipalContract getPrincipal()
           
 DocumentRouteHeaderValue getRouteHeader()
           
protected  boolean isActionCompatibleRequest(List<ActionRequestValue> requests)
           
protected  boolean isActionValid()
          Validates whether or not this action is valid for the given principal and DocumentRouteHeaderValue.
protected  boolean isRunPostProcessorLogic()
           
protected  void notifyActionTaken(ActionTakenValue actionTaken)
           
protected  void notifyStatusChange(String newStatusCode, String oldStatusCode)
           
 void performAction()
           
 void performDeferredAction()
           
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)
           
 void setQueueDocumentAfterAction(boolean queueDocumentAfterAction)
           
 void setRouteHeader(DocumentRouteHeaderValue routeHeader)
           
protected  void updateSearchableAttributesIfPossible()
           
abstract  String validateActionRules()
          Placeholder for validation rules for each action
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

annotation

protected final String annotation

routeHeader

protected DocumentRouteHeaderValue routeHeader
Constructor Detail

ActionTakenEvent

public ActionTakenEvent(String actionTakenCode,
                        DocumentRouteHeaderValue routeHeader,
                        PrincipalContract principal)

ActionTakenEvent

public ActionTakenEvent(String actionTakenCode,
                        DocumentRouteHeaderValue routeHeader,
                        PrincipalContract principal,
                        String annotation)

ActionTakenEvent

public ActionTakenEvent(String actionTakenCode,
                        DocumentRouteHeaderValue routeHeader,
                        PrincipalContract principal,
                        String annotation,
                        boolean runPostProcessorLogic)
Method Detail

getActionRequestService

public ActionRequestService getActionRequestService()

getRouteHeader

public DocumentRouteHeaderValue getRouteHeader()

setRouteHeader

public void setRouteHeader(DocumentRouteHeaderValue routeHeader)

getPrincipal

public PrincipalContract getPrincipal()

getActionPerformedCode

protected String getActionPerformedCode()
Code of the action performed by the user Method may be overriden is action performed will be different than action taken

Returns:

isActionValid

protected boolean isActionValid()
Validates whether or not this action is valid for the given principal and DocumentRouteHeaderValue.


validateActionRules

public abstract String validateActionRules()
Placeholder for validation rules for each action

Returns:
error message string of specific error message

validateActionRules

public abstract String validateActionRules(List<ActionRequestValue> actionRequests)

filterActionRequestsByCode

public 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

Parameters:
actionRequests - the List of ActionRequestValues to filter
requestCode - the request code for all ActionRequestValues to be after
Returns:
the filtered List of ActionRequestValues

isActionCompatibleRequest

protected boolean isActionCompatibleRequest(List<ActionRequestValue> requests)

performAction

public void performAction()
                   throws InvalidActionTakenException
Throws:
InvalidActionTakenException

recordAction

protected abstract void recordAction()
                              throws InvalidActionTakenException
Throws:
InvalidActionTakenException

performDeferredAction

public void performDeferredAction()

updateSearchableAttributesIfPossible

protected void updateSearchableAttributesIfPossible()

notifyActionTaken

protected void notifyActionTaken(ActionTakenValue actionTaken)

notifyStatusChange

protected void notifyStatusChange(String newStatusCode,
                                  String oldStatusCode)
                           throws InvalidActionTakenException
Throws:
InvalidActionTakenException

queueDocumentProcessing

protected void queueDocumentProcessing()
Asynchronously queues the documented to be processed by the workflow engine.


saveActionTaken

protected ActionTakenValue saveActionTaken()

saveActionTaken

protected ActionTakenValue saveActionTaken(Boolean currentInd)

saveActionTaken

protected ActionTakenValue saveActionTaken(Recipient delegator)

saveActionTaken

protected ActionTakenValue saveActionTaken(Boolean currentInd,
                                           Recipient delegator)

findDelegatorForActionRequests

protected Recipient findDelegatorForActionRequests(List actionRequests)
Returns the highest priority delegator in the list of action requests.


getActionTakenCode

public String getActionTakenCode()

setActionTakenCode

protected void setActionTakenCode(String string)

getDocumentId

protected String getDocumentId()

isRunPostProcessorLogic

protected boolean isRunPostProcessorLogic()

getGroupIdsForPrincipal

protected List<String> getGroupIdsForPrincipal()

setQueueDocumentAfterAction

public void setQueueDocumentAfterAction(boolean queueDocumentAfterAction)


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