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 Details

    • findTermResolversByNamespace

      @Cacheable(value="http://rice.kuali.org/krms/v2_0/termResolverDefinitionType", key="\'namespace=\' + #p0") List<TermResolverDefinition> findTermResolversByNamespace(String namespace) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Retrieves all TermResolverDefinitions 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:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Retrieves the TermDefinition with the given termId.
      Parameters:
      termId - the identifier of the term to retrieve.
      Returns:
      the TermDefinition with the given termId. May be null if there is no term with the given termId in the repository.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Retrieves the TermSpecificationDefinition with the given TermSpecificationId.
      Parameters:
      id - the identifier of the term specification to retrieve.
      Returns:
      the TermSpecificationDefinition with the given id. May be null if there is no term specification with the given id in the repository.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      termSpec - the term specification to be created
      Returns:
      the TermSpecificationDefinition after it has been created in the repository.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      termSpec - the term specification to be updated
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      id - the id of the term specification to be deleted
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      termDef - to be created
      Returns:
      the TermDefinition term definition after it has been created in the repository.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      termDef - to be updated
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      id - of the termDefinition to be deleted
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Retrieves the TermResolverDefinition with the given id.
      Parameters:
      id - the identifier of the term to retrieve.
      Returns:
      the TermResolverDefinition with the given id. May be null if there is no term with the given id in the repository.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Get the TermResolverDefinitions for any term resolvers in the specified namespace that have the given term specification as their output.
      Parameters:
      id - the id for the term specification
      namespace - the namespace to search
      Returns:
      the List of term resolvers found. If none are found, an empty list will be returned.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      termResolver - to be created
      Returns:
      the
      invalid reference
      TermResolver
      after it has been created in the repository.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Parameters:
      termResolver - to be created
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      deletes the TermResolverDefinition with the given id
      Parameters:
      id - of the term resolver to be deleted
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if the termResolver is null or blank.
      Since:
      2.1.1
    • getTermResolverByNameAndNamespace

      TermResolverDefinition getTermResolverByNameAndNamespace(String name, String namespace) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Retrieves the TermResolverDefinition for the given name and namespace
      Parameters:
      name - the name for which to get term resolver
      namespace - the namespace for which to get term resolver
      Returns:
      the TermResolverDefinition for the given name and namespace, null if none exist.
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if the name or namespace is null or blank.
    • getTermSpecificationByNameAndNamespace

      TermSpecificationDefinition getTermSpecificationByNameAndNamespace(String name, String namespace) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Retrieves the TermSpecificationDefinition for the given name and namespace
      Parameters:
      name - the name for which to get term specification
      namespace - the namespace for which to get term resolver
      Returns:
      the TermSpecificationDefinition for the given name and namespace, null if none exist.
      Throws:
      org.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Retrieves all the TermSpecificationDefinitions that are valid for the context with the given contextId.
      Parameters:
      contextId - the identifier for the context whose valid TermSpecificationDefinitions 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:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - if the contextId is null or blank.
      Since:
      2.1.4