org.kuali.rice.kew.impl.peopleflow
Class PeopleFlowRequestGeneratorImpl

java.lang.Object
  extended by org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl
All Implemented Interfaces:
PeopleFlowRequestGenerator

public class PeopleFlowRequestGeneratorImpl
extends Object
implements PeopleFlowRequestGenerator

Reference implementation of the PeopleFlowRequestGenerator which is responsible for generating Action Requests from a PeopleFlowDefinition.

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

Constructor Summary
PeopleFlowRequestGeneratorImpl()
           
 
Method Summary
protected  void generateDelegationToRoleRequests(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context, ActionRequestValue parentRequest, PeopleFlowMember member, PeopleFlowDelegate delegate)
          Generates any needed requests for the given PeopleFlowDelegate.
protected  void generateRequestForMember(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context, PeopleFlowMember member)
           
 List<ActionRequestValue> generateRequests(RouteContext routeContext, PeopleFlowDefinition peopleFlow, ActionRequestType actionRequested)
           
protected  List<ActionRequestValue> generateRequestsForRoleMember(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context, PeopleFlowMember member)
          generates requests for a PeopleFlow member of type Role.
 RoleService getRoleService()
           
 KewTypeRepositoryService getTypeRepositoryService()
           
protected  List<Map<String,String>> loadRoleQualifiers(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context, String roleId)
          Uses the appropriate PeopleFlowTypeService to get the role qualifier maps for the given document and role.
 void setRoleService(RoleService roleService)
           
 void setTypeRepositoryService(KewTypeRepositoryService typeRepositoryService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeopleFlowRequestGeneratorImpl

public PeopleFlowRequestGeneratorImpl()
Method Detail

generateRequests

public List<ActionRequestValue> generateRequests(RouteContext routeContext,
                                                 PeopleFlowDefinition peopleFlow,
                                                 ActionRequestType actionRequested)
Specified by:
generateRequests in interface PeopleFlowRequestGenerator

generateRequestForMember

protected void generateRequestForMember(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context,
                                        PeopleFlowMember member)

generateRequestsForRoleMember

protected List<ActionRequestValue> generateRequestsForRoleMember(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context,
                                                                 PeopleFlowMember member)
generates requests for a PeopleFlow member of type Role.

Will resolve role qualifiers through the appropriate PeopleFlowTypeService, and if multiple qualifier maps are generated, it can generate multiple request trees. parent requests

Parameters:
context - the context for request generation
member - the PeopleFlow member, which is assumed to be of MemberType ROLE
Returns:
a list of root action requests that were generated, or an empty list if no role members were resolved

generateDelegationToRoleRequests

protected void generateDelegationToRoleRequests(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context,
                                                ActionRequestValue parentRequest,
                                                PeopleFlowMember member,
                                                PeopleFlowDelegate delegate)
Generates any needed requests for the given PeopleFlowDelegate.

It is assumed that the given member has the given delegate configured.

Parameters:
context - the context for request generation
parentRequest - an action request that was generated for the given member
member - the PeopleFlow member, which should contain the given delegate
delegate - the delegate, assumed to be of MemberType ROLE, to generate a request to

loadRoleQualifiers

protected List<Map<String,String>> loadRoleQualifiers(org.kuali.rice.kew.impl.peopleflow.PeopleFlowRequestGeneratorImpl.Context context,
                                                      String roleId)
Uses the appropriate PeopleFlowTypeService to get the role qualifier maps for the given document and role.

Note that the PeopleFlowTypeService is selected based on the type id of the PeopleFlow.

Parameters:
context - the context for request generation
roleId - the ID of the role for whom qualifiers are being loaded
Returns:
the qualifier maps, or an empty list if there are none

getTypeRepositoryService

public KewTypeRepositoryService getTypeRepositoryService()

setTypeRepositoryService

public void setTypeRepositoryService(KewTypeRepositoryService typeRepositoryService)

getRoleService

public RoleService getRoleService()

setRoleService

public void setRoleService(RoleService roleService)


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