Package org.kuali.rice.krad.service.impl
Class KualiRuleServiceImpl
java.lang.Object
org.kuali.rice.krad.service.impl.KualiRuleServiceImpl
- All Implemented Interfaces:
KualiRuleService
Represents a rule evaluator for Kuali. This class is to be used for evaluating business rule checks. The class
defines one method right now - applyRules() which takes in a Document and a DocumentEvent and does the proper
business rule checks based on the context of the event and the document type
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyRules(DocumentEvent event) generateAdHocRoutePersonEvents(Document document) Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all eventsgenerateAdHocRouteWorkgroupEvents(Document document) Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all eventsgetBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface) booleaninvokeBusinessRuleMethod(BusinessRule rule, DocumentEvent event) local helper method to invoke the business rule methodvoidsetDataDictionaryService(DataDictionaryService dataDictionaryService) voidsetDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
-
Constructor Details
-
KualiRuleServiceImpl
public KualiRuleServiceImpl()
-
-
Method Details
-
applyRules
- Specified by:
applyRulesin interfaceKualiRuleService- See Also:
-
invokeBusinessRuleMethod
local helper method to invoke the business rule method- Parameters:
rule- the business rule class that the method to invoke belongs toevent- the document event the rule applies to- Returns:
- a boolean to indicate whether the method invocation was a succes or not
-
generateAdHocRoutePersonEvents
Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events- Specified by:
generateAdHocRoutePersonEventsin interfaceKualiRuleService- See Also:
-
generateAdHocRouteWorkgroupEvents
Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events- Specified by:
generateAdHocRouteWorkgroupEventsin interfaceKualiRuleService- See Also:
-
getBusinessRulesInstance
public BusinessRule getBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface) - Specified by:
getBusinessRulesInstancein interfaceKualiRuleService- Parameters:
document-ruleInterface-- Returns:
- instance of the businessRulesClass for the given document's type, if that businessRulesClass implements the given ruleInterface
-
getDocumentDictionaryService
-
setDocumentDictionaryService
-
getDataDictionaryService
-
setDataDictionaryService
-