Interface RuleRepositoryService
public interface RuleRepositoryService
The rule repository contains all of the information about context definitions,
agendas, and business rules.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptiongetAgendaTree(String agendaId) Retrieves the agenda tree for the given agendaId.getAgendaTrees(List<String> agendaIds) Retrieves all of the agendas trees for the given list of agendaIds.Retrieves the rule for the given ruleId.Retrieves all of the rules for the given list of ruleIds.selectContext(ContextSelectionCriteria contextSelectionCriteria) Locates a ContextDefinition based on the given map of context qualifiers.
-
Method Details
-
selectContext
@Cacheable(value="http://rice.kuali.org/krms/v2_0/ContextDefinitionType", key="\'name=\' + #p0.name + \'|\' + \'namespaceCode=\' + #p0.namespaceCode + \'|\' + \'contextQualifiers=\' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).mapKey(#p0.contextQualifiers)") ContextDefinition selectContext(ContextSelectionCriteria contextSelectionCriteria) throws RiceIllegalArgumentException Locates a ContextDefinition based on the given map of context qualifiers. The requirements for valid selection criteria are implementation dependent. An IllegalArgumentException may be thrown if the implementation can't operate with the given criteria.- Parameters:
contextSelectionCriteria-- Returns:
- Throws:
RiceIllegalArgumentException- if the implementation can't handle the given ContextSelectionCriteria- See Also:
-
getAgendaTree
@Cacheable(value="http://rice.kuali.org/krms/v2_0/AgendaTreeDefinition", key="\'agendaId=\' + #p0") AgendaTreeDefinition getAgendaTree(String agendaId) throws RiceIllegalArgumentException Retrieves the agenda tree for the given agendaId. The agenda tree includes the entire agenda definition in the appropriate order and with the defined agenda branching.- Parameters:
agendaId- the id of the agenda for which to retrieve the agenda tree- Returns:
- the agenda tree, or null if no agenda could be located for the given agendaId
- Throws:
RiceIllegalArgumentException- if the given agendaId is null
-
getAgendaTrees
List<AgendaTreeDefinition> getAgendaTrees(List<String> agendaIds) throws RiceIllegalArgumentException Retrieves all of the agendas trees for the given list of agendaIds. The agenda tree includes the entire agenda definition in the appropriate order and with the defined agenda branching.The list which is returned from this operation may not be the same size as the list which is passed to this method. If an agenda doesn't exist for a given agenda id then no result for that id will be returned in the list. As a result of this, the returned list can be empty, but it will never be null.
- Parameters:
agendaIds- the list of agenda ids for which to retrieve the agenda trees- Returns:
- the list of agenda trees for the given ids, this list will only contain agenda trees for the ids that were resolved successfully, it will never return null but could return an empty list if no agenda trees could be loaded for the given set of ids
- Throws:
RiceIllegalArgumentException- if the given list of agendaIds is null
-
getRule
@Cacheable(value="http://rice.kuali.org/krms/v2_0/RuleType", key="\'ruleId=\' + #p0") RuleDefinition getRule(String ruleId) throws RiceIllegalArgumentException Retrieves the rule for the given ruleId. The rule includes the propositions which define the condition that is to be evaluated on the rule. It also defines a collection of actions which will be invoked if the rule succeeds.- Parameters:
ruleId- the id of the rule to retrieve- Returns:
- the rule definition, or null if no rule could be located for the given ruleId
- Throws:
RiceIllegalArgumentException- if the given ruleId is null
-
getRules
@Cacheable(value="http://rice.kuali.org/krms/v2_0/RuleType", key="\'ruleIds=\' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).key(#p0)") List<RuleDefinition> getRules(List<String> ruleIds) throws RiceIllegalArgumentException Retrieves all of the rules for the given list of ruleIds. The rule includes the propositions which define the condition that is to be evaluated on the rule. It also defines a collection of actions which will be invoked if the rule succeeds.The list which is returned from this operation may not be the same size as the list which is passed to this method. If a rule doesn't exist for a given rule id then no result for that id will be returned in the list. As a result of this, the returned list can be empty, but it will never be null.
- Parameters:
ruleIds- the list of rule ids for which to retrieve the rules- Returns:
- the list of rules for the given ids, this list will only contain rules for the ids that were resolved successfully, it will never return null but could return an empty list if no rules could be loaded for the given set of ids
- Throws:
RiceIllegalArgumentException- if the given list of ruleIds is null
-