Class WorkflowRuleAttributeMediatorImpl
- All Implemented Interfaces:
WorkflowRuleAttributeMediator
WorkflowRuleAttributeMediator.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.kuali.rice.kew.framework.rule.attribute.WorkflowRuleAttributeHandlerServicegetHandler(org.kuali.rice.kew.api.extension.ExtensionDefinition extensionDefinition) Retrieves the WorkflowRuleAttributeHandlerService which can be used to handle the given ExtensionDefinition.List<org.kuali.rice.kew.api.rule.RoleName> getRoleNames(RuleTemplateAttributeBo ruleTemplateAttribute) Returns the list of role names as defined on theRoleAttributedefined by the given rule template attribute.getRoutingDataRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute) Returns rule attribute row configuration for the workflow rule attribute defined on the given RuleTemplateAttribute.getRoutingDataRows(Map<String, String> parameters, RuleTemplateAttributeBo ruleTemplateAttribute) Equivalent toWorkflowRuleAttributeMediator.getRoutingDataRows(java.util.Map, org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo)but takes aRuleTemplateAttributeBoinstead of aRuleTemplateAttribute.getRuleRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute) Returns rule row configuration for the workflow rule attribute defined on the given RuleTemplateAttribute.getRuleRows(Map<String, String> parameters, RuleTemplateAttributeBo ruleTemplateAttribute) Equivalent toWorkflowRuleAttributeMediator.getRuleRows(java.util.Map, org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo)but takes aRuleTemplateAttributeBoinstead of aRuleTemplateAttribute.getSearchRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute) Returns rule search row configuration for the workflow rule attribute defined on the given RuleTemplateAttribute.getSearchRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute, boolean required) Equivalent to callWorkflowRuleAttributeMediator.getSearchRows(java.util.Map, org.kuali.rice.kew.api.rule.RuleTemplateAttribute)but passes a custom value for the required flag that is passed to the attribute instead of using the one defined by the givenRuleTemplateAttribute.isRequired().
-
Constructor Details
-
WorkflowRuleAttributeMediatorImpl
public WorkflowRuleAttributeMediatorImpl()
-
-
Method Details
-
getRuleRows
public WorkflowRuleAttributeRows getRuleRows(Map<String, String> parameters, RuleTemplateAttributeBo ruleTemplateAttribute) Description copied from interface:WorkflowRuleAttributeMediatorEquivalent toWorkflowRuleAttributeMediator.getRuleRows(java.util.Map, org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo)but takes aRuleTemplateAttributeBoinstead of aRuleTemplateAttribute. Exists primarily for convenience of the calling code.- Specified by:
getRuleRowsin interfaceWorkflowRuleAttributeMediator
-
getRuleRows
public WorkflowRuleAttributeRows getRuleRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute) Description copied from interface:WorkflowRuleAttributeMediatorReturns rule row configuration for the workflow rule attribute defined on the given RuleTemplateAttribute. These are the rows which show up on the rule and rule delegation maintenance screen when creating or editing a rule or rule delegation which uses the given attribute, as well as on the inquiry for the rule.Will use the supplied parameters to populate the WorkflowRuleAttribute by running the validateRuleData method on that attribute. The result of this call contains any validation errors, the Row objects as constructed by the attribute, and the final values for the rule extensions after validation and processing has been executed.
- Specified by:
getRuleRowsin interfaceWorkflowRuleAttributeMediator- Parameters:
parameters- a map of parameters to pass to the backend WorkflowRuleAttribute for validation, may be null or an empty mapruleTemplateAttribute- the RuleTemplateAttribute which defines the ExtensionDefinition for the WorkflowRuleAttribute against which to validate and retrieve the rows, as well as the required flag which should be passed to the attribute- Returns:
- the result of validating and retrieving rule rows, will never return null
-
getRoutingDataRows
public WorkflowRuleAttributeRows getRoutingDataRows(Map<String, String> parameters, RuleTemplateAttributeBo ruleTemplateAttribute) Description copied from interface:WorkflowRuleAttributeMediatorEquivalent toWorkflowRuleAttributeMediator.getRoutingDataRows(java.util.Map, org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo)but takes aRuleTemplateAttributeBoinstead of aRuleTemplateAttribute. Exists primarily for convenience of the calling code.- Specified by:
getRoutingDataRowsin interfaceWorkflowRuleAttributeMediator
-
getRoutingDataRows
public WorkflowRuleAttributeRows getRoutingDataRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute) Description copied from interface:WorkflowRuleAttributeMediatorReturns rule attribute row configuration for the workflow rule attribute defined on the given RuleTemplateAttribute. These are the rows which show up on the Routing Report screen when using a RuleTemplate which includes the given RuleTemplateAttribute.Will use the supplied parameters to populate the WorkflowRuleAttribute by running the validateRoutingData method on that attribute. The result of this call contains any validation errors, the Row objects as constructed by the attribute, and the final values for the rule extensions after validation and processing has been executed.
- Specified by:
getRoutingDataRowsin interfaceWorkflowRuleAttributeMediator- Parameters:
parameters- a map of parameters to pass to the backend WorkflowRuleAttribute for validation, may be null or an empty mapruleTemplateAttribute- the RuleTemplateAttribute which defines the ExtensionDefinition for the WorkflowRuleAttribute against which to validate and retrieve the search rows, as well as the required flag which should be passed to the attribute- Returns:
- the result of validating and retrieving rule search rows, will never return null
-
getSearchRows
public WorkflowRuleAttributeRows getSearchRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute) Description copied from interface:WorkflowRuleAttributeMediatorReturns rule search row configuration for the workflow rule attribute defined on the given RuleTemplateAttribute. These are the rows which show up on the rule and rule delegation lookup screen when searching for rules or rule delegations using a RuleTemplate which includes the given RuleTemplateAttribute.Will use the supplied parameters to populate the WorkflowRuleAttribute by running the validateRuleData method on that attribute (or if the attribute implements WorkflowRuleSearchAttribute, will execute validateSearchData). The result of this call contains any validation errors, the Row objects as constructed by the attribute, and the final values for the rule extensions after validation and processing has been executed.
- Specified by:
getSearchRowsin interfaceWorkflowRuleAttributeMediator- Parameters:
parameters- a map of parameters to pass to the backend WorkflowRuleAttribute for validation, may be null or an empty mapruleTemplateAttribute- the RuleTemplateAttribute which defines the ExtensionDefinition for the WorkflowRuleAttribute against which to validate and retrieve the search rows, as well as the required flag which should be passed to the attribute- Returns:
- the result of validating and retrieving rule search rows, will never return null
-
getSearchRows
public WorkflowRuleAttributeRows getSearchRows(Map<String, String> parameters, org.kuali.rice.kew.api.rule.RuleTemplateAttribute ruleTemplateAttribute, boolean required) Description copied from interface:WorkflowRuleAttributeMediatorEquivalent to callWorkflowRuleAttributeMediator.getSearchRows(java.util.Map, org.kuali.rice.kew.api.rule.RuleTemplateAttribute)but passes a custom value for the required flag that is passed to the attribute instead of using the one defined by the givenRuleTemplateAttribute.isRequired(). The main use case for this is in the case of a lookup where it's desirable to disable required validation for search fields that have not been filled in (in that case a value of "false" would be passed as the last argument to this method).- Specified by:
getSearchRowsin interfaceWorkflowRuleAttributeMediator
-
getRoleNames
public List<org.kuali.rice.kew.api.rule.RoleName> getRoleNames(RuleTemplateAttributeBo ruleTemplateAttribute) Description copied from interface:WorkflowRuleAttributeMediatorReturns the list of role names as defined on theRoleAttributedefined by the given rule template attribute. In this case that the defined rule template attribute does not represent a role attribute or does not return any role names, this method will return an empty list.- Specified by:
getRoleNamesin interfaceWorkflowRuleAttributeMediator- Parameters:
ruleTemplateAttribute- the RuleTemplateAttribute which defines the ExtensionDefinition for the RoleAttribute from which to fetch the role names
-
getHandler
protected org.kuali.rice.kew.framework.rule.attribute.WorkflowRuleAttributeHandlerService getHandler(org.kuali.rice.kew.api.extension.ExtensionDefinition extensionDefinition) Retrieves the WorkflowRuleAttributeHandlerService which can be used to handle the given ExtensionDefinition. If such a service cannot be loaded, an IllegalStateException is thrown.- Parameters:
extensionDefinition- the definition of the extension which will be accessed through the handler service- Returns:
- a reference to a handler service which can be used to interact with the given extension definition
- Throws:
IllegalStateException- if the handler cannot be found
-