Class GovernanceDomainHandler<B>

  • Type Parameters:
    B - class that represents the governance domain

    public class GovernanceDomainHandler<B>
    extends ReferenceableHandler<B>
    GovernanceDomainHandler provides the exchange of metadata about governance domains between the repository and the OMAS. Note governanceDomains are governance metadata and are always defined with LOCAL-COHORT provenance. There is no support for effectivity dating.
    • Constructor Detail

      • GovernanceDomainHandler

        public GovernanceDomainHandler​(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

      • createGovernanceDomain

        public String createGovernanceDomain​(String userId,
                                             String qualifiedName,
                                             String displayName,
                                             String description,
                                             int domainIdentifier,
                                             Map<String,​String> additionalProperties,
                                             String suppliedTypeName,
                                             Map<String,​Object> extendedProperties,
                                             String methodName)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Create the anchor object that all elements in a governance domain (terms and categories) are linked to.
        Parameters:
        userId - calling user
        qualifiedName - unique name for the governance domain - used in other configuration
        displayName - short display name for the governance domain
        description - description of the governance governance domain
        domainIdentifier - the domain identifier used in the governance domain definitions
        additionalProperties - additional properties for a governance domain
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a governance governance domain subtype
        methodName - calling method
        Returns:
        unique identifier of the new governance domain object
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • updateGovernanceDomain

        public void updateGovernanceDomain​(String userId,
                                           String governanceDomainGUID,
                                           String governanceDomainGUIDParameterName,
                                           String qualifiedName,
                                           String displayName,
                                           String description,
                                           int domainIdentifier,
                                           Map<String,​String> additionalProperties,
                                           String suppliedTypeName,
                                           Map<String,​Object> extendedProperties,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Update the anchor object that all elements in a governance domain (terms and categories) are linked to.
        Parameters:
        userId - calling user
        governanceDomainGUID - unique identifier of the governance domain to update
        governanceDomainGUIDParameterName - parameter passing the governance domainGUID
        qualifiedName - unique name for the governance domain - used in other configuration
        displayName - short display name for the governance domain
        description - description of the governance governance domain
        domainIdentifier - the domain identifier used in the governance domain definitions
        additionalProperties - additional properties for a governance governance domain
        suppliedTypeName - type of governance domain
        extendedProperties - properties for a governance governance domain subtype
        methodName - calling method
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • removeGovernanceDomain

        public void removeGovernanceDomain​(String userId,
                                           String governanceDomainGUID,
                                           String governanceDomainGUIDParameterName,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Remove the metadata element representing a governance domain. This will delete the governance domain and all categories and terms because the Anchors classifications are set up in these elements.
        Parameters:
        userId - calling user
        governanceDomainGUID - unique identifier of the metadata element to remove
        governanceDomainGUIDParameterName - parameter supplying the governance domainGUID
        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)
      • findGovernanceDomains

        public List<B> findGovernanceDomains​(String userId,
                                             String searchString,
                                             String searchStringParameterName,
                                             int startFrom,
                                             int pageSize,
                                             String methodName)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Retrieve the list of governance domain 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
        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)
      • getGovernanceDomainsByName

        public List<B> getGovernanceDomainsByName​(String userId,
                                                  String name,
                                                  String nameParameterName,
                                                  int startFrom,
                                                  int pageSize,
                                                  String methodName)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Retrieve the list of governance domain 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)