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 Detail

      • 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 Detail

      • createGlossaryCategory

        public String createGlossaryCategory​(String userId,
                                             String glossaryGUID,
                                             String glossaryGUIDParameterName,
                                             String qualifiedName,
                                             String displayName,
                                             String description,
                                             Map<String,​String> additionalProperties,
                                             String suppliedTypeName,
                                             Map<String,​Object> extendedProperties,
                                             String methodName)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Create the glossary category object.
        Parameters:
        userId - calling user
        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
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a category subtype
        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
      • updateGlossaryCategory

        public void updateGlossaryCategory​(String userId,
                                           String glossaryCategoryGUID,
                                           String glossaryCategoryGUIDParameterName,
                                           String qualifiedName,
                                           String displayName,
                                           String description,
                                           Map<String,​String> additionalProperties,
                                           String suppliedTypeName,
                                           Map<String,​Object> extendedProperties,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Update the category.
        Parameters:
        userId - calling user
        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
        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 glossaryParentCategoryGUID,
                                        String glossaryParentCategoryGUIDParameterName,
                                        String glossaryChildCategoryGUID,
                                        String glossaryChildCategoryGUIDParameterName,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Create a parent-child relationship between two categories.
        Parameters:
        userId - calling user
        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
        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 glossaryParentCategoryGUID,
                                        String glossaryParentCategoryGUIDParameterName,
                                        String glossaryChildCategoryGUID,
                                        String glossaryChildCategoryGUIDParameterName,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Remove a parent-child relationship between two categories.
        Parameters:
        userId - calling user
        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
        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 searchString,
                                              String searchStringParameterName,
                                              int startFrom,
                                              int pageSize,
                                              Date effectiveTime,
                                              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
        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)
        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,
                                                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
        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)
      • getGlossaryCategoriesByName

        public List<B> getGlossaryCategoriesByName​(String userId,
                                                   String name,
                                                   String nameParameterName,
                                                   int startFrom,
                                                   int pageSize,
                                                   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
        name - name to search for
        nameParameterName - parameter supplying name
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)
      • getGlossarySubCategories

        public List<B> getGlossarySubCategories​(String userId,
                                                String glossaryCategoryGUID,
                                                String glossaryCategoryGUIDParameterName,
                                                int startFrom,
                                                int pageSize,
                                                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
        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)