org.kuali.rice.kew.role
Class RoleRouteModule

java.lang.Object
  extended by org.kuali.rice.kew.role.RoleRouteModule
All Implemented Interfaces:
RouteModule

public class RoleRouteModule
extends Object
implements RouteModule

The RoleRouteModule is responsible for interfacing with the KIM Role system to provide Role-based routing to KEW.

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

Field Summary
protected static String NAMESPACE_ELEMENT
           
protected static String QUALIFIER_RESOLVER_CLASS_ELEMENT
           
protected static String QUALIFIER_RESOLVER_ELEMENT
           
protected static String RESPONSIBILITY_TEMPLATE_NAME_ELEMENT
           
 
Constructor Summary
RoleRouteModule()
           
 
Method Summary
protected  void disableResolveResponsibility(List<ActionRequestValue> actionRequests)
          Walks the ActionRequest graph and disables responsibility resolution on those ActionRequests.
 List<ActionRequestValue> findActionRequests(RouteContext context)
          Generate action requests for the given RouteContext.
protected  ObjectDefinition getAttributeObjectDefinition(RuleAttribute ruleAttribute)
           
protected  ResponsibilityService getResponsibilityService()
           
 boolean isMoreRequestsAvailable(RouteContext context)
          Returns true if this RouteModule has more requests available which it can generate.
protected  String loadNamespace(RouteContext context)
           
protected  QualifierResolver loadQualifierResolver(RouteContext context)
           
protected  Map<String,String> loadResponsibilityDetails(RouteContext context)
           
protected  String loadResponsibilityTemplateName(RouteContext context)
           
protected  void logQualifierCheck(String namespaceCode, String responsibilityName, Map<String,String> responsibilityDetails, List<Map<String,String>> qualifiers)
           
protected  List<org.kuali.rice.kew.role.RoleRouteModule.ResponsibilitySet> partitionResponsibilities(List<ResponsibilityAction> responsibilities)
           
 ResponsibleParty resolveResponsibilityId(String responsibilityId)
          Return null so that the responsibility ID will remain the same.
 void setNamespace(String namespace)
           
 void setQualifierResolverClassName(String qualifierResolverClassName)
           
 void setQualifierResolverName(String qualifierResolverName)
           
 void setResponsibilityTemplateName(String responsibilityTemplateName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUALIFIER_RESOLVER_ELEMENT

protected static final String QUALIFIER_RESOLVER_ELEMENT
See Also:
Constant Field Values

QUALIFIER_RESOLVER_CLASS_ELEMENT

protected static final String QUALIFIER_RESOLVER_CLASS_ELEMENT
See Also:
Constant Field Values

RESPONSIBILITY_TEMPLATE_NAME_ELEMENT

protected static final String RESPONSIBILITY_TEMPLATE_NAME_ELEMENT
See Also:
Constant Field Values

NAMESPACE_ELEMENT

protected static final String NAMESPACE_ELEMENT
See Also:
Constant Field Values
Constructor Detail

RoleRouteModule

public RoleRouteModule()
Method Detail

isMoreRequestsAvailable

public boolean isMoreRequestsAvailable(RouteContext context)
Description copied from interface: RouteModule
Returns true if this RouteModule has more requests available which it can generate. This method will only be called after the first set of action requests returned by the first invocation of findActionRequests have been fully activated. If this method returns true, findActionRequests will be invoked again and those requests will all be activated before the cycle continues until this method returns false;

Specified by:
isMoreRequestsAvailable in interface RouteModule
Parameters:
context - the route context
Returns:
true if this route module has more requests it can generate, false otherwise

findActionRequests

public List<ActionRequestValue> findActionRequests(RouteContext context)
                                            throws Exception
Description copied from interface: RouteModule
Generate action requests for the given RouteContext.

Specified by:
findActionRequests in interface RouteModule
Returns:
A List of the generated ActionRequestValue objects.
Throws:
Exception

logQualifierCheck

protected void logQualifierCheck(String namespaceCode,
                                 String responsibilityName,
                                 Map<String,String> responsibilityDetails,
                                 List<Map<String,String>> qualifiers)

disableResolveResponsibility

protected void disableResolveResponsibility(List<ActionRequestValue> actionRequests)
Walks the ActionRequest graph and disables responsibility resolution on those ActionRequests. Because of the fact that it's not possible to tell if an ActionRequest was generated by KIM once it's been saved in the database, we want to disable responsibilityId resolution on the RouteModule because we will end up geting a reference to FlexRM and a call to resolveResponsibilityId will fail.

Parameters:
actionRequests -

loadQualifierResolver

protected QualifierResolver loadQualifierResolver(RouteContext context)

loadResponsibilityDetails

protected Map<String,String> loadResponsibilityDetails(RouteContext context)

loadResponsibilityTemplateName

protected String loadResponsibilityTemplateName(RouteContext context)

loadNamespace

protected String loadNamespace(RouteContext context)

getAttributeObjectDefinition

protected ObjectDefinition getAttributeObjectDefinition(RuleAttribute ruleAttribute)

partitionResponsibilities

protected List<org.kuali.rice.kew.role.RoleRouteModule.ResponsibilitySet> partitionResponsibilities(List<ResponsibilityAction> responsibilities)

resolveResponsibilityId

public ResponsibleParty resolveResponsibilityId(String responsibilityId)
                                         throws WorkflowException
Return null so that the responsibility ID will remain the same.

Specified by:
resolveResponsibilityId in interface RouteModule
Parameters:
responsibilityId - the id of the responsibility to be resolved
Returns:
the responsibility party with which to replace the original responsibility, or null if the responsibility should remain unchanged.
Throws:
WorkflowException
See Also:
RouteModule.resolveResponsibilityId(String)

setQualifierResolverName

public void setQualifierResolverName(String qualifierResolverName)
Parameters:
qualifierResolverName - the qualifierResolverName to set

setQualifierResolverClassName

public void setQualifierResolverClassName(String qualifierResolverClassName)
Parameters:
qualifierResolverClassName - the qualifierResolverClassName to set

setResponsibilityTemplateName

public void setResponsibilityTemplateName(String responsibilityTemplateName)
Parameters:
responsibilityTemplateName - the responsibilityTemplateName to set

setNamespace

public void setNamespace(String namespace)
Parameters:
namespace - the namespace to set

getResponsibilityService

protected ResponsibilityService getResponsibilityService()


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