Interface RuleService


public interface RuleService
  • Method Details

    • getRule

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleType", key="\'id=\' + #p0") Rule getRule(String id) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException, org.kuali.rice.core.api.exception.RiceIllegalStateException
      gets a Rule identified by the passed in id
      Parameters:
      id - unique id for the Rule
      Returns:
      Rule with the passed in unique id
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if id is null
      org.kuali.rice.core.api.exception.RiceIllegalStateException - if Rule does not exist
    • getRuleByName

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleType", key="\'name=\' + #p0") Rule getRuleByName(String name) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException, org.kuali.rice.core.api.exception.RiceIllegalStateException
      gets a Rule identified by the passed in rule name
      Parameters:
      name - name of the Rule
      Returns:
      Rule with the passed in unique id
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if name is null
      org.kuali.rice.core.api.exception.RiceIllegalStateException - if Rule does not exist
    • getRulesByTemplateId

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleType", key="\'templateId=\' + #p0") List<Rule> getRulesByTemplateId(String templateId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      gets a list of Rules with the specified templateId
      Parameters:
      templateId - unique id for the Rule
      Returns:
      Rules with the passed in templateId, or an empty list if none exist
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if templateId is null
    • getRulesByTemplateNameAndDocumentTypeName

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleType", key="\'templateName=\' + #p0 + \'|\' + \'documentTypeName=\' + #p1") List<Rule> getRulesByTemplateNameAndDocumentTypeName(String templateName, String documentTypeName) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Gets a list of Rules with the specified templateId and documentTypeName. Scales up the hierarchy of documentTypes
      Parameters:
      templateName - unique name for the Rule Template. Cannot be null or empty
      documentTypeName - documentTypeName for Rule. Cannot be null or empty
      Returns:
      Rules with the passed in templateId, documentTypeName (or parent document type)or an empty list if none exist
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if id is null
    • getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate

      List<Rule> getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate(String templateName, String documentTypeName, org.joda.time.DateTime effectiveDate) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Gets a list of Rules with the specified templateId and documentTypeName. Scales up the hierarchy of documentTypes
      Parameters:
      templateName - unique name for the Rule Template. Cannot be null or empty
      documentTypeName - documentTypeName for Rule. Cannot be null or empty
      effectiveDate - date for rule effectiveness. Can be null. If null, current time is used.
      Returns:
      Rules with the passed in templateId, documentTypeName (or parent document type)or an empty list if none exist
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if id is null
    • findRules

      RuleQueryResults findRules(org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Query for rules based on the given search criteria which is a Map of rule field names to values.

      This method returns it's results as a List of Rules that match the given search criteria.

      Parameters:
      queryByCriteria - the criteria. Cannot be null.
      Returns:
      a list of Rule objects in which the given criteria match Rule properties. An empty list is returned if an invalid or non-existent criteria is supplied.
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException
    • ruleReport

      List<Rule> ruleReport(RuleReportCriteria reportCriteria) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Executes a simulation of a document to get all previous and future route information
      Parameters:
      reportCriteria - criteria for the rule report to follow
      Returns:
      list of Rules representing the results of the rule report
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if reportCriteria is null
    • getRuleTemplate

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleTemplateType", key="\'id=\' + #p0") RuleTemplate getRuleTemplate(String id) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      gets a RuleTemplate identified by the passed in id
      Parameters:
      id - unique id for the RuleTemplate
      Returns:
      RuleTemplate with the passed in unique id
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if id is null
      org.kuali.rice.core.api.exception.RiceIllegalStateException - if RuleTemplate does not exist
    • getRuleTemplateByName

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleTemplateType", key="\'name=\' + #p0") RuleTemplate getRuleTemplateByName(String name) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      gets a RuleTemplate identified by the passed in name
      Parameters:
      name - unique name for the RuleTemplate
      Returns:
      RuleTemplate with the passed in unique name
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if name is null
      org.kuali.rice.core.api.exception.RiceIllegalStateException - if RuleTemplate does not exist
    • findRuleTemplates

      RuleTemplateQueryResults findRuleTemplates(org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Query for rules based on the given search criteria which is a Map of ruleTemplate field names to values.

      This method returns it's results as a List of RuleTemplates that match the given search criteria.

      Parameters:
      queryByCriteria - the criteria. Cannot be null.
      Returns:
      a list of RuleTemplate objects in which the given criteria match RuleTemplate properties. An empty list is returned if an invalid or non-existent criteria is supplied.
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException
    • getRuleResponsibility

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleResponsibilityType", key="\'responsibilityId=\' + #p0") RuleResponsibility getRuleResponsibility(String responsibilityId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      gets a RuleResponsibility identified by the passed in responsibilityId
      Parameters:
      responsibilityId - unique id for the RuleResponsibility
      Returns:
      RuleResponsibility with the passed in unique responsibilityId
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if id is null
      org.kuali.rice.core.api.exception.RiceIllegalStateException - if RuleResponsibility does not exist
    • getRuleDelegationsByResponsibiltityId

      @Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleDelegationType", key="\'id=\' + #p0") List<RuleDelegation> getRuleDelegationsByResponsibiltityId(String id) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      gets a RuleDelegations identified by the passed in id for responsibility
      Parameters:
      id - unique id for the RuleDelegation's Responsibility
      Returns:
      List of RuleDelegations with the provided ReponsibilityId. Returns an empty list if none exist.
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if id is null