org.kuali.rice.krms.impl.repository
Interface RuleBoService

All Known Implementing Classes:
RuleBoServiceImpl

public interface RuleBoService

This is the interface for accessing KRMS repository Rule related bos

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

Method Summary
 RuleDefinition createRule(RuleDefinition rule)
          This will create a RuleDefinition exactly like the parameter passed in.
 RuleDefinition getRuleByNameAndNamespace(String name, String namespace)
          Retrieves an Rule from the repository based on the provided rule name and namespace.
 RuleDefinition getRuleByRuleId(String ruleId)
          Retrieves an Rule from the repository based on the given rule id.
 void updateRule(RuleDefinition rule)
          This will update an existing RuleDefinition.
 

Method Detail

createRule

@CacheEvict(value="http://rice.kuali.org/krms/v2_0/RuleType",
            allEntries=true)
RuleDefinition createRule(RuleDefinition rule)
This will create a RuleDefinition exactly like the parameter passed in.

Parameters:
rule - The Rule to create
Throws:
IllegalArgumentException - if the rule is null
IllegalStateException - if the rule already exists in the system

updateRule

@CacheEvict(value="http://rice.kuali.org/krms/v2_0/RuleType",
            allEntries=true)
void updateRule(RuleDefinition rule)
This will update an existing RuleDefinition.

Parameters:
rule - The Rule to update
Throws:
IllegalArgumentException - if the Rule is null
IllegalStateException - if the Rule does not exists in the system

getRuleByRuleId

@Cacheable(value="http://rice.kuali.org/krms/v2_0/RuleType",
           key="\'ruleId=\' + #p0")
RuleDefinition getRuleByRuleId(String ruleId)
Retrieves an Rule from the repository based on the given rule id.

Parameters:
ruleId - the id of the Rule to retrieve
Returns:
an RuleDefinition identified by the given actionId. A null reference is returned if an invalid or non-existent id is supplied.
Throws:
IllegalArgumentException - if the ruleId is null or blank.

getRuleByNameAndNamespace

@Cacheable(value="http://rice.kuali.org/krms/v2_0/RuleType",
           key="\'name=\' + #p0 + \'|\' + \'namespace=\' + #p1")
RuleDefinition getRuleByNameAndNamespace(String name,
                                                   String namespace)
Retrieves an Rule from the repository based on the provided rule name and namespace.

Parameters:
name - the name of the Rule to retrieve.
namespace - the namespace that the rule is under.
Returns:
an RuleDefinition identified by the given name and namespace. A null reference is returned if an invalid or non-existent name and namespace combination is supplied.
Throws:
IllegalArgumentException - if the either the name or the namespace is null or blank.


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