org.kuali.rice.krms.api.repository
Interface RuleManagementService

All Superinterfaces:
TranslateBusinessMethods
All Known Implementing Classes:
RuleManagementServiceImpl, RuleManagementServiceMockImpl

public interface RuleManagementService
extends TranslateBusinessMethods

The rule maintenance service operations facilitate management of rules and associated information.

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

Method Summary
 ActionDefinition createAction(ActionDefinition actionDefinition)
          Create Action
 AgendaDefinition createAgenda(AgendaDefinition agendaDefinition)
          Create Agenda and an empty first item
 AgendaItemDefinition createAgendaItem(AgendaItemDefinition agendaItemDefinition)
          Create AgendaItem
 ContextDefinition createContext(ContextDefinition contextDefinition)
          Create Context
 NaturalLanguageTemplate createNaturalLanguageTemplate(NaturalLanguageTemplate naturalLanguageTemplate)
          This will create a NaturalLanguageTemplate exactly like the parameter passed in except the id will be assigned and create date/user will be set.
 NaturalLanguageUsage createNaturalLanguageUsage(NaturalLanguageUsage naturalLanguageUsage)
          Create NaturalLanguageUsage
 PropositionDefinition createProposition(PropositionDefinition propositionDefinition)
          Create a Proposition
 ReferenceObjectBinding createReferenceObjectBinding(ReferenceObjectBinding referenceObjectDefinition)
          Create RefObject-KRMS object binding
 RuleDefinition createRule(RuleDefinition ruleDefinition)
          Create Rule
 void deleteAction(String id)
          Delete the specified Action
 void deleteAgenda(String id)
          Delete the specified Agenda
 void deleteAgendaItem(String id)
          Delete the specified AgendaItem
 void deleteContext(String id)
          Delete the specified Context
 void deleteNaturalLanguageTemplate(String naturalLanguageTemplateId)
          Delete the NaturalLanguageTemplate with the given id.
 void deleteNaturalLanguageUsage(String naturalLanguageUsageId)
          Delete NaturalLanguageUsage
 void deleteProposition(String id)
          Delete the Proposition
 void deleteReferenceObjectBinding(String id)
          Delete the specified ReferenceObjectBinding object
 void deleteRule(String id)
          Delete the specified Rule
 List<String> findActionIds(QueryByCriteria queryByCriteria)
          Query for Action ids based on the given search criteria which is a Map of Action field names to values.
 List<String> findAgendaIds(QueryByCriteria queryByCriteria)
          Query for Agenda ids based on the given search criteria which is a Map of Agenda field names to values.
 List<String> findContextIds(QueryByCriteria queryByCriteria)
          Query for Context ids based on the given search criteria which is a Map of Context field names to values.
 AgendaDefinition findCreateAgenda(AgendaDefinition agendaDefinition)
          Create Agenda if not found by contextId and name
 ContextDefinition findCreateContext(ContextDefinition contextDefinition)
          find Create Context Searches for an existing context with the same name and namespace and returns it otherwise it creates the context.
 NaturalLanguageTemplate findNaturalLanguageTemplateByLanguageCodeTypeIdAndNluId(String languageCode, String typeId, String naturalLanguageUsageId)
           
 List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByLanguageCode(String languageCode)
          Finds all the natural language templates for a particular language
 List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByNaturalLanguageUsage(String naturalLanguageUsageId)
          Find all the natural language templates for a particular usage
 List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByTemplate(String template)
          Find the natural language template using the actual text of the template.
 List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByType(String typeId)
          Find all the natural language templates of a particular type Template types are keys that identify the message that is to be expressed in different languages and in different usage scenarios
 List<String> findPropositionIds(QueryByCriteria queryByCriteria)
          Query for Proposition ids based on the given search criteria which is a Map of Proposition field names to values.
 List<String> findReferenceObjectBindingIds(QueryByCriteria queryByCriteria)
          Query for ReferenceObjectBinding ids based on the given search criteria which is a Map of ReferenceObjectBinding field names to values.
 List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsDiscriminatorType(String referenceObjectKrmsDiscriminatorType)
          Retrieves list of ReferenceObjectBinding objects for the given krms obj discriminator type
 List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsObject(String krmsObjectId)
          Retrieves list of ReferenceObjectBinding objects for the given KRMS obj id.
 List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceDiscriminatorType(String referenceObjectReferenceDiscriminatorType)
          Retrieves list of ReferenceObjectBinding objects for the given ref obj discriminator type
 List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceObject(String referenceObjectReferenceDiscriminatorType, String referenceObjectId)
          Retrieves list of ReferenceObjectBinding objects for the given obj discriminator type and reference object id
 List<String> findRuleIds(QueryByCriteria queryByCriteria)
          Query for Rule ids based on the given search criteria which is a Map of Rule field names to values.
 ActionDefinition getAction(String actionId)
          Retrieves the action for the given actionId.
 List<ActionDefinition> getActions(List<String> actionIds)
          Retrieves all of the actions for the given list of actionIds.
 AgendaDefinition getAgenda(String id)
          Retrieve Agenda for the specified id
 AgendaDefinition getAgendaByNameAndContextId(String name, String contextId)
          Retrieves an Agenda from the repository based on the provided agenda name and context id.
 AgendaItemDefinition getAgendaItem(String id)
          Retrieve AgendaItem by the specified identifier
 List<AgendaItemDefinition> getAgendaItemsByContext(String contextId)
          Retrieve AgendaItems associated with a context
 List<AgendaItemDefinition> getAgendaItemsByType(String typeId)
          Retrieve AgendaItems by specified type
 List<AgendaItemDefinition> getAgendaItemsByTypeAndContext(String typeId, String contextId)
          Retrieve AgendaItems by type and context
 List<AgendaDefinition> getAgendasByContext(String contextId)
          Retrieve Agendas associated with the specified context
 List<AgendaDefinition> getAgendasByType(String typeId)
          Retrieve Agendas of the specified type
 List<AgendaDefinition> getAgendasByTypeAndContext(String typeId, String contextId)
          Retrieve Agendas of the specified type and context
 AgendaTreeDefinition getAgendaTree(String agendaId)
          Retrieves the agenda tree for the given agendaId.
 List<AgendaTreeDefinition> getAgendaTrees(List<String> agendaIds)
          Retrieves all of the agendas trees for the given list of agendaIds.
 ContextDefinition getContext(String id)
          Retrieve Context for the specified id
 ContextDefinition getContextByNameAndNamespace(String name, String namespace)
          Retrieves an Context from the repository based on the provided context name and namespace.
 NaturalLanguageTemplate getNaturalLanguageTemplate(String naturalLanguageTemplateId)
          Retrieves a NaturalLanguageTemplate from the repository based on the given id.
 NaturalLanguageUsage getNaturalLanguageUsage(String id)
          Retrieve NaturalLanguageUsage specified by the identifier
 NaturalLanguageUsage getNaturalLanguageUsageByNameAndNamespace(String name, String namespace)
          Retrieve NaturalLanguageUsage specified by name and namespace
 List<NaturalLanguageUsage> getNaturalLanguageUsagesByNamespace(String namespace)
          Translates and retrieves a NaturalLanguage for a given KRMS object (e.g, proposition or agenda), NaturalLanguage usage type (context) and language into natural language TODO: Add appropriate caching annotation
 PropositionDefinition getProposition(String id)
          Retrieve Proposition specified by the identifier
 Set<PropositionDefinition> getPropositionsByRule(String ruleId)
          Retrieve Propositions associated with the specified Rule
 Set<PropositionDefinition> getPropositionsByType(String typeId)
          Retrieve Propositions of the specified type
 ReferenceObjectBinding getReferenceObjectBinding(String id)
          Retrieve referenceObjectBinding given a specific id
 List<ReferenceObjectBinding> getReferenceObjectBindings(List<String> ids)
          Retrieve list of ReferenceObjectBinding objects given ids
 RuleDefinition getRule(String ruleId)
          Retrieves the rule for the given ruleId.
 RuleDefinition getRuleByNameAndNamespace(String name, String namespace)
          Retrieves an Rule from the repository based on the provided rule name and namespace.
 List<RuleDefinition> getRules(List<String> ruleIds)
          Retrieves all of the rules for the given list of ruleIds.
 ContextDefinition selectContext(ContextSelectionCriteria contextSelectionCriteria)
          Locates a ContextDefinition based on the given map of context qualifiers.
 String translateNaturalLanguageForObject(String naturalLanguageUsageId, String typeId, String krmsObjectId, String languageCode)
          Translates and retrieves a NaturalLanguage for a given KRMS object (e.g, proposition or agenda), NaturalLanguage usage type (context) and language into natural language TODO: Add appropriate caching annotation
 String translateNaturalLanguageForProposition(String naturalLanguageUsageId, PropositionDefinition propositionDefinintion, String languageCode)
          Retrieve all the NaturalLanguageUsages
 NaturalLanguageTree translateNaturalLanguageTreeForProposition(String naturalLanguageUsageId, PropositionDefinition propositionDefinintion, String languageCode)
          Translates NaturalLanguage for a given proposition, returning a tree of the NaturalLanguage.
 void updateAction(ActionDefinition actionDefinition)
          Update the Action specified by the identifier in the DTO
 void updateAgenda(AgendaDefinition agendaDefinition)
          Update the Agenda specified by the identifier in the input DTO
 void updateAgendaItem(AgendaItemDefinition agendaItemDefinition)
          Update an AgendaItem
 void updateContext(ContextDefinition contextDefinition)
          Update the Context specified by the identifier in the input DTO
 void updateNaturalLanguageTemplate(NaturalLanguageTemplate naturalLanguageTemplate)
          This will update an existing NaturalLanguageTemplate.
 void updateNaturalLanguageUsage(NaturalLanguageUsage naturalLanguageUsage)
          Update NaturalLanguageUsage
 void updateProposition(PropositionDefinition propositionDefinition)
          Update the Proposition
 void updateReferenceObjectBinding(ReferenceObjectBinding referenceObjectBindingDefinition)
          Update the ReferenceObjectBinding object specified by the identifier in the given DTO
 void updateRule(RuleDefinition ruleDefinition)
          Update the Rule specified by the identifier in the DTO
 

Method Detail

createReferenceObjectBinding

ReferenceObjectBinding createReferenceObjectBinding(ReferenceObjectBinding referenceObjectDefinition)
                                                    throws RiceIllegalArgumentException
Create RefObject-KRMS object binding

Parameters:
referenceObjectDefinition - data for the new ReferenceObjectBinding to be created
Returns:
newly created ReferenceObjectBinding
Throws:
RiceIllegalArgumentException - if the given referenceObjectDefinition is null or invalid

getReferenceObjectBinding

ReferenceObjectBinding getReferenceObjectBinding(String id)
                                                 throws RiceIllegalArgumentException
Retrieve referenceObjectBinding given a specific id

Parameters:
id - identifier of the ReferenceObjectBinding to be retrieved
Returns:
a ReferenceObjectBinding with the given id value
Throws:
RiceIllegalArgumentException - if the given id is blank or invalid

getReferenceObjectBindings

List<ReferenceObjectBinding> getReferenceObjectBindings(List<String> ids)
                                                        throws RiceIllegalArgumentException
Retrieve list of ReferenceObjectBinding objects given ids

Parameters:
ids - identifiers of the ReferenceObjectBinding to be retrieved
Returns:
list of ReferenceObjectBinding objects for the given ids
Throws:
RiceIllegalArgumentException - if one or more ids in the give list is blank or invalid

findReferenceObjectBindingsByReferenceDiscriminatorType

List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceDiscriminatorType(String referenceObjectReferenceDiscriminatorType)
                                                                                     throws RiceIllegalArgumentException
Retrieves list of ReferenceObjectBinding objects for the given ref obj discriminator type

Parameters:
referenceObjectReferenceDiscriminatorType - reference object type
Returns:
list of ReferenceObjectBinding objects for the given discriminator type
Throws:
RiceIllegalArgumentException - if the given referenceObjectReferenceDiscriminatorType is blank or invalid

findReferenceObjectBindingsByKrmsDiscriminatorType

List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsDiscriminatorType(String referenceObjectKrmsDiscriminatorType)
                                                                                throws RiceIllegalArgumentException
Retrieves list of ReferenceObjectBinding objects for the given krms obj discriminator type

Parameters:
referenceObjectKrmsDiscriminatorType - reference object type
Returns:
list of ReferenceObjectBinding objects for the given discriminator type
Throws:
RiceIllegalArgumentException - if the given referenceObjectKrmsDiscriminatorType is blank or invalid

findReferenceObjectBindingsByReferenceObject

List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceObject(String referenceObjectReferenceDiscriminatorType,
                                                                          String referenceObjectId)
                                                                          throws RiceIllegalArgumentException
Retrieves list of ReferenceObjectBinding objects for the given obj discriminator type and reference object id

Parameters:
referenceObjectReferenceDiscriminatorType - reference object type
referenceObjectId - reference object id
Returns:
list of ReferenceObjectBinding objects for the given discriminator type
Throws:
RiceIllegalArgumentException - if the given referenceObjectKrmsDiscriminatorType or id is blank or invalid

findReferenceObjectBindingsByKrmsObject

List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsObject(String krmsObjectId)
                                                                     throws RiceIllegalArgumentException
Retrieves list of ReferenceObjectBinding objects for the given KRMS obj id.

Parameters:
krmsObjectId - identifier of the KRMS obj
Returns:
list of ReferenceObjectBinding objects for the given KRMS obj
Throws:
RiceIllegalArgumentException - if the given krmsObjectId is blank or invalid

updateReferenceObjectBinding

void updateReferenceObjectBinding(ReferenceObjectBinding referenceObjectBindingDefinition)
                                  throws RiceIllegalArgumentException
Update the ReferenceObjectBinding object specified by the identifier in the given DTO

Parameters:
referenceObjectBindingDefinition - DTO with updated info and id of the object to be updated
Throws:
RiceIllegalArgumentException - if the given referenceObjectBindingDefinition is null or invalid

deleteReferenceObjectBinding

void deleteReferenceObjectBinding(String id)
                                  throws RiceIllegalArgumentException
Delete the specified ReferenceObjectBinding object

Parameters:
id - identifier of the object to be deleted
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

findReferenceObjectBindingIds

List<String> findReferenceObjectBindingIds(QueryByCriteria queryByCriteria)
                                           throws RiceIllegalArgumentException
Query for ReferenceObjectBinding ids based on the given search criteria which is a Map of ReferenceObjectBinding field names to values.

This method returns it's results as a List of ReferenceObjectBinding ids that match the given search criteria.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
a list of ids matching the given criteria properties. An empty list is returned if an invalid or non-existent criteria is supplied.
Throws:
RiceIllegalArgumentException - if the queryByCriteria is null

createAgenda

AgendaDefinition createAgenda(AgendaDefinition agendaDefinition)
                              throws RiceIllegalArgumentException
Create Agenda and an empty first item

Parameters:
agendaDefinition - data for the new Agenda to be created
Returns:
newly created Agenda
Throws:
RiceIllegalArgumentException - if the given agendaDefinition is null or invalid

findCreateAgenda

AgendaDefinition findCreateAgenda(AgendaDefinition agendaDefinition)
                                  throws RiceIllegalArgumentException
Create Agenda if not found by contextId and name

Parameters:
agendaDefinition - data for the new Agenda to be created
Returns:
newly created or found Agenda
Throws:
RiceIllegalArgumentException - if the given agendaDefinition is null or invalid

getAgenda

AgendaDefinition getAgenda(String id)
                           throws RiceIllegalArgumentException
Retrieve Agenda for the specified id

Parameters:
id - identifier for the Agenda
Returns:
specified Agenda
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

getAgendaByNameAndContextId

AgendaDefinition getAgendaByNameAndContextId(String name,
                                             String contextId)
Retrieves an Agenda from the repository based on the provided agenda name and context id.

Parameters:
name - the name of the Agenda to retrieve.
contextId - the id of the context that the agenda belongs to.
Returns:
an AgendaDefinition identified by the given name and namespace. A null reference is returned if an invalid or non-existent name and namespace combination is supplied.

getAgendasByType

List<AgendaDefinition> getAgendasByType(String typeId)
                                        throws RiceIllegalArgumentException
Retrieve Agendas of the specified type

Parameters:
typeId - type of the Agenda
Returns:
list of Agendas of the specified type
Throws:
RiceIllegalArgumentException - if the given typeId is null or invalid

getAgendasByContext

List<AgendaDefinition> getAgendasByContext(String contextId)
                                           throws RiceIllegalArgumentException
Retrieve Agendas associated with the specified context

Parameters:
contextId - context of interest
Returns:
list of Agendas associated with the context
Throws:
RiceIllegalArgumentException - if the given contextId is null or invalid

getAgendasByTypeAndContext

List<AgendaDefinition> getAgendasByTypeAndContext(String typeId,
                                                  String contextId)
                                                  throws RiceIllegalArgumentException
Retrieve Agendas of the specified type and context

Parameters:
typeId - type of the Agenda
contextId - context of interest
Returns:
list of Agendas associated with the specified type and context
Throws:
RiceIllegalArgumentException - if the given typeId or contextId null or invalid

updateAgenda

void updateAgenda(AgendaDefinition agendaDefinition)
                  throws RiceIllegalArgumentException
Update the Agenda specified by the identifier in the input DTO

Parameters:
agendaDefinition - DTO with updated info and identifier of the object to be updated
Throws:
RiceIllegalArgumentException - if the given agendaDefinition is null or invalid

deleteAgenda

void deleteAgenda(String id)
                  throws RiceIllegalArgumentException
Delete the specified Agenda

Parameters:
id - identifier of the object to be deleted
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

createAgendaItem

AgendaItemDefinition createAgendaItem(AgendaItemDefinition agendaItemDefinition)
                                      throws RiceIllegalArgumentException
Create AgendaItem

Parameters:
agendaItemDefinition - data for the new AgendaItem to be created
Returns:
newly created AgendaItem
Throws:
RiceIllegalArgumentException - if the given agendaItemDefinition is null or invalid

getAgendaItem

AgendaItemDefinition getAgendaItem(String id)
                                   throws RiceIllegalArgumentException
Retrieve AgendaItem by the specified identifier

Parameters:
id - identifier of the AgendaItem
Returns:
AgendaItem specified by the identifier
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

getAgendaItemsByType

List<AgendaItemDefinition> getAgendaItemsByType(String typeId)
                                                throws RiceIllegalArgumentException
Retrieve AgendaItems by specified type

Parameters:
typeId - type of the AgendaItems
Returns:
list of AgendaItems of the specified type
Throws:
RiceIllegalArgumentException - if the given typeId is null or invalid

getAgendaItemsByContext

List<AgendaItemDefinition> getAgendaItemsByContext(String contextId)
                                                   throws RiceIllegalArgumentException
Retrieve AgendaItems associated with a context

Parameters:
contextId - context identifier
Returns:
list of AgendaItems associated with a context
Throws:
RiceIllegalArgumentException - if the given contextId is null or invalid

getAgendaItemsByTypeAndContext

List<AgendaItemDefinition> getAgendaItemsByTypeAndContext(String typeId,
                                                          String contextId)
                                                          throws RiceIllegalArgumentException
Retrieve AgendaItems by type and context

Parameters:
typeId - type of the Agendas
contextId - context with which the Agendas are associated
Returns:
list of AgendaItems of the specified type and context
Throws:
RiceIllegalArgumentException - if the given typeId or contextId null or invalid

updateAgendaItem

void updateAgendaItem(AgendaItemDefinition agendaItemDefinition)
                      throws RiceIllegalArgumentException
Update an AgendaItem

Parameters:
agendaItemDefinition - updated data for the AgendaItem, with id of the object to be updated
Throws:
RiceIllegalArgumentException - if the given agendaItemDefinition is null or invalid

deleteAgendaItem

void deleteAgendaItem(String id)
                      throws RiceIllegalArgumentException
Delete the specified AgendaItem

Parameters:
id - identifier of the AgendaItem to be deleted
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

createRule

RuleDefinition createRule(RuleDefinition ruleDefinition)
                          throws RiceIllegalArgumentException
Create Rule

Parameters:
ruleDefinition - data for the new Rule to be created
Returns:
newly created Rule
Throws:
RiceIllegalArgumentException - if the given ruleDefinition is null or invalid

getRule

RuleDefinition getRule(String ruleId)
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:
IllegalArgumentException - if the given ruleId is null

getRuleByNameAndNamespace

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.

getRules

List<RuleDefinition> getRules(List<String> ruleIds)
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:
IllegalArgumentException - if the given list of ruleIds is null

updateRule

void updateRule(RuleDefinition ruleDefinition)
                throws RiceIllegalArgumentException
Update the Rule specified by the identifier in the DTO

Parameters:
ruleDefinition - updated Rule information, object specified by the id
Throws:
RiceIllegalArgumentException - if the given ruleDefinition is null or invalid

deleteRule

void deleteRule(String id)
                throws RiceIllegalArgumentException
Delete the specified Rule

Parameters:
id - identifier of the Rule to be deleted
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

createAction

ActionDefinition createAction(ActionDefinition actionDefinition)
                              throws RiceIllegalArgumentException
Create Action

Parameters:
actionDefinition - data for the new Action to be created
Returns:
newly created Action
Throws:
RiceIllegalArgumentException - if the given actionDefinition is null or invalid

getAction

ActionDefinition getAction(String actionId)
                           throws RiceIllegalArgumentException
Retrieves the action for the given actionId. The action includes the propositions which define the condition that is to be evaluated on the action. It also defines a collection of actions which will be invoked if the action succeeds.

Parameters:
actionId - the id of the action to retrieve
Returns:
the action definition, or null if no action could be located for the given actionId
Throws:
IllegalArgumentException - if the given actionId is null
RiceIllegalArgumentException

getActions

List<ActionDefinition> getActions(List<String> actionIds)
                                  throws RiceIllegalArgumentException
Retrieves all of the actions for the given list of actionIds.

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 action doesn't exist for a given action 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:
actionIds - the list of action ids for which to retrieve the actions
Returns:
the list of actions for the given ids, this list will only contain actions for the ids that were resolved successfully, it will never return null but could return an empty list if no actions could be loaded for the given set of ids
Throws:
IllegalArgumentException - if the given list of actionIds is null
RiceIllegalArgumentException

updateAction

void updateAction(ActionDefinition actionDefinition)
                  throws RiceIllegalArgumentException
Update the Action specified by the identifier in the DTO

Parameters:
actionDefinition - updated Action information, object specified by the id
Throws:
RiceIllegalArgumentException - if the given actionDefinition is null or invalid

deleteAction

void deleteAction(String id)
                  throws RiceIllegalArgumentException
Delete the specified Action

Parameters:
id - identifier of the Action to be deleted
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

createProposition

PropositionDefinition createProposition(PropositionDefinition propositionDefinition)
                                        throws RiceIllegalArgumentException
Create a Proposition

Parameters:
propositionDefinition - data for the new Proposition to be created
Returns:
newly created Proposition
Throws:
RiceIllegalArgumentException - if the given propositionDefinition is null or invalid

getProposition

PropositionDefinition getProposition(String id)
                                     throws RiceIllegalArgumentException
Retrieve Proposition specified by the identifier

Parameters:
id - identifier of the Proposition to be retrieved
Returns:
specified Proposition
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

getPropositionsByType

Set<PropositionDefinition> getPropositionsByType(String typeId)
                                                 throws RiceIllegalArgumentException
Retrieve Propositions of the specified type

Parameters:
typeId - type of the Propositions to be retrieved
Returns:
list of Propositions of the specified type
Throws:
RiceIllegalArgumentException - if the given typeId is null or invalid

getPropositionsByRule

Set<PropositionDefinition> getPropositionsByRule(String ruleId)
                                                 throws RiceIllegalArgumentException
Retrieve Propositions associated with the specified Rule

Parameters:
ruleId - identifier of the Rule to which the Propositions are associated with
Returns:
list of Propositions associated with the Rule
Throws:
RiceIllegalArgumentException - if the given ruleId is null or invalid

updateProposition

void updateProposition(PropositionDefinition propositionDefinition)
                       throws RiceIllegalArgumentException
Update the Proposition

Parameters:
propositionDefinition - updated data for the Proposition, id specifies the object to be updated
Throws:
RiceIllegalArgumentException - if the given propositionDefinition is null or invalid

deleteProposition

void deleteProposition(String id)
                       throws RiceIllegalArgumentException
Delete the Proposition

Parameters:
id - identifier of the Proposition to be deleted
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

createNaturalLanguageUsage

NaturalLanguageUsage createNaturalLanguageUsage(NaturalLanguageUsage naturalLanguageUsage)
                                                throws RiceIllegalArgumentException
Create NaturalLanguageUsage

Parameters:
naturalLanguageUsage - data for the new NaturalLanguageUsage to be created
Returns:
newly created NaturalLanguageUsage
Throws:
RiceIllegalArgumentException - if the given naturalLanguageUsage is null or invalid

getNaturalLanguageUsage

NaturalLanguageUsage getNaturalLanguageUsage(String id)
                                             throws RiceIllegalArgumentException
Retrieve NaturalLanguageUsage specified by the identifier

Parameters:
id - identifier of the NaturalLanguageUsage to be retrieved
Returns:
NaturalLanguageUsage specified by the identifier
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

getNaturalLanguageUsageByNameAndNamespace

NaturalLanguageUsage getNaturalLanguageUsageByNameAndNamespace(String name,
                                                               String namespace)
                                                               throws RiceIllegalArgumentException
Retrieve NaturalLanguageUsage specified by name and namespace

Parameters:
name - the name of the natural language usage to retrieve.
namespace - the namespace that the natural language usage is under.
Returns:
an NaturalLanguageUsage 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:
RiceIllegalArgumentException - if the either the name or the namespace is null or blank.

updateNaturalLanguageUsage

void updateNaturalLanguageUsage(NaturalLanguageUsage naturalLanguageUsage)
                                throws RiceIllegalArgumentException
Update NaturalLanguageUsage

Parameters:
naturalLanguageUsage - updated data for the NaturalLanguageUsage object specified by the id
Throws:
RiceIllegalArgumentException - if the given naturalLanguageUsage is null or invalid

deleteNaturalLanguageUsage

void deleteNaturalLanguageUsage(String naturalLanguageUsageId)
                                throws RiceIllegalArgumentException
Delete NaturalLanguageUsage

Parameters:
naturalLanguageUsageId - identifier of the NaturalLanguageUsage to be deleted
Throws:
RiceIllegalArgumentException - if the given naturalLanguageUsageId is null or invalid

getNaturalLanguageUsagesByNamespace

List<NaturalLanguageUsage> getNaturalLanguageUsagesByNamespace(String namespace)
                                                               throws RiceIllegalArgumentException
Translates and retrieves a NaturalLanguage for a given KRMS object (e.g, proposition or agenda), NaturalLanguage usage type (context) and language into natural language TODO: Add appropriate caching annotation

Parameters:
namespace - namespace to search on.
Returns:
list of NaturalLanguageUsages in a particular namespace
Throws:
RiceIllegalArgumentException

createContext

ContextDefinition createContext(ContextDefinition contextDefinition)
                                throws RiceIllegalArgumentException
Create Context

Parameters:
contextDefinition - data for the new Context to be created
Returns:
newly created Context
Throws:
RiceIllegalArgumentException - if the given contextDefinition is null or invalid or already in use.

findCreateContext

ContextDefinition findCreateContext(ContextDefinition contextDefinition)
                                    throws RiceIllegalArgumentException
find Create Context Searches for an existing context with the same name and namespace and returns it otherwise it creates the context.

Parameters:
contextDefinition - data for the new Context to be created
Returns:
newly created Context
Throws:
RiceIllegalArgumentException - if the given contextDefinition is null or invalid

updateContext

void updateContext(ContextDefinition contextDefinition)
                   throws RiceIllegalArgumentException
Update the Context specified by the identifier in the input DTO

Parameters:
contextDefinition - DTO with updated info and identifier of the object to be updated
Throws:
RiceIllegalArgumentException - if the given contextDefinition is null or invalid

deleteContext

void deleteContext(String id)
                   throws RiceIllegalArgumentException
Delete the specified Context

Parameters:
id - identifier of the object to be deleted
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

getContext

ContextDefinition getContext(String id)
                             throws RiceIllegalArgumentException
Retrieve Context for the specified id

Parameters:
id - identifier for the Context
Returns:
specified Context
Throws:
RiceIllegalArgumentException - if the given id is null or invalid

getContextByNameAndNamespace

ContextDefinition getContextByNameAndNamespace(String name,
                                               String namespace)
                                               throws RiceIllegalArgumentException
Retrieves an Context from the repository based on the provided context name and namespace.

Parameters:
name - the name of the Context to retrieve.
namespace - the namespace that the context is under.
Returns:
an ContextDefinition 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:
RiceIllegalArgumentException - if the either the name or the namespace is null or blank.

createNaturalLanguageTemplate

NaturalLanguageTemplate createNaturalLanguageTemplate(NaturalLanguageTemplate naturalLanguageTemplate)
                                                      throws RiceIllegalArgumentException
This will create a NaturalLanguageTemplate exactly like the parameter passed in except the id will be assigned and create date/user will be set.

Parameters:
naturalLanguageTemplate - The NaturalLanguageTemplate to create.
Returns:
a NaturalLanguageTemplate exactly like the parameter passed in.
Throws:
RiceIllegalArgumentException - if the NaturalLanguageTemplate is null.
IllegalStateException - if the NaturalLanguageTemplate already exists in the system.

getNaturalLanguageTemplate

NaturalLanguageTemplate getNaturalLanguageTemplate(String naturalLanguageTemplateId)
                                                   throws RiceIllegalArgumentException
Retrieves a NaturalLanguageTemplate from the repository based on the given id.

Parameters:
naturalLanguageTemplateId - to retrieve.
Returns:
a NaturalLanguageTemplate identified by the given id.
Throws:
IllegalArgumentException - if the given actionId is null *
RiceIllegalArgumentException

updateNaturalLanguageTemplate

void updateNaturalLanguageTemplate(NaturalLanguageTemplate naturalLanguageTemplate)
                                   throws RiceIllegalArgumentException
This will update an existing NaturalLanguageTemplate.

Parameters:
naturalLanguageTemplate - The NaturalLanguageTemplate to update.
Throws:
RiceIllegalArgumentException - if the NaturalLanguageTemplate is null. exists in the system.

deleteNaturalLanguageTemplate

void deleteNaturalLanguageTemplate(String naturalLanguageTemplateId)
                                   throws RiceIllegalArgumentException
Delete the NaturalLanguageTemplate with the given id.

Parameters:
naturalLanguageTemplateId - to delete.
Throws:
RiceIllegalArgumentException - if the NaturalLanguageTemplate is null.

findNaturalLanguageTemplatesByLanguageCode

List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByLanguageCode(String languageCode)
                                                                         throws RiceIllegalArgumentException
Finds all the natural language templates for a particular language

Parameters:
languageCode - language on which to search
Returns:
list of templates for that language
Throws:
RiceIllegalArgumentException

findNaturalLanguageTemplateByLanguageCodeTypeIdAndNluId

NaturalLanguageTemplate findNaturalLanguageTemplateByLanguageCodeTypeIdAndNluId(String languageCode,
                                                                                String typeId,
                                                                                String naturalLanguageUsageId)
                                                                                throws RiceIllegalArgumentException
Throws:
RiceIllegalArgumentException

findNaturalLanguageTemplatesByNaturalLanguageUsage

List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByNaturalLanguageUsage(String naturalLanguageUsageId)
                                                                                 throws RiceIllegalArgumentException
Find all the natural language templates for a particular usage

Parameters:
naturalLanguageUsageId - the usage on which to search
Returns:
list of templates that match the usage
Throws:
RiceIllegalArgumentException

findNaturalLanguageTemplatesByType

List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByType(String typeId)
                                                                 throws RiceIllegalArgumentException
Find all the natural language templates of a particular type Template types are keys that identify the message that is to be expressed in different languages and in different usage scenarios

Parameters:
typeId - on which to search
Returns:
list of templates matching that type
Throws:
RiceIllegalArgumentException

findNaturalLanguageTemplatesByTemplate

List<NaturalLanguageTemplate> findNaturalLanguageTemplatesByTemplate(String template)
                                                                     throws RiceIllegalArgumentException
Find the natural language template using the actual text of the template.

Parameters:
template - text to match exactly
Returns:
list of matching templates
Throws:
RiceIllegalArgumentException

translateNaturalLanguageForObject

String translateNaturalLanguageForObject(String naturalLanguageUsageId,
                                         String typeId,
                                         String krmsObjectId,
                                         String languageCode)
                                         throws RiceIllegalArgumentException
Translates and retrieves a NaturalLanguage for a given KRMS object (e.g, proposition or agenda), NaturalLanguage usage type (context) and language into natural language TODO: Add appropriate caching annotation

Specified by:
translateNaturalLanguageForObject in interface TranslateBusinessMethods
Parameters:
naturalLanguageUsageId - Natural language usage information
typeId - KRMS object type id (for example, could refer to agenda or proposition)
krmsObjectId - KRMS object identifier
languageCode - desired
Returns:
natural language corresponding to the NaturalLanguage usage, KRMS object id, KRMS object type and desired language
Throws:
RiceIllegalArgumentException - if the given naturalLanguageUsageId, typeId, krmsObjectId or language is null or invalid

translateNaturalLanguageForProposition

String translateNaturalLanguageForProposition(String naturalLanguageUsageId,
                                              PropositionDefinition propositionDefinintion,
                                              String languageCode)
                                              throws RiceIllegalArgumentException
Retrieve all the NaturalLanguageUsages

Specified by:
translateNaturalLanguageForProposition in interface TranslateBusinessMethods
Returns:
list of NaturalLanguageUsages
Throws:
RiceIllegalArgumentException

translateNaturalLanguageTreeForProposition

NaturalLanguageTree translateNaturalLanguageTreeForProposition(String naturalLanguageUsageId,
                                                               PropositionDefinition propositionDefinintion,
                                                               String languageCode)
                                                               throws RiceIllegalArgumentException
Translates NaturalLanguage for a given proposition, returning a tree of the NaturalLanguage. This method is used to "preview" the proposition in a tree structure before saving.

Specified by:
translateNaturalLanguageTreeForProposition in interface TranslateBusinessMethods
Parameters:
naturalLanguageUsageId - Natural language usage information
propositionDefinintion - proposition to be translated
languageCode - desired
Returns:
natural language tree corresponding to the NaturalLanguage usage, proposition and desired language
Throws:
RiceIllegalArgumentException - if the given naturalLanguageUsageId, proposition, or language is null or invalid

findContextIds

List<String> findContextIds(QueryByCriteria queryByCriteria)
                            throws RiceIllegalArgumentException
Query for Context ids based on the given search criteria which is a Map of Context field names to values.

This method returns it's results as a List of Context ids that match the given search criteria.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
a list of ids matching the given criteria properties. An empty list is returned if an invalid or non-existent criteria is supplied.
Throws:
RiceIllegalArgumentException - if the queryByCriteria is null

findAgendaIds

List<String> findAgendaIds(QueryByCriteria queryByCriteria)
                           throws RiceIllegalArgumentException
Query for Agenda ids based on the given search criteria which is a Map of Agenda field names to values.

This method returns it's results as a List of Agenda ids that match the given search criteria.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
a list of ids matching the given criteria properties. An empty list is returned if an invalid or non-existent criteria is supplied.
Throws:
RiceIllegalArgumentException - if the queryByCriteria is null

findRuleIds

List<String> findRuleIds(QueryByCriteria queryByCriteria)
                         throws RiceIllegalArgumentException
Query for Rule ids 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 Rule ids that match the given search criteria.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
a list of ids matching the given criteria properties. An empty list is returned if an invalid or non-existent criteria is supplied.
Throws:
RiceIllegalArgumentException - if the queryByCriteria is null

findPropositionIds

List<String> findPropositionIds(QueryByCriteria queryByCriteria)
                                throws RiceIllegalArgumentException
Query for Proposition ids based on the given search criteria which is a Map of Proposition field names to values.

This method returns it's results as a List of Proposition ids that match the given search criteria.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
a list of ids matching the given criteria properties. An empty list is returned if an invalid or non-existent criteria is supplied.
Throws:
RiceIllegalArgumentException - if the queryByCriteria is null

findActionIds

List<String> findActionIds(QueryByCriteria queryByCriteria)
                           throws RiceIllegalArgumentException
Query for Action ids based on the given search criteria which is a Map of Action field names to values.

This method returns it's results as a List of Action ids that match the given search criteria.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
a list of ids matching the given criteria properties. An empty list is returned if an invalid or non-existent criteria is supplied.
Throws:
RiceIllegalArgumentException - if the queryByCriteria is null

selectContext

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:
ContextSelectionCriteria

getAgendaTree

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


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