Class GovernanceDefinitionHandler<B>

Type Parameters:
B - class that represents the governance definition
Direct Known Subclasses:
CertificationHandler, LicenseHandler

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 Details

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

    • 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, Date effectiveFrom, Date effectiveTo, Date effectiveTime, 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
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      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 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, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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 existing properties (true) only replacing the properties with matching names, or should the entire properties of the instance be replaced?
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 relationshipTypeName, String rationale, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a parent-child relationship between two definitions - for example, between a governance policy and a 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
      relationshipTypeName - unique name of the relationship type
      rationale - why are these definitions linked
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 relationshipTypeName, String description, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      relationshipTypeName - unique name of the relationship type
      description - why are these definitions linked
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 definitionChildTypeName, String relationshipTypeName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      definitionChildTypeName - type name of the sub-definition
      relationshipTypeName - unique name of the relationship type
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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)
    • removeGovernanceDefinition

      public void removeGovernanceDefinition(String userId, String definitionGUID, String definitionGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a governance definition.
      Parameters:
      userId - calling user
      definitionGUID - unique identifier of the metadata element to remove
      definitionGUIDParameterName - parameter for definitionGUID
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 suppliedTypeName, String searchString, String searchStringParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      suppliedTypeName - 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      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)
    • getGovernanceDefinitions

      public List<B> getGovernanceDefinitions(String userId, String suppliedTypeName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return information about the defined governance definitions.
      Parameters:
      userId - calling user
      suppliedTypeName - name of the type of governance definition
      startFrom - position in the list (used when there are so many reports that paging is needed
      pageSize - maximum number of elements to return on this call
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      properties of the governance definitions
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • getGovernanceDefinitionsByDomain

      public List<B> getGovernanceDefinitionsByDomain(String userId, String suppliedTypeName, int domainIdentifier, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return information about the defined governance zones for a specific domain.
      Parameters:
      userId - calling user
      suppliedTypeName - 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 on this call
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 suppliedTypeName, String name, String nameParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      suppliedTypeName - 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      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 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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      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 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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      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 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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      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 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)
    • getScopedGovernanceDefinitions

      public List<B> getScopedGovernanceDefinitions(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, String governanceDefinitionTypeName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the governance definitions attached to the requested scope.
      Parameters:
      userId - calling user
      governanceDefinitionTypeName - name of the type of required governance definitions
      elementGUID - unique identifier of the scoping 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      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 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)
    • getGovernanceResponsibilitiesForRole

      public List<B> getGovernanceResponsibilitiesForRole(String userId, String personRoleGUID, String personRoleGUIDParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Returns the list of roles that are responsible for the supplied governance definition.
      Parameters:
      userId - String userId of user making request.
      personRoleGUID - String unique id for element.
      personRoleGUIDParameterName - name of parameter supplying the GUID
      startFrom - int starting position for fist returned element.
      pageSize - int maximum number of elements to return on the call.
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - String calling method
      Returns:
      a list of assets or
      Throws:
      InvalidParameterException - - the GUID is not recognized or the paging values are invalid or
      PropertyServerException - - there is a problem retrieving the asset properties from the property server or
      UserNotAuthorizedException - - the requesting user is not authorized to issue this request.
    • getGovernanceDefinitionByGUID

      public B getGovernanceDefinitionByGUID(String userId, String guid, String guidParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the definition metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      guid - unique identifier of the requested metadata element
      guidParameterName - parameter name of guid
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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)
    • getGovernanceDefinitionInContext

      public B getGovernanceDefinitionInContext(String userId, String guid, String guidParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the definition metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      guid - unique identifier of the requested metadata element
      guidParameterName - parameter name of guid
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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)