org.kuali.rice.krad.workflow.attribute
Class DataDictionaryQualifierResolver
java.lang.Object
org.kuali.rice.krad.workflow.attribute.QualifierResolverBase
org.kuali.rice.krad.workflow.attribute.DataDictionaryQualifierResolver
- All Implemented Interfaces:
- QualifierResolver
public class DataDictionaryQualifierResolver
- extends QualifierResolverBase
QualifierResolver which uses Data Dictionary defined workflow attributes to gather a collection
of qualifiers to use to determine the responsibility for a document at a given workflow route node.
WorkflowAttributes can be defined in the data dictionary like so (this has been abbreviated):
disbVchrPaymentMethodCode
At the PaymentMethod node of the document, the DisbursementVoucherDocument-RoutingType-PaymentMethod RoutingTypeDefinition will be
consulted; it will pull values from the document (in this case, document.disbVchrPaymentMethodCode) and populate those
into the role qualifier Map, with the key being the qualificationAttributeName and the value being the value of the property
listed in the documentValuePathGroups in the document.
Method Summary |
protected void |
addCommonQualifiersToMap(Map<String,String> qualifier,
Document document,
DocumentEntry documentEntry,
String routeLevel)
Adds common qualifiers to a given Map |
protected void |
decorateWithCommonQualifiers(List<Map<String,String>> qualifiers,
Document document,
DocumentEntry documentEntry,
String routeLevel)
Add common qualifiers to every Map in the given List of Map |
protected DocumentEntry |
getDocumentEntry(RouteContext context)
Retrieves the data dictionary entry for the document being operated on by the given route context |
protected RoutingTypeDefinition |
getWorkflowAttributeDefintion(DocumentEntry documentEntry,
String routeLevelName)
Retrieves the proper List of WorkflowAttributes for the given route level from the data dictionary
document entry |
List<Map<String,String>> |
resolve(RouteContext context)
Given the RouteContext, determines the document type of the document being routed and the current
route nodes; generates a List of qualifier Maps based on the the contents of the document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataDictionaryQualifierResolver
public DataDictionaryQualifierResolver()
resolve
public List<Map<String,String>> resolve(RouteContext context)
- Given the RouteContext, determines the document type of the document being routed and the current
route nodes; generates a List of qualifier Maps based on the the contents of the document.
- See Also:
QualifierResolver.resolve(org.kuali.rice.kew.engine.RouteContext)
getDocumentEntry
protected DocumentEntry getDocumentEntry(RouteContext context)
- Retrieves the data dictionary entry for the document being operated on by the given route context
- Parameters:
context
- the current route context
- Returns:
- the data dictionary document entry
getWorkflowAttributeDefintion
protected RoutingTypeDefinition getWorkflowAttributeDefintion(DocumentEntry documentEntry,
String routeLevelName)
- Retrieves the proper List of WorkflowAttributes for the given route level from the data dictionary
document entry
- Parameters:
documentEntry
- the data dictionary document entry for the currently routed documentrouteLevelName
- the name of the route level
- Returns:
- a WorkflowAttributeDefinition if one could be found for the route level; otherwise, nothing
decorateWithCommonQualifiers
protected void decorateWithCommonQualifiers(List<Map<String,String>> qualifiers,
Document document,
DocumentEntry documentEntry,
String routeLevel)
- Add common qualifiers to every Map in the given List of Map
- Parameters:
qualifiers
- a List of Maps to add common qualifiers todocument
- the document currently being routeddocumentEntry
- the data dictionary entry of the type of document currently being routedrouteLevel
- the document's current route level
addCommonQualifiersToMap
protected void addCommonQualifiersToMap(Map<String,String> qualifier,
Document document,
DocumentEntry documentEntry,
String routeLevel)
- Adds common qualifiers to a given Map
- Parameters:
qualifier
- an Map to add common qualifiers todocument
- the document currently being routeddocumentEntry
- the data dictionary entry of the type of document currently being routedrouteLevel
- the document's current route level
Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.