org.kuali.rice.krad.service.impl
Class KualiRuleServiceImpl

java.lang.Object
  extended by org.kuali.rice.krad.service.impl.KualiRuleServiceImpl
All Implemented Interfaces:
KualiRuleService

public class KualiRuleServiceImpl
extends Object
implements KualiRuleService

This class 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.


Constructor Summary
KualiRuleServiceImpl()
           
 
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 AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events.
 List<AddAdHocRouteWorkgroupEvent> generateAdHocRouteWorkgroupEvents(Document document)
          Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events.
 BusinessRule getBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface)
          Allows code in actions or business objects to directly access rule methods in the class.
 DataDictionaryService getDataDictionaryService()
           
 DocumentDictionaryService getDocumentDictionaryService()
           
 void setDataDictionaryService(DataDictionaryService dataDictionaryService)
           
 void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KualiRuleServiceImpl

public KualiRuleServiceImpl()
Method Detail

applyRules

public boolean applyRules(KualiDocumentEvent event)
Description copied from interface: KualiRuleService
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.

Specified by:
applyRules in interface KualiRuleService
Returns:
true if no rule is applied, or all rules are applied successfully, false otherwise
See Also:
KualiRuleService.applyRules(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent)

generateAdHocRoutePersonEvents

public List<AddAdHocRoutePersonEvent> generateAdHocRoutePersonEvents(Document document)
Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events.

Specified by:
generateAdHocRoutePersonEvents in interface KualiRuleService
Returns:
List
See Also:
KualiRuleService.generateAdHocRoutePersonEvents(org.kuali.rice.krad.document.Document)

generateAdHocRouteWorkgroupEvents

public List<AddAdHocRouteWorkgroupEvent> generateAdHocRouteWorkgroupEvents(Document document)
Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events.

Specified by:
generateAdHocRouteWorkgroupEvents in interface KualiRuleService
Returns:
List
See Also:
KualiRuleService.generateAdHocRouteWorkgroupEvents(org.kuali.rice.krad.document.Document)

getBusinessRulesInstance

public BusinessRule getBusinessRulesInstance(Document document,
                                             Class<? extends BusinessRule> ruleInterface)
Description copied from interface: KualiRuleService
Allows code in actions or business objects to directly access rule methods in the class.

Specified by:
getBusinessRulesInstance in interface KualiRuleService
Parameters:
document -
ruleInterface -
Returns:
instance of the businessRulesClass for the given document's type, if that businessRulesClass implements the given ruleInterface

getDocumentDictionaryService

public DocumentDictionaryService getDocumentDictionaryService()

setDocumentDictionaryService

public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)

getDataDictionaryService

public DataDictionaryService getDataDictionaryService()

setDataDictionaryService

public void setDataDictionaryService(DataDictionaryService dataDictionaryService)


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