org.kuali.rice.kew.api.rule
Interface RuleService

All Known Implementing Classes:
RuleServiceImpl

public interface RuleService


Method Summary
 RuleQueryResults findRules(QueryByCriteria queryByCriteria)
          Query for rules based on the given search criteria which is a Map of rule field names to values.
 RuleTemplateQueryResults findRuleTemplates(QueryByCriteria queryByCriteria)
          Query for rules based on the given search criteria which is a Map of ruleTemplate field names to values.
 Rule getRule(String id)
          gets a Rule identified by the passed in id
 Rule getRuleByName(String name)
          gets a Rule identified by the passed in rule name
 List<RuleDelegation> getRuleDelegationsByResponsibiltityId(String id)
          gets a RuleDelegations identified by the passed in id for responsibility
 RuleResponsibility getRuleResponsibility(String responsibilityId)
          gets a RuleResponsibility identified by the passed in responsibilityId
 List<Rule> getRulesByTemplateId(String templateId)
          gets a list of Rules with the specified templateId
 List<Rule> getRulesByTemplateNameAndDocumentTypeName(String templateName, String documentTypeName)
          Gets a list of Rules with the specified templateId and documentTypeName.
 List<Rule> getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate(String templateName, String documentTypeName, org.joda.time.DateTime effectiveDate)
          Gets a list of Rules with the specified templateId and documentTypeName.
 RuleTemplate getRuleTemplate(String id)
          gets a RuleTemplate identified by the passed in id
 RuleTemplate getRuleTemplateByName(String name)
          gets a RuleTemplate identified by the passed in name
 List<Rule> ruleReport(RuleReportCriteria reportCriteria)
          Executes a simulation of a document to get all previous and future route information
 

Method Detail

getRule

@Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleType",
           key="\'id=\' + #p0")
Rule getRule(String id)
             throws RiceIllegalArgumentException,
                    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:
RiceIllegalArgumentException - if id is null
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 RiceIllegalArgumentException,
                          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:
RiceIllegalArgumentException - if name is null
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 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:
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 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:
RiceIllegalArgumentException - if id is null

getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate

List<Rule> getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate(String templateName,
                                                                     String documentTypeName,
                                                                     org.joda.time.DateTime effectiveDate)
                                                                     throws 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:
RiceIllegalArgumentException - if id is null

findRules

RuleQueryResults findRules(QueryByCriteria queryByCriteria)
                           throws 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:
RiceIllegalArgumentException

ruleReport

List<Rule> ruleReport(RuleReportCriteria reportCriteria)
                      throws 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:
RiceIllegalArgumentException - if reportCriteria is null

getRuleTemplate

@Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleTemplateType",
           key="\'id=\' + #p0")
RuleTemplate getRuleTemplate(String id)
                             throws 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:
RiceIllegalArgumentException - if id is null
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 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:
RiceIllegalArgumentException - if name is null
RiceIllegalStateException - if RuleTemplate does not exist

findRuleTemplates

RuleTemplateQueryResults findRuleTemplates(QueryByCriteria queryByCriteria)
                                           throws 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:
RiceIllegalArgumentException

getRuleResponsibility

@Cacheable(value="http://rice.kuali.org/kew/v2_0/RuleResponsibilityType",
           key="\'responsibilityId=\' + #p0")
RuleResponsibility getRuleResponsibility(String responsibilityId)
                                         throws 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:
RiceIllegalArgumentException - if id is null
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 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:
RiceIllegalArgumentException - if id is null


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