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
Modifier and TypeMethodDescriptionorg.kuali.rice.krms.api.repository.rule.RuleDefinitioncreateRule(org.kuali.rice.krms.api.repository.rule.RuleDefinition rule) This will create aRuleDefinitionexactly like the parameter passed in.voiddeleteRule(String ruleId) Delete theRuleDefinitionwith the given id.org.kuali.rice.krms.api.repository.rule.RuleDefinitiongetRuleByNameAndNamespace(String name, String namespace) Retrieves an Rule from the repository based on the provided rule name and namespace.org.kuali.rice.krms.api.repository.rule.RuleDefinitiongetRuleByRuleId(String ruleId) Retrieves an Rule from the repository based on the given rule id.org.kuali.rice.krms.api.repository.rule.RuleDefinitionupdateRule(org.kuali.rice.krms.api.repository.rule.RuleDefinition rule) This will update an existingRuleDefinition.
-
Method Details
-
createRule
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/RuleType","http://rice.kuali.org/krms/v2_0/PropositionType","http://rice.kuali.org/krms/v2_0/ActionType","http://rice.kuali.org/krms/v2_0/AgendaItemType"}, allEntries=true) org.kuali.rice.krms.api.repository.rule.RuleDefinition createRule(org.kuali.rice.krms.api.repository.rule.RuleDefinition rule) This will create aRuleDefinitionexactly like the parameter passed in.- Parameters:
rule- The Rule to create- Throws:
IllegalArgumentException- if the rule is nullIllegalStateException- if the rule already exists in the system
-
updateRule
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/RuleType","http://rice.kuali.org/krms/v2_0/PropositionType","http://rice.kuali.org/krms/v2_0/ActionType","http://rice.kuali.org/krms/v2_0/AgendaItemType"}, allEntries=true) org.kuali.rice.krms.api.repository.rule.RuleDefinition updateRule(org.kuali.rice.krms.api.repository.rule.RuleDefinition rule) This will update an existingRuleDefinition.- Parameters:
rule- The Rule to update- Throws:
IllegalArgumentException- if the Rule is nullIllegalStateException- if the Rule does not exists in the system
-
deleteRule
Delete theRuleDefinitionwith the given id.- Parameters:
ruleId- to delete.- 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") org.kuali.rice.krms.api.repository.rule.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
RuleDefinitionidentified 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") org.kuali.rice.krms.api.repository.rule.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
RuleDefinitionidentified 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.
-