org.kuali.rice.kew.impl.rule
Class RuleServiceImpl

java.lang.Object
  extended by org.kuali.rice.kew.impl.rule.RuleServiceImpl
All Implemented Interfaces:
RuleService

public class RuleServiceImpl
extends Object
implements RuleService

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
RuleServiceImpl()
           
 
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.
 BusinessObjectService getBusinessObjectService()
           
 CriteriaLookupService getCriteriaLookupService()
           
 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 ruleReportCriteria)
          Executes a simulation of a document to get all previous and future route information
 void setBusinessObjectService(BusinessObjectService businessObjectService)
           
 void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleServiceImpl

public RuleServiceImpl()
Method Detail

getRule

public Rule getRule(String id)
             throws RiceIllegalArgumentException,
                    RiceIllegalStateException
Description copied from interface: RuleService
gets a Rule identified by the passed in id

Specified by:
getRule in interface RuleService
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

public Rule getRuleByName(String name)
Description copied from interface: RuleService
gets a Rule identified by the passed in rule name

Specified by:
getRuleByName in interface RuleService
Parameters:
name - name of the Rule
Returns:
Rule with the passed in unique id

getRulesByTemplateId

public List<Rule> getRulesByTemplateId(String templateId)
                                throws RiceIllegalArgumentException
Description copied from interface: RuleService
gets a list of Rules with the specified templateId

Specified by:
getRulesByTemplateId in interface RuleService
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

public List<Rule> getRulesByTemplateNameAndDocumentTypeName(String templateName,
                                                            String documentTypeName)
Description copied from interface: RuleService
Gets a list of Rules with the specified templateId and documentTypeName. Scales up the hierarchy of documentTypes

Specified by:
getRulesByTemplateNameAndDocumentTypeName in interface RuleService
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

getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate

public List<Rule> getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate(String templateName,
                                                                            String documentTypeName,
                                                                            org.joda.time.DateTime effectiveDate)
                                                                     throws RiceIllegalArgumentException
Description copied from interface: RuleService
Gets a list of Rules with the specified templateId and documentTypeName. Scales up the hierarchy of documentTypes

Specified by:
getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate in interface RuleService
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

public RuleQueryResults findRules(QueryByCriteria queryByCriteria)
Description copied from interface: RuleService
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.

Specified by:
findRules in interface RuleService
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.

ruleReport

public List<Rule> ruleReport(RuleReportCriteria ruleReportCriteria)
Description copied from interface: RuleService
Executes a simulation of a document to get all previous and future route information

Specified by:
ruleReport in interface RuleService
Parameters:
ruleReportCriteria - criteria for the rule report to follow
Returns:
list of Rules representing the results of the rule report

getRuleTemplate

public RuleTemplate getRuleTemplate(String id)
Description copied from interface: RuleService
gets a RuleTemplate identified by the passed in id

Specified by:
getRuleTemplate in interface RuleService
Parameters:
id - unique id for the RuleTemplate
Returns:
RuleTemplate with the passed in unique id

getRuleTemplateByName

public RuleTemplate getRuleTemplateByName(String name)
Description copied from interface: RuleService
gets a RuleTemplate identified by the passed in name

Specified by:
getRuleTemplateByName in interface RuleService
Parameters:
name - unique name for the RuleTemplate
Returns:
RuleTemplate with the passed in unique name

findRuleTemplates

public RuleTemplateQueryResults findRuleTemplates(QueryByCriteria queryByCriteria)
                                           throws RiceIllegalArgumentException
Description copied from interface: RuleService
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.

Specified by:
findRuleTemplates in interface RuleService
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

public RuleResponsibility getRuleResponsibility(String responsibilityId)
Description copied from interface: RuleService
gets a RuleResponsibility identified by the passed in responsibilityId

Specified by:
getRuleResponsibility in interface RuleService
Parameters:
responsibilityId - unique id for the RuleResponsibility
Returns:
RuleResponsibility with the passed in unique responsibilityId

getRuleDelegationsByResponsibiltityId

public List<RuleDelegation> getRuleDelegationsByResponsibiltityId(String id)
                                                           throws RiceIllegalArgumentException,
                                                                  RiceIllegalStateException
Description copied from interface: RuleService
gets a RuleDelegations identified by the passed in id for responsibility

Specified by:
getRuleDelegationsByResponsibiltityId in interface RuleService
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
RiceIllegalStateException

getBusinessObjectService

public BusinessObjectService getBusinessObjectService()

setBusinessObjectService

public void setBusinessObjectService(BusinessObjectService businessObjectService)

getCriteriaLookupService

public CriteriaLookupService getCriteriaLookupService()

setCriteriaLookupService

public void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)


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