Package org.kuali.rice.krad.service
Interface KualiRuleService
public interface KualiRuleService
Defines the interface to the business-rule evaluation service, used to evauluate document-type-specific business
rules using document-related events to drive the process.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyRules(DocumentEvent event) Retrieves and instantiates the businessRulesClass associated with the event's document type (if any), and calls the appropriate process* method of that businessRule for handling the given event type.generateAdHocRoutePersonEvents(Document document) Builds a list containing ad hoc route person events appropriate for the context.generateAdHocRouteWorkgroupEvents(Document document) Builds a list containing ad hoc route workgroup events appropriate for the context.getBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface) Allows code in actions or business objects to directly access rule methods in the class.
-
Method Details
-
applyRules
Retrieves and instantiates the businessRulesClass associated with the event's document type (if any), and calls the appropriate process* method of that businessRule for handling the given event type.This is a helper method that takes in the generic DocumentEvent class and determines which event call to make.
- Parameters:
event-- Returns:
- true if no rule is applied, or all rules are applied successfully, false otherwise
-
generateAdHocRoutePersonEvents
Builds a list containing ad hoc route person events appropriate for the context.- Parameters:
document-- Returns:
- List
-
generateAdHocRouteWorkgroupEvents
Builds a list containing ad hoc route workgroup events appropriate for the context.- Parameters:
document-- Returns:
- List
-
getBusinessRulesInstance
BusinessRule getBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface) Allows code in actions or business objects to directly access rule methods in the class.- Parameters:
document-ruleInterface-- Returns:
- BusinessRule
-