org.kuali.rice.kew.actionrequest
Class ActionRequestFactory

java.lang.Object
  extended by org.kuali.rice.kew.actionrequest.ActionRequestFactory

public class ActionRequestFactory
extends Object

A factory to aid in creating the ever-so-gnarly ActionRequestValue object.

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

Constructor Summary
ActionRequestFactory()
           
ActionRequestFactory(DocumentRouteHeaderValue document)
           
ActionRequestFactory(DocumentRouteHeaderValue document, RouteNodeInstance routeNode)
           
ActionRequestFactory(RouteContext routeContext)
           
 
Method Summary
 ActionRequestValue addDelegateKimRoleRequest(ActionRequestValue parentRequest, DelegationType delegationType, String actionRequestedCode, Integer priority, Role role, List<RoleMembership> memberships, String description, String responsibilityId, boolean forceAction, String actionRequestPolicyCode, String requestLabel)
          Generates a delegate request to a KIM role.
 ActionRequestValue addDelegationRequest(ActionRequestValue parentRequest, Recipient recipient, String responsibilityId, Boolean forceAction, DelegationType delegationType, String annotation, String ruleId)
          Add a delegation request to the given parent action request.
 ActionRequestValue addDelegationRequest(ActionRequestValue parentRequest, Recipient recipient, String responsibilityId, Boolean forceAction, DelegationType delegationType, String actionRequestPolicyCode, String annotation, String ruleId)
          Add a delegation request to the given parent action request.
 ActionRequestValue addDelegationRoleRequest(ActionRequestValue parentRequest, String approvePolicy, RoleRecipient role, String responsibilityId, Boolean forceAction, DelegationType delegationType, String description, String ruleId)
           
 ActionRequestValue addKimRoleRequest(String actionRequestedCode, Integer priority, Role role, List<RoleMembership> memberships, String description, String responsibilityId, boolean forceAction, String actionRequestPolicyCode, String requestLabel)
          Generates an ActionRequest graph for the given KIM Responsibilities.
 ActionRequestValue addKimRoleRequest(String actionRequestedCode, Integer priority, Role role, List<RoleMembership> memberships, String description, String responsibilityId, boolean forceAction, String actionRequestPolicyCode, String requestLabel, boolean ignoreKimDelegates)
          Generates an ActionRequest graph for the given KIM Responsibilities.
 ActionRequestValue addRoleRequest(RoleRecipient role, String actionRequested, String approvePolicy, Integer priority, String responsibilityId, Boolean forceAction, String description, String ruleId)
          Creates a root Role Request
 void addRoleResponsibilityRequest(List<ResponsibilityAction> responsibilities, String approvePolicy)
          Generates an ActionRequest graph for the given KIM Responsibilities.
 ActionRequestValue addRootActionRequest(String actionRequested, Integer priority, Recipient recipient, String description, String responsibilityId, Boolean forceAction, String approvePolicy, String ruleId)
           
 ActionRequestValue createActionRequest(String actionRequested, Integer priority, Recipient recipient, String description, String responsibilityId, Boolean forceAction, String annotation)
           
 ActionRequestValue createActionRequest(String actionRequested, Integer priority, Recipient recipient, String description, String responsibilityId, Boolean forceAction, String approvePolicy, String ruleId, String annotation)
           
 ActionRequestValue createActionRequest(String actionRequested, Integer priority, Recipient recipient, String description, String responsibilityId, Boolean forceAction, String approvePolicy, String ruleId, String annotation, String requestLabel)
           
 ActionRequestValue createActionRequest(String actionRequested, Recipient recipient, String description, Boolean forceAction, String annotation)
          Constructs ActionRequestValue using default priority and 0 as responsibility
 ActionRequestValue createBlankActionRequest()
           
 ActionRequestValue createNotificationRequest(String actionRequestCode, PrincipalContract principal, String reasonActionCode, PrincipalContract reasonActionUser, String responsibilityDesc)
           
 List<ActionRequestValue> generateNotifications(List requests, PrincipalContract principal, Recipient delegator, String notificationRequestCode, String actionTakenCode)
           
protected static ActionRequestService getActionRequestService()
           
protected static GroupService getGroupService()
           
protected static IdentityHelperService getIdentityHelperService()
           
protected static IdentityService getIdentityService()
           
 List<ActionRequestValue> getRequestGraphs()
           
protected static RoleService getRoleService()
           
 boolean relatedToRoot(ActionRequestValue request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionRequestFactory

public ActionRequestFactory()

ActionRequestFactory

public ActionRequestFactory(DocumentRouteHeaderValue document)

ActionRequestFactory

public ActionRequestFactory(DocumentRouteHeaderValue document,
                            RouteNodeInstance routeNode)

ActionRequestFactory

public ActionRequestFactory(RouteContext routeContext)
Method Detail

createActionRequest

public ActionRequestValue createActionRequest(String actionRequested,
                                              Recipient recipient,
                                              String description,
                                              Boolean forceAction,
                                              String annotation)
Constructs ActionRequestValue using default priority and 0 as responsibility

Parameters:
actionRequested -
recipient -
description -
forceAction -
annotation -
Returns:
ActionRequestValue

createActionRequest

public ActionRequestValue createActionRequest(String actionRequested,
                                              Integer priority,
                                              Recipient recipient,
                                              String description,
                                              String responsibilityId,
                                              Boolean forceAction,
                                              String annotation)

createActionRequest

public ActionRequestValue createActionRequest(String actionRequested,
                                              Integer priority,
                                              Recipient recipient,
                                              String description,
                                              String responsibilityId,
                                              Boolean forceAction,
                                              String approvePolicy,
                                              String ruleId,
                                              String annotation)

createActionRequest

public ActionRequestValue createActionRequest(String actionRequested,
                                              Integer priority,
                                              Recipient recipient,
                                              String description,
                                              String responsibilityId,
                                              Boolean forceAction,
                                              String approvePolicy,
                                              String ruleId,
                                              String annotation,
                                              String requestLabel)

createBlankActionRequest

public ActionRequestValue createBlankActionRequest()

createNotificationRequest

public ActionRequestValue createNotificationRequest(String actionRequestCode,
                                                    PrincipalContract principal,
                                                    String reasonActionCode,
                                                    PrincipalContract reasonActionUser,
                                                    String responsibilityDesc)

generateNotifications

public List<ActionRequestValue> generateNotifications(List requests,
                                                      PrincipalContract principal,
                                                      Recipient delegator,
                                                      String notificationRequestCode,
                                                      String actionTakenCode)

addRoleRequest

public ActionRequestValue addRoleRequest(RoleRecipient role,
                                         String actionRequested,
                                         String approvePolicy,
                                         Integer priority,
                                         String responsibilityId,
                                         Boolean forceAction,
                                         String description,
                                         String ruleId)
Creates a root Role Request

Parameters:
role -
actionRequested -
approvePolicy -
priority -
responsibilityId -
forceAction -
description -
ruleId -
Returns:
the created root role request

addRoleResponsibilityRequest

public void addRoleResponsibilityRequest(List<ResponsibilityAction> responsibilities,
                                         String approvePolicy)
Generates an ActionRequest graph for the given KIM Responsibilities. This graph includes any associated delegations.

Parameters:
responsibilities -
approvePolicy -

addDelegationRoleRequest

public ActionRequestValue addDelegationRoleRequest(ActionRequestValue parentRequest,
                                                   String approvePolicy,
                                                   RoleRecipient role,
                                                   String responsibilityId,
                                                   Boolean forceAction,
                                                   DelegationType delegationType,
                                                   String description,
                                                   String ruleId)

addDelegationRequest

public ActionRequestValue addDelegationRequest(ActionRequestValue parentRequest,
                                               Recipient recipient,
                                               String responsibilityId,
                                               Boolean forceAction,
                                               DelegationType delegationType,
                                               String actionRequestPolicyCode,
                                               String annotation,
                                               String ruleId)
Add a delegation request to the given parent action request.

Parameters:
parentRequest - the parent request to add it to
recipient - the recipient to send the delegation request to
responsibilityId -
forceAction -
delegationType - primary or secondary?
actionRequestPolicyCode - the action request policy code specifying when the action requests are considered to be completed
annotation - the annotation to put on the delegation request
ruleId -
Returns:
the delegation request that was added

addDelegationRequest

public ActionRequestValue addDelegationRequest(ActionRequestValue parentRequest,
                                               Recipient recipient,
                                               String responsibilityId,
                                               Boolean forceAction,
                                               DelegationType delegationType,
                                               String annotation,
                                               String ruleId)
Add a delegation request to the given parent action request.

no action type policy code will be specified.

Parameters:
parentRequest - the parent request to add it to
recipient - the recipient to send the delegation request to
responsibilityId -
forceAction -
delegationType - primary or secondary?
annotation - the annotation to put on the delegation request
ruleId -
Returns:
the delegation request that was added

addRootActionRequest

public ActionRequestValue addRootActionRequest(String actionRequested,
                                               Integer priority,
                                               Recipient recipient,
                                               String description,
                                               String responsibilityId,
                                               Boolean forceAction,
                                               String approvePolicy,
                                               String ruleId)

addKimRoleRequest

public ActionRequestValue addKimRoleRequest(String actionRequestedCode,
                                            Integer priority,
                                            Role role,
                                            List<RoleMembership> memberships,
                                            String description,
                                            String responsibilityId,
                                            boolean forceAction,
                                            String actionRequestPolicyCode,
                                            String requestLabel)
Generates an ActionRequest graph for the given KIM Responsibilities. This graph includes any associated delegations.

Parameters:
actionRequestedCode - the type of action requested
priority -
role - the role that the members belong to
memberships - the role members to generate child requests to
description -
responsibilityId -
forceAction -
actionRequestPolicyCode - the action request policy code specifying when the action requests are considered to be completed
requestLabel -
Returns:
the request generated for the role members

addKimRoleRequest

public ActionRequestValue addKimRoleRequest(String actionRequestedCode,
                                            Integer priority,
                                            Role role,
                                            List<RoleMembership> memberships,
                                            String description,
                                            String responsibilityId,
                                            boolean forceAction,
                                            String actionRequestPolicyCode,
                                            String requestLabel,
                                            boolean ignoreKimDelegates)
Generates an ActionRequest graph for the given KIM Responsibilities. This graph includes any associated delegations.

Parameters:
actionRequestedCode - the type of action requested
priority -
role - the role that the members belong to
memberships - the role members to generate child requests to
description -
responsibilityId -
forceAction -
actionRequestPolicyCode - the action request policy code specifying when the action requests are considered to be completed
requestLabel -
ignoreKimDelegates - should kim delegates be ignored when generating requests
Returns:
the request generated for the role members

addDelegateKimRoleRequest

public ActionRequestValue addDelegateKimRoleRequest(ActionRequestValue parentRequest,
                                                    DelegationType delegationType,
                                                    String actionRequestedCode,
                                                    Integer priority,
                                                    Role role,
                                                    List<RoleMembership> memberships,
                                                    String description,
                                                    String responsibilityId,
                                                    boolean forceAction,
                                                    String actionRequestPolicyCode,
                                                    String requestLabel)
Generates a delegate request to a KIM role.

In other words, the Role is the delegate. Since delegates in KEW are limited to 1 level, this will ignore any KIM delegations on the given role.

Parameters:
parentRequest - the parent request that the delegate request will be added to
actionRequestedCode - the type of action requested
priority -
role - the role that is being delegated to
memberships - the role members to generate child requests to
description -
responsibilityId -
forceAction -
actionRequestPolicyCode - the action request policy code specifying when the action requests are considered to be completed
requestLabel -
Returns:
the delegate request generated for the role members

relatedToRoot

public boolean relatedToRoot(ActionRequestValue request)

getRequestGraphs

public List<ActionRequestValue> getRequestGraphs()

getActionRequestService

protected static ActionRequestService getActionRequestService()

getRoleService

protected static RoleService getRoleService()
Returns:
the roleService

getIdentityHelperService

protected static IdentityHelperService getIdentityHelperService()
Returns:
the identityHelperService

getIdentityService

protected static IdentityService getIdentityService()
Returns:
the identityService

getGroupService

protected static GroupService getGroupService()


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