Interface TermRepositoryService
public interface TermRepositoryService
The TermRepositoryService provides the basic access to terms and term resolvers in the repository needed
for executing rules.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptioncreateTerm(TermDefinition termDef) Create aTermDefinitioncreateTermResolver(TermResolverDefinition termResolver) Creates theTermResolverDefinition.Creates aTermSpecificationDefinitionvoiddeleteTerm(String id) Delete aTermDefinitionvoiddeletes theTermResolverDefinitionwith the given idvoidDeletes aTermSpecificationDefinitionfindAllTermSpecificationsByContextId(String contextId) Retrieves all theTermSpecificationDefinitions that are valid for the context with the given contextId.findTermResolversByNamespace(String namespace) Retrieves allTermResolverDefinitions for the given namespace.findTermResolversByOutputId(String id, String namespace) Get theTermResolverDefinitions for any term resolvers in the specified namespace that have the given term specification as their output.Retrieves theTermDefinitionwith the given termId.Retrieves theTermResolverDefinitionwith the given id.getTermResolverByNameAndNamespace(String name, String namespace) Retrieves theTermResolverDefinitionfor the given name and namespaceRetrieves theTermSpecificationDefinitionwith the given TermSpecificationId.getTermSpecificationByNameAndNamespace(String name, String namespace) Retrieves theTermSpecificationDefinitionfor the given name and namespacevoidupdateTerm(TermDefinition termDef) Update aTermDefinitionvoidupdateTermResolver(TermResolverDefinition termResolver) Updates theTermResolverDefinition.voidUpdates aTermSpecificationDefinition
-
Method Details
-
findTermResolversByNamespace
@Cacheable(value="http://rice.kuali.org/krms/v2_0/termResolverDefinitionType", key="\'namespace=\' + #p0") List<TermResolverDefinition> findTermResolversByNamespace(String namespace) throws RiceIllegalArgumentException Retrieves allTermResolverDefinitions for the given namespace.- Parameters:
namespace- the namespace for which to get all term resolvers.- Returns:
- the List of
TermResolverDefinitions for the given namespace. May be empty, but never null. - Throws:
RiceIllegalArgumentException- if the namespace is null or blank.- Since:
- 2.1.1
-
getTerm
@Cacheable(value="http://rice.kuali.org/krms/v2_0/termDefinitionType", key="\'id=\' + #p0") TermDefinition getTerm(String termId) throws RiceIllegalArgumentException Retrieves theTermDefinitionwith the given termId.- Parameters:
termId- the identifier of the term to retrieve.- Returns:
- the
TermDefinitionwith the given termId. May be null if there is no term with the given termId in the repository. - Throws:
RiceIllegalArgumentException- if the termId is null or blank.- Since:
- 2.1.1
-
getTermSpecificationById
@Cacheable(value="http://rice.kuali.org/krms/v2_0/TermSpecificationType", key="\'id=\' + #p0") TermSpecificationDefinition getTermSpecificationById(String id) throws RiceIllegalArgumentException Retrieves theTermSpecificationDefinitionwith the given TermSpecificationId.- Parameters:
id- the identifier of the term specification to retrieve.- Returns:
- the
TermSpecificationDefinitionwith the given id. May be null if there is no term specification with the given id in the repository. - Throws:
RiceIllegalArgumentException- if the id is null or blank.- Since:
- 2.2.1
-
createTermSpecification
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/TermSpecificationType","http://rice.kuali.org/krms/v2_0/termDefinitionType"}, allEntries=true) TermSpecificationDefinition createTermSpecification(TermSpecificationDefinition termSpec) throws RiceIllegalArgumentException Creates aTermSpecificationDefinition- Parameters:
termSpec- the term specification to be created- Returns:
- the
TermSpecificationDefinitionafter it has been created in the repository. - Throws:
RiceIllegalArgumentException- termSpec is null or invalid- Since:
- 2.2.1
-
updateTermSpecification
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/TermSpecificationType","http://rice.kuali.org/krms/v2_0/termDefinitionType"}, allEntries=true) void updateTermSpecification(TermSpecificationDefinition termSpec) throws RiceIllegalArgumentException Updates aTermSpecificationDefinition- Parameters:
termSpec- the term specification to be updated- Throws:
RiceIllegalArgumentException- termSpec is null or invalid- Since:
- 2.2.1
-
deleteTermSpecification
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/TermSpecificationType","http://rice.kuali.org/krms/v2_0/termDefinitionType"}, allEntries=true) void deleteTermSpecification(String id) throws RiceIllegalArgumentException Deletes aTermSpecificationDefinition- Parameters:
id- the id of the term specification to be deleted- Throws:
RiceIllegalArgumentException- id is null or invalid- Since:
- 2.2.1
-
createTerm
@CacheEvict(value="http://rice.kuali.org/krms/v2_0/termDefinitionType", allEntries=true) TermDefinition createTerm(TermDefinition termDef) throws RiceIllegalArgumentException Create aTermDefinition- Parameters:
termDef- to be created- Returns:
- the
TermDefinitionterm definition after it has been created in the repository. - Throws:
RiceIllegalArgumentException- if the termDef is null or blank.- Since:
- 2.2.1
-
updateTerm
@CacheEvict(value="http://rice.kuali.org/krms/v2_0/termDefinitionType", allEntries=true) void updateTerm(TermDefinition termDef) throws RiceIllegalArgumentException Update aTermDefinition- Parameters:
termDef- to be updated- Throws:
RiceIllegalArgumentException- if the termDef is null or blank.- Since:
- 2.2.1
-
deleteTerm
@CacheEvict(value="http://rice.kuali.org/krms/v2_0/termDefinitionType", allEntries=true) void deleteTerm(String id) throws RiceIllegalArgumentException Delete aTermDefinition- Parameters:
id- of the termDefinition to be deleted- Throws:
RiceIllegalArgumentException- if the id is null or blank.- Since:
- 2.2.1
-
getTermResolverById
@Cacheable(value="http://rice.kuali.org/krms/v2_0/termResolverDefinitionType", key="\'id=\' + #p0") TermResolverDefinition getTermResolverById(String id) throws RiceIllegalArgumentException Retrieves theTermResolverDefinitionwith the given id.- Parameters:
id- the identifier of the term to retrieve.- Returns:
- the
TermResolverDefinitionwith the given id. May be null if there is no term with the given id in the repository. - Throws:
RiceIllegalArgumentException- if the id is null or blank.- Since:
- 2.2.1
-
findTermResolversByOutputId
@Cacheable(value="http://rice.kuali.org/krms/v2_0/termResolverDefinitionType", key="\'id=\' + #p0 + \'|\' + \'namespace=\' + #p1") List<TermResolverDefinition> findTermResolversByOutputId(String id, String namespace) throws RiceIllegalArgumentException Get theTermResolverDefinitions for any term resolvers in the specified namespace that have the given term specification as their output.- Parameters:
id- the id for the term specificationnamespace- the namespace to search- Returns:
- the List of term resolvers found. If none are found, an empty list will be returned.
- Throws:
RiceIllegalArgumentException
-
createTermResolver
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/termResolverDefinitionType","http://rice.kuali.org/krms/v2_0/termDefinitionType"}, allEntries=true) TermResolverDefinition createTermResolver(TermResolverDefinition termResolver) throws RiceIllegalArgumentException Creates theTermResolverDefinition.- Parameters:
termResolver- to be created- Returns:
- the
TermResolverafter it has been created in the repository. - Throws:
RiceIllegalArgumentException- if the termResolver is null or blank.- Since:
- 2.1.1
-
updateTermResolver
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/termResolverDefinitionType","http://rice.kuali.org/krms/v2_0/termDefinitionType"}, allEntries=true) void updateTermResolver(TermResolverDefinition termResolver) throws RiceIllegalArgumentException Updates theTermResolverDefinition.- Parameters:
termResolver- to be created- Throws:
RiceIllegalArgumentException- if the termResolver is null or blank.- Since:
- 2.1.1
-
deleteTermResolver
@CacheEvict(value={"http://rice.kuali.org/krms/v2_0/termResolverDefinitionType","http://rice.kuali.org/krms/v2_0/termDefinitionType"}, allEntries=true) void deleteTermResolver(String id) throws RiceIllegalArgumentException deletes theTermResolverDefinitionwith the given id- Parameters:
id- of the term resolver to be deleted- Throws:
RiceIllegalArgumentException- if the termResolver is null or blank.- Since:
- 2.1.1
-
getTermResolverByNameAndNamespace
TermResolverDefinition getTermResolverByNameAndNamespace(String name, String namespace) throws RiceIllegalArgumentException Retrieves theTermResolverDefinitionfor the given name and namespace- Parameters:
name- the name for which to get term resolvernamespace- the namespace for which to get term resolver- Returns:
- the
TermResolverDefinitionfor the given name and namespace, null if none exist. - Throws:
RiceIllegalArgumentException- if the name or namespace is null or blank.
-
getTermSpecificationByNameAndNamespace
TermSpecificationDefinition getTermSpecificationByNameAndNamespace(String name, String namespace) throws RiceIllegalArgumentException Retrieves theTermSpecificationDefinitionfor the given name and namespace- Parameters:
name- the name for which to get term specificationnamespace- the namespace for which to get term resolver- Returns:
- the
TermSpecificationDefinitionfor the given name and namespace, null if none exist. - Throws:
RiceIllegalArgumentException- if the name or namespace is null or blank.
-
findAllTermSpecificationsByContextId
@Cacheable(value="http://rice.kuali.org/krms/v2_0/TermSpecificationType", key="\'id=\' + #p0") List<TermSpecificationDefinition> findAllTermSpecificationsByContextId(String contextId) throws RiceIllegalArgumentException Retrieves all theTermSpecificationDefinitions that are valid for the context with the given contextId.- Parameters:
contextId- the identifier for the context whose validTermSpecificationDefinitions are to be retrieved.- Returns:
- all the
TermSpecificationDefinitions that are valid for the context with the given contextId. May be empty but never null - Throws:
RiceIllegalArgumentException- if the contextId is null or blank.- Since:
- 2.1.4
-