org.kuali.rice.krad.service
Interface KualiRuleService

All Known Implementing Classes:
KualiRuleServiceImpl

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.


Method Summary
 boolean applyRules(KualiDocumentEvent 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.
 List<AddAdHocRoutePersonEvent> generateAdHocRoutePersonEvents(Document document)
          Builds a list containing ad hoc route person events appropriate for the context.
 List<AddAdHocRouteWorkgroupEvent> generateAdHocRouteWorkgroupEvents(Document document)
          Builds a list containing ad hoc route workgroup events appropriate for the context.
 BusinessRule getBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface)
          Allows code in actions or business objects to directly access rule methods in the class.
 

Method Detail

applyRules

boolean applyRules(KualiDocumentEvent 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. This is a helper method that takes in the generic KualiDocumentEvent 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

List<AddAdHocRoutePersonEvent> generateAdHocRoutePersonEvents(Document document)
Builds a list containing ad hoc route person events appropriate for the context.

Parameters:
document -
Returns:
List

generateAdHocRouteWorkgroupEvents

List<AddAdHocRouteWorkgroupEvent> generateAdHocRouteWorkgroupEvents(Document document)
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


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