org.kuali.rice.krms.api.repository.term
Interface TermRepositoryService

All Known Subinterfaces:
TermBoService
All Known Implementing Classes:
TermBoServiceImpl, TermRepositoryServiceMockImpl

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
 TermDefinition createTerm(TermDefinition termDef)
          Create a TermDefinition
 TermResolverDefinition createTermResolver(TermResolverDefinition termResolver)
          Creates the TermResolverDefinition.
 TermSpecificationDefinition createTermSpecification(TermSpecificationDefinition termSpec)
          Creates a TermSpecificationDefinition
 void deleteTerm(String id)
          Delete a TermDefinition
 void deleteTermResolver(String id)
          deletes the TermResolverDefinition with the given id
 void deleteTermSpecification(String id)
          Deletes a TermSpecificationDefinition
 List<TermSpecificationDefinition> findAllTermSpecificationsByContextId(String contextId)
          Retrieves all the TermSpecificationDefinitions that are valid for the context with the given contextId.
 List<TermResolverDefinition> findTermResolversByNamespace(String namespace)
          Retrieves all TermResolverDefinitions for the given namespace.
 List<TermResolverDefinition> findTermResolversByOutputId(String id, String namespace)
          Get the TermResolverDefinitions for any term resolvers in the specified namespace that have the given term specification as their output.
 TermDefinition getTerm(String termId)
          Retrieves the TermDefinition with the given termId.
 TermResolverDefinition getTermResolverById(String id)
          Retrieves the TermResolverDefinition with the given id.
 TermResolverDefinition getTermResolverByNameAndNamespace(String name, String namespace)
          Retrieves the TermResolverDefinition for the given name and namespace
 TermSpecificationDefinition getTermSpecificationById(String id)
          Retrieves the TermSpecificationDefinition with the given TermSpecificationId.
 TermSpecificationDefinition getTermSpecificationByNameAndNamespace(String name, String namespace)
          Retrieves the TermSpecificationDefinition for the given name and namespace
 void updateTerm(TermDefinition termDef)
          Update a TermDefinition
 void updateTermResolver(TermResolverDefinition termResolver)
          Updates the TermResolverDefinition.
 void updateTermSpecification(TermSpecificationDefinition termSpec)
          Updates a TermSpecificationDefinition
 

Method Detail

findTermResolversByNamespace

@Cacheable(value="http://rice.kuali.org/krms/v2_0/termResolverDefinitionType",
           key="\'namespace=\' + #p0")
List<TermResolverDefinition> findTermResolversByNamespace(String namespace)
                                                          throws 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:
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 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:
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 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:
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 a TermSpecificationDefinition

Parameters:
termSpec - the term specification to be created
Returns:
the TermSpecificationDefinition after 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 a TermSpecificationDefinition

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 a TermSpecificationDefinition

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 a TermDefinition

Parameters:
termDef - to be created
Returns:
the TermDefinition term 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 a TermDefinition

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 a TermDefinition

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 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:
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 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:
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 the TermResolverDefinition.

Parameters:
termResolver - to be created
Returns:
the TermResolver after 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 the TermResolverDefinition.

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 the TermResolverDefinition with 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 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:
RiceIllegalArgumentException - if the name or namespace is null or blank.

getTermSpecificationByNameAndNamespace

TermSpecificationDefinition getTermSpecificationByNameAndNamespace(String name,
                                                                   String namespace)
                                                                   throws 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:
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 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:
RiceIllegalArgumentException - if the contextId is null or blank.
Since:
2.1.4


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.