Class GovernanceDefinitionHandler<B>

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

    public class GovernanceDefinitionHandler<B>
    extends ReferenceableHandler<B>
    GovernanceDefinitionHandler provides the exchange of metadata about definition definitions between the repository and the OMAS. Note definition definitions are governance metadata and are always defined with LOCAL-COHORT provenance.
    • Constructor Detail

      • GovernanceDefinitionHandler

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

      • createGovernanceDefinition

        public String createGovernanceDefinition​(String userId,
                                                 String qualifiedName,
                                                 String title,
                                                 String summary,
                                                 String description,
                                                 String scope,
                                                 int domainIdentifier,
                                                 String priority,
                                                 List<String> implications,
                                                 List<String> outcomes,
                                                 List<String> results,
                                                 List<String> businessImperatives,
                                                 String jurisdiction,
                                                 String implementationDescription,
                                                 String namePattern,
                                                 String details,
                                                 String distinguishedName,
                                                 Map<String,​String> additionalProperties,
                                                 String suppliedTypeName,
                                                 Map<String,​Object> extendedProperties,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Create the governance definition object.
        Parameters:
        userId - calling user
        qualifiedName - unique name for the definition - used in other configuration
        title - short display name for the governance definition
        summary - brief description of the governance definition
        description - description of the governance definition
        scope - breadth of coverage of the governance definition
        domainIdentifier - identifier that indicates which governance domain this definition belongs to (0=all)
        priority - relative importance of the governance definition
        implications - implications to the business in adopting this governance definition
        outcomes - expected outcomes from implementing this governance definition
        results - actual results achieved from implementing this governance definition
        businessImperatives - for the GovernanceStrategy - how does it link to business imperatives
        jurisdiction - for Regulations - where does this regulation apply
        implementationDescription - for GovernanceControl - how should this be implemented
        namePattern - for NamingStandardsRule - the pattern used to for new names
        details - for License or Certification - additional details about the definition
        distinguishedName - for Security groups - qualified name for LDAP
        additionalProperties - additional properties for a definition
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a definition subtype
        methodName - calling method
        Returns:
        unique identifier of the new definition object
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • updateGovernanceDefinition

        public void updateGovernanceDefinition​(String userId,
                                               String definitionGUID,
                                               String definitionGUIDParameterName,
                                               String qualifiedName,
                                               String title,
                                               String summary,
                                               String description,
                                               String scope,
                                               int domainIdentifier,
                                               String priority,
                                               List<String> implications,
                                               List<String> outcomes,
                                               List<String> results,
                                               List<String> businessImperatives,
                                               String jurisdiction,
                                               String implementationDescription,
                                               String namePattern,
                                               String details,
                                               String distinguishedName,
                                               Map<String,​String> additionalProperties,
                                               String suppliedTypeName,
                                               Map<String,​Object> extendedProperties,
                                               boolean isMergeUpdate,
                                               String methodName)
                                        throws InvalidParameterException,
                                               UserNotAuthorizedException,
                                               PropertyServerException
        Update the governance definition.
        Parameters:
        userId - calling user
        definitionGUID - unique identifier for the definition to update
        definitionGUIDParameterName - parameter supplying the definition
        qualifiedName - unique name for the definition - used in other configuration
        title - short display name for the governance definition
        summary - brief description of the governance definition
        description - description of the governance definition
        scope - breadth of coverage of the governance definition
        domainIdentifier - identifier that indicates which governance domain this definition belongs to (0=all)
        priority - relative importance of the governance definition
        implications - implications to the business in adopting this governance definition
        outcomes - expected outcomes from implementing this governance definition
        results - actual results achieved from implementing this governance definition
        businessImperatives - for the GovernanceStrategy - how does it link to business imperatives
        jurisdiction - for Regulations - where does this regulation apply
        implementationDescription - for GovernanceControl - how should this be implemented
        namePattern - for NamingStandardsRule - the pattern used to for new names
        details - for License or Certification - additional details about the definition
        distinguishedName - for Security groups - qualified name for LDAP
        additionalProperties - additional properties for a governance definition
        suppliedTypeName - type of term
        extendedProperties - properties for a governance definition subtype
        isMergeUpdate - should the supplied properties be merged with the existing or replace them
        methodName - calling method
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • setupDelegationRelationship

        public void setupDelegationRelationship​(String userId,
                                                String definitionParentGUID,
                                                String definitionParentGUIDParameterName,
                                                String definitionParentTypeName,
                                                String definitionChildGUID,
                                                String definitionChildGUIDParameterName,
                                                String definitionChildTypeName,
                                                String relationshipTypeGUID,
                                                String relationshipTypeName,
                                                String rationale,
                                                String methodName)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Create a parent-child relationship between two definitions - for example, between a governance policy and an governance control. The rationale explains why they are linked.
        Parameters:
        userId - calling user
        definitionParentGUID - unique identifier of the definition super-definition
        definitionParentGUIDParameterName - parameter supplying the super-definition
        definitionParentTypeName - typename of super-definition
        definitionChildGUID - unique identifier of the definition sub-definition
        definitionChildGUIDParameterName - parameter supplying the sub-definition
        definitionChildTypeName - type name of the sub-definition
        relationshipTypeGUID - unique identifier of the relationship type
        relationshipTypeName - unique name of the relationship type
        rationale - why are these definitions linked
        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)
      • setupPeerRelationship

        public void setupPeerRelationship​(String userId,
                                          String definitionParentGUID,
                                          String definitionParentGUIDParameterName,
                                          String definitionParentTypeName,
                                          String definitionChildGUID,
                                          String definitionChildGUIDParameterName,
                                          String definitionChildTypeName,
                                          String relationshipTypeGUID,
                                          String relationshipTypeName,
                                          String description,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Create a parent-child relationship between two definitions - for example, between two governance policies. The description explains why they are linked.
        Parameters:
        userId - calling user
        definitionParentGUID - unique identifier of the definition super-definition
        definitionParentGUIDParameterName - parameter supplying the super-definition
        definitionParentTypeName - typename of super-definition
        definitionChildGUID - unique identifier of the definition sub-definition
        definitionChildGUIDParameterName - parameter supplying the sub-definition
        definitionChildTypeName - type name of the sub-definition
        relationshipTypeGUID - unique identifier of the relationship type
        relationshipTypeName - unique name of the relationship type
        description - why are these definitions linked
        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)
      • clearDefinitionRelationship

        public void clearDefinitionRelationship​(String userId,
                                                String definitionParentGUID,
                                                String definitionParentGUIDParameterName,
                                                String definitionParentTypeName,
                                                String definitionChildGUID,
                                                String definitionChildGUIDParameterName,
                                                String definitionChildTypeGUID,
                                                String definitionChildTypeName,
                                                String relationshipTypeGUID,
                                                String relationshipTypeName,
                                                String methodName)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Remove a relationship between two definitions.
        Parameters:
        userId - calling user
        definitionParentGUID - unique identifier of the definition super-definition
        definitionParentGUIDParameterName - parameter supplying the super-definition
        definitionParentTypeName - typename of super-definition
        definitionChildGUID - unique identifier of the definition sub-definition
        definitionChildGUIDParameterName - parameter supplying the sub-definition
        definitionChildTypeGUID - type guid of the sub-definition
        definitionChildTypeName - type name of the sub-definition
        relationshipTypeGUID - unique identifier of the relationship type
        relationshipTypeName - unique name of the relationship type
        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)
      • findGovernanceDefinitions

        public List<B> findGovernanceDefinitions​(String userId,
                                                 String typeGUID,
                                                 String typeName,
                                                 String searchString,
                                                 String searchStringParameterName,
                                                 int startFrom,
                                                 int pageSize,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Retrieve the list of governance definition metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        userId - calling user
        typeGUID - GUID of the type of governance definition
        typeName - name of the type of governance definition
        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)
      • getLinkedDefinitions

        public List<B> getLinkedDefinitions​(String userId,
                                            String definitionGUID,
                                            String definitionGUIDParameterName,
                                            String definitionTypeName,
                                            String relationshipTypeGUID,
                                            String relationshipTypeName,
                                            String targetElementType,
                                            int startFrom,
                                            int pageSize,
                                            String methodName)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Return the list of elements associated with a definition.
        Parameters:
        userId - calling user
        definitionGUID - unique identifier of the definition to query
        definitionGUIDParameterName - name of the parameter supplying definitionGUID
        definitionTypeName - type of the starting element
        relationshipTypeGUID - unique identifier of the relationship (null if any relationship)
        relationshipTypeName - unique name of the relationship (null if any relationship)
        targetElementType - type of the target element
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        Returns:
        list of metadata elements describing the definitions associated with the requested definition
        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)
      • getGovernanceDefinitionsByDomain

        public List<B> getGovernanceDefinitionsByDomain​(String userId,
                                                        String typeGUID,
                                                        String typeName,
                                                        int domainIdentifier,
                                                        int startFrom,
                                                        int pageSize,
                                                        String methodName)
                                                 throws InvalidParameterException,
                                                        UserNotAuthorizedException,
                                                        PropertyServerException
        Return information about the defined governance zones for a specific domain.
        Parameters:
        userId - calling user
        typeGUID - GUID of the type of governance definition
        typeName - name of the type of governance definition
        domainIdentifier - identifier of domain - 0 is for all domains
        startFrom - position in the list (used when there are so many reports that paging is needed
        pageSize - maximum number of elements to return an this call
        methodName - calling method
        Returns:
        properties of the governance zone
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • getGovernanceDefinitionsByName

        public List<B> getGovernanceDefinitionsByName​(String userId,
                                                      String typeGUID,
                                                      String typeName,
                                                      String name,
                                                      String nameParameterName,
                                                      int startFrom,
                                                      int pageSize,
                                                      String methodName)
                                               throws InvalidParameterException,
                                                      UserNotAuthorizedException,
                                                      PropertyServerException
        Retrieve the list of definition metadata elements with a matching qualified or title. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        typeGUID - GUID of the type of governance definition
        typeName - name of the type of governance definition
        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 governance definitions
        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)
      • getGovernanceDefinitionsByStringParameter

        public List<B> getGovernanceDefinitionsByStringParameter​(String userId,
                                                                 String typeGUID,
                                                                 String typeName,
                                                                 String parameterValue,
                                                                 String parameterParameterName,
                                                                 String parameterPropertyName,
                                                                 int startFrom,
                                                                 int pageSize,
                                                                 String methodName)
                                                          throws InvalidParameterException,
                                                                 UserNotAuthorizedException,
                                                                 PropertyServerException
        Retrieve the list of definition metadata elements with a matching qualified or title. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        typeGUID - GUID of the type of governance definition
        typeName - name of the type of governance definition
        parameterValue - value to search for
        parameterParameterName - parameter supplying value
        parameterPropertyName - property name in entity to search in
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        Returns:
        list of matching governance definitions
        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)
      • getGoverningDefinitionLinks

        public List<Relationship> getGoverningDefinitionLinks​(String userId,
                                                              String elementGUID,
                                                              String elementGUIDParameterName,
                                                              String elementTypeName,
                                                              String governanceDefinitionTypeName,
                                                              int startFrom,
                                                              int pageSize,
                                                              String methodName)
                                                       throws InvalidParameterException,
                                                              UserNotAuthorizedException,
                                                              PropertyServerException
        Retrieve the links to the governance definitions that define the governance for an element.
        Parameters:
        userId - calling user
        governanceDefinitionTypeName - name of the type of required governance definitions
        elementGUID - unique identifier of the requested metadata element
        elementGUIDParameterName - parameter name of the elementGUID
        elementTypeName - name of the type of the starting element
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        Returns:
        list of relationships
        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)
      • getGoverningDefinitions

        public List<B> getGoverningDefinitions​(String userId,
                                               String elementGUID,
                                               String elementGUIDParameterName,
                                               String elementTypeName,
                                               String governanceDefinitionTypeName,
                                               int startFrom,
                                               int pageSize,
                                               String methodName)
                                        throws InvalidParameterException,
                                               UserNotAuthorizedException,
                                               PropertyServerException
        Retrieve the governance definitions that define the governance for an element.
        Parameters:
        userId - calling user
        governanceDefinitionTypeName - name of the type of required governance definitions
        elementGUID - unique identifier of the requested metadata element
        elementGUIDParameterName - parameter name of the elementGUID
        elementTypeName - name of the type of the starting element
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        Returns:
        list of governance definition 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)