Class KualiRuleServiceImpl

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

public class KualiRuleServiceImpl extends Object implements org.kuali.rice.krad.service.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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    applyRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
     
    List<org.kuali.rice.krad.rules.rule.event.AddAdHocRoutePersonEvent>
    generateAdHocRoutePersonEvents(org.kuali.rice.krad.document.Document document)
    Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events
    List<org.kuali.rice.krad.rules.rule.event.AddAdHocRouteWorkgroupEvent>
    generateAdHocRouteWorkgroupEvents(org.kuali.rice.krad.document.Document document)
    Builds a list containing AddAdHocRoutePersonEvents since the validation done for an AdHocRouteRecipient is the same for all events
    org.kuali.rice.krad.rules.rule.BusinessRule
    getBusinessRulesInstance(org.kuali.rice.krad.document.Document document, Class<? extends org.kuali.rice.krad.rules.rule.BusinessRule> ruleInterface)
     
    org.kuali.rice.krad.service.DataDictionaryService
     
    org.kuali.rice.krad.service.DocumentDictionaryService
     
    boolean
    invokeBusinessRuleMethod(org.kuali.rice.krad.rules.rule.BusinessRule rule, org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
    local helper method to invoke the business rule method
    void
    setDataDictionaryService(org.kuali.rice.krad.service.DataDictionaryService dataDictionaryService)
     
    void
    setDocumentDictionaryService(org.kuali.rice.krad.service.DocumentDictionaryService documentDictionaryService)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KualiRuleServiceImpl

      public KualiRuleServiceImpl()
  • Method Details

    • applyRules

      public boolean applyRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
      Specified by:
      applyRules in interface org.kuali.rice.krad.service.KualiRuleService
      See Also:
      • KualiRuleService.applyRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent)
    • invokeBusinessRuleMethod

      public boolean invokeBusinessRuleMethod(org.kuali.rice.krad.rules.rule.BusinessRule rule, org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
      local helper method to invoke the business rule method
      Parameters:
      rule - the business rule class that the method to invoke belongs to
      event - the document event the rule applies to
      Returns:
      a boolean to indicate whether the method invocation was a succes or not
    • generateAdHocRoutePersonEvents

      public List<org.kuali.rice.krad.rules.rule.event.AddAdHocRoutePersonEvent> generateAdHocRoutePersonEvents(org.kuali.rice.krad.document.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 org.kuali.rice.krad.service.KualiRuleService
      See Also:
      • KualiRuleService.generateAdHocRoutePersonEvents(org.kuali.rice.krad.document.Document)
    • generateAdHocRouteWorkgroupEvents

      public List<org.kuali.rice.krad.rules.rule.event.AddAdHocRouteWorkgroupEvent> generateAdHocRouteWorkgroupEvents(org.kuali.rice.krad.document.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 org.kuali.rice.krad.service.KualiRuleService
      See Also:
      • KualiRuleService.generateAdHocRouteWorkgroupEvents(org.kuali.rice.krad.document.Document)
    • getBusinessRulesInstance

      public org.kuali.rice.krad.rules.rule.BusinessRule getBusinessRulesInstance(org.kuali.rice.krad.document.Document document, Class<? extends org.kuali.rice.krad.rules.rule.BusinessRule> ruleInterface)
      Specified by:
      getBusinessRulesInstance in interface org.kuali.rice.krad.service.KualiRuleService
      Parameters:
      document -
      ruleInterface -
      Returns:
      instance of the businessRulesClass for the given document's type, if that businessRulesClass implements the given ruleInterface
    • getDocumentDictionaryService

      public org.kuali.rice.krad.service.DocumentDictionaryService getDocumentDictionaryService()
    • setDocumentDictionaryService

      public void setDocumentDictionaryService(org.kuali.rice.krad.service.DocumentDictionaryService documentDictionaryService)
    • getDataDictionaryService

      public org.kuali.rice.krad.service.DataDictionaryService getDataDictionaryService()
    • setDataDictionaryService

      public void setDataDictionaryService(org.kuali.rice.krad.service.DataDictionaryService dataDictionaryService)