Class ActionRequestFactory

java.lang.Object
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 Details

  • Method Details

    • 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, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String reasonActionCode, org.kuali.rice.kim.api.identity.principal.PrincipalContract reasonActionUser, String responsibilityDesc)
    • generateNotifications

      public List<ActionRequestValue> generateNotifications(List requests, org.kuali.rice.kim.api.identity.principal.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<org.kuali.rice.kim.api.responsibility.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 annotation, String ruleId)
      Add a delegation request to the given parent action request.

      no action type policy code can be specified as it only applies to roles.

      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, org.kuali.rice.kim.api.role.Role role, List<org.kuali.rice.kim.api.role.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, org.kuali.rice.kim.api.role.Role role, List<org.kuali.rice.kim.api.role.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, org.kuali.rice.kim.api.role.Role role, List<org.kuali.rice.kim.api.role.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 org.kuali.rice.kim.api.role.RoleService getRoleService()
      Returns:
      the roleService
    • getIdentityHelperService

      protected static IdentityHelperService getIdentityHelperService()
      Returns:
      the identityHelperService
    • getIdentityService

      protected static org.kuali.rice.kim.api.identity.IdentityService getIdentityService()
      Returns:
      the identityService
    • getGroupService

      protected static org.kuali.rice.kim.api.group.GroupService getGroupService()