Class GlossaryCategoryHandler<B>

Type Parameters:
B - class that represents the glossary category

public class GlossaryCategoryHandler<B> extends ReferenceableHandler<B>
GlossaryCategoryHandler provides the exchange of metadata about glossary categories between the repository and the OMAS. Note glossary categories are governance metadata and are always defined with LOCAL-COHORT provenance.
  • Constructor Details

    • GlossaryCategoryHandler

      public GlossaryCategoryHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog)
      Construct the handler with information needed to work with B objects.
      Parameters:
      converter - specific converter for this bean class
      beanClass - name of bean class that is represented by the generic class B
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      supportedZones - list of zones that the access service is allowed to serve B instances from
      defaultZones - list of zones that the access service should set in all new B instances
      publishZones - list of zones that the access service sets up in published B instances
      auditLog - destination for audit log events
  • Method Details

    • createGlossaryCategory

      public String createGlossaryCategory(String userId, String externalSourceGUID, String externalSourceName, String glossaryGUID, String glossaryGUIDParameterName, String qualifiedName, String displayName, String description, Map<String,String> additionalProperties, boolean rootCategory, String suppliedTypeName, Map<String,Object> extendedProperties, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create the glossary category object.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      glossaryGUID - unique identifier of the owning glossary
      glossaryGUIDParameterName - parameter supplying glossaryGUID
      qualifiedName - unique name for the category - used in other configuration
      displayName - short display name for the category
      description - description of the category
      additionalProperties - additional properties for a category
      rootCategory - is this category a top-level (root) category
      suppliedTypeName - type name from the caller (enables creation of subtypes)
      extendedProperties - properties for a category subtype
      effectiveFrom - the time that the element must be effective from (null for any time, new Date() for now)
      effectiveTo - the time that the must be effective to (null for any time, new Date() for now)
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      unique identifier of the new glossary object
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • createGlossaryCategoryFromTemplate

      public String createGlossaryCategoryFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String glossaryGUID, String glossaryGUIDParameterName, String templateGUID, String qualifiedName, String displayName, String description, boolean deepCopy, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a category from a template.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      glossaryGUID - unique identifier of the glossary where the category is located
      glossaryGUIDParameterName - parameter supplying glossaryGUID
      templateGUID - unique identifier of the metadata element to copy
      qualifiedName - unique name for the category - used in other configuration
      displayName - short display name for the category
      description - description of the category
      deepCopy - should the template creation extend to the anchored elements or just the direct entity?
      methodName - calling method
      Returns:
      unique identifier of the new metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • updateGlossaryCategory

      public void updateGlossaryCategory(String userId, String externalSourceGUID, String externalSourceName, String glossaryCategoryGUID, String glossaryCategoryGUIDParameterName, String qualifiedName, String displayName, String description, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, Date effectiveFrom, Date effectiveTo, Date effectiveTime, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the category.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      glossaryCategoryGUID - unique identifier for the category to update
      glossaryCategoryGUIDParameterName - parameter supplying the category
      qualifiedName - unique name for the category - used in other configuration
      displayName - short display name for the category
      description - description of the governance category
      additionalProperties - additional properties for a governance category
      suppliedTypeName - type of term
      extendedProperties - properties for a governance category subtype
      effectiveFrom - the time that the element must be effective from (null for any time, new Date() for now)
      effectiveTo - the time that the must be effective to (null for any time, new Date() for now)
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • setupCategoryParent

      public void setupCategoryParent(String userId, String externalSourceGUID, String externalSourceName, String glossaryParentCategoryGUID, String glossaryParentCategoryGUIDParameterName, String glossaryChildCategoryGUID, String glossaryChildCategoryGUIDParameterName, Date effectiveFrom, Date effectiveTo, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a parent-child relationship between two categories.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      glossaryParentCategoryGUID - unique identifier of the glossary super-category
      glossaryParentCategoryGUIDParameterName - parameter supplying the super-category
      glossaryChildCategoryGUID - unique identifier of the glossary subcategory
      glossaryChildCategoryGUIDParameterName - parameter supplying the subcategory
      effectiveFrom - the time that the relationship element must be effective from (null for any time, new Date() for now)
      effectiveTo - the time that the relationship must be effective to (null for any time, new Date() for now)
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • clearCategoryParent

      public void clearCategoryParent(String userId, String externalSourceGUID, String externalSourceName, String glossaryParentCategoryGUID, String glossaryParentCategoryGUIDParameterName, String glossaryChildCategoryGUID, String glossaryChildCategoryGUIDParameterName, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a parent-child relationship between two categories.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      glossaryParentCategoryGUID - unique identifier of the glossary super-category
      glossaryParentCategoryGUIDParameterName - parameter supplying the super-category
      glossaryChildCategoryGUID - unique identifier of the glossary subcategory
      glossaryChildCategoryGUIDParameterName - parameter supplying the subcategory
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • removeGlossaryCategory

      public void removeGlossaryCategory(String userId, String externalSourceGUID, String externalSourceName, String glossaryCategoryGUID, String glossaryCategoryGUIDParameterName, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a glossary category.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      glossaryCategoryGUID - unique identifier of the metadata element to remove
      glossaryCategoryGUIDParameterName - parameter for glossaryCategoryGUID
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • findGlossaryCategories

      public List<B> findGlossaryCategories(String userId, String glossaryGUID, String searchString, String searchStringParameterName, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of glossary category metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      userId - calling user
      glossaryGUID - unique identifier of the glossary to query
      searchString - string to find in the properties
      searchStringParameterName - name of parameter supplying the search string
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of matching metadata elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getCategoriesForGlossary

      public List<B> getCategoriesForGlossary(String userId, String glossaryGUID, String glossaryGUIDParameterName, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the list of categories associated with a glossary.
      Parameters:
      userId - calling user
      glossaryGUID - unique identifier of the glossary to query
      glossaryGUIDParameterName - name of the parameter supplying glossaryGUID
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of metadata elements describing the categories associated with the requested glossary
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getCategoriesForTerm

      public List<B> getCategoriesForTerm(String userId, String glossaryTermGUID, String glossaryTermGUIDParameterName, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the list of categories associated with a glossary term.
      Parameters:
      userId - calling user
      glossaryTermGUID - unique identifier of the glossary term to query
      glossaryTermGUIDParameterName - name of the parameter supplying glossaryTermGUID
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of metadata elements describing the categories associated with the requested term
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getGlossaryCategoriesByName

      public List<B> getGlossaryCategoriesByName(String userId, String glossaryGUID, String name, String nameParameterName, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of glossary metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      userId - calling user
      glossaryGUID - unique identifier of the glossary to query
      name - name to search for
      nameParameterName - parameter supplying name
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of matching metadata elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getGlossaryCategoryParent

      public B getGlossaryCategoryParent(String userId, String glossaryCategoryGUID, String glossaryCategoryGUIDParameterName, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the glossary category metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      glossaryCategoryGUID - unique identifier of the requested metadata element
      glossaryCategoryGUIDParameterName - parameter name of the glossaryCategoryGUID
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      parent glossary category element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getGlossarySubCategories

      public List<B> getGlossarySubCategories(String userId, String glossaryCategoryGUID, String glossaryCategoryGUIDParameterName, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the glossary category metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      glossaryCategoryGUID - unique identifier of the requested metadata element
      glossaryCategoryGUIDParameterName - parameter name of the glossaryCategoryGUID
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of glossary category element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getGlossaryCategoryByGUID

      public B getGlossaryCategoryByGUID(String userId, String guid, String guidParameterName, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the glossary metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      guid - unique identifier of the requested metadata element
      guidParameterName - parameter name of guid
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      matching metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)