Class GovernanceMetricHandler<B>

Type Parameters:
B - class that represents the governanceMetric

public class GovernanceMetricHandler<B> extends ReferenceableHandler<B>
GovernanceMetricHandler provides the exchange of metadata about governanceMetrics between the repository and the OMAS.
  • Constructor Details

    • GovernanceMetricHandler

      public GovernanceMetricHandler(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

    • createGovernanceMetric

      public String createGovernanceMetric(String userId, String externalSourceGUID, String externalSourceName, String qualifiedName, String displayName, String description, String measurement, String target, int domainIdentifier, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create the governanceMetric object.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this governanceMetric
      externalSourceName - unique name of the software capability that owns this governanceMetric
      qualifiedName - unique name for the governanceMetric - used in other configuration
      displayName - short display name for the governanceMetric
      description - description of the governance governanceMetric
      measurement - values describing what to measure
      target - values describing the desired state
      domainIdentifier - identifier of the governance domain - default 0 (all/any)
      additionalProperties - additional properties for a governanceMetric
      suppliedTypeName - type name from the caller (enables creation of subtypes)
      extendedProperties - properties for a governance governanceMetric subtype
      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)
      methodName - calling method
      Returns:
      unique identifier of the new governanceMetric object
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • updateGovernanceMetric

      public void updateGovernanceMetric(String userId, String externalSourceGUID, String externalSourceName, String governanceMetricGUID, String governanceMetricGUIDParameterName, String qualifiedName, String displayName, String description, String measurement, String target, int domainIdentifier, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, Date effectiveFrom, Date effectiveTo, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the anchor object that all elements in a governanceMetric (terms and categories) are linked to.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this governanceMetric
      externalSourceName - unique name of the software capability that owns this governanceMetric
      governanceMetricGUID - unique identifier of the governanceMetric to update
      governanceMetricGUIDParameterName - parameter passing the governanceMetricGUID
      qualifiedName - unique name for the governanceMetric - used in other configuration
      displayName - short display name for the governanceMetric
      description - description of the governance governanceMetric
      measurement - values describing what to measure
      target - values describing the desired state
      domainIdentifier - identifier of the governance domain - default 0 (all/any)
      additionalProperties - additional properties for a governance governanceMetric
      suppliedTypeName - type of governanceMetric
      extendedProperties - properties for a governance governanceMetric subtype
      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)
      isMergeUpdate - should the properties be merged with the existing properties or completely over-write them
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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
    • addGovernanceDefinitionMetric

      public void addGovernanceDefinitionMetric(String userId, String externalSourceGUID, String externalSourceName, String governanceMetricGUID, String governanceMetricGUIDParameterName, String governanceDefinitionGUID, String governanceDefinitionGUIDParameterName, String rationale, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Add a GovernanceDefinitionMetric relationship.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this governanceMetric
      externalSourceName - unique name of the software capability that owns this governanceMetric
      governanceMetricGUID - unique identifier of the governanceMetric
      governanceMetricGUIDParameterName - parameter supplying the governanceMetricGUID
      governanceDefinitionGUID - unique identifier of the element that is being added to the governanceMetric
      governanceDefinitionGUIDParameterName - parameter supplying the governanceDefinitionGUID
      rationale - why is the element a member? (optional)
      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)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • removeGovernanceDefinitionMetric

      public void removeGovernanceDefinitionMetric(String userId, String externalSourceGUID, String externalSourceName, String governanceMetricGUID, String governanceMetricGUIDParameterName, String governanceDefinitionGUID, String governanceDefinitionGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a GovernanceDefinitionMetric relationship.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this governanceMetric
      externalSourceName - unique name of the software capability that owns this governanceMetric
      governanceMetricGUID - unique identifier of the governanceMetric
      governanceMetricGUIDParameterName - parameter supplying the governanceMetricGUID
      governanceDefinitionGUID - unique identifier of the element that is being added to the governanceMetric
      governanceDefinitionGUIDParameterName - parameter supplying the governanceDefinitionGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • addGovernanceResults

      public void addGovernanceResults(String userId, String externalSourceGUID, String externalSourceName, String governanceMetricGUID, String governanceMetricGUIDParameterName, String dataSetGUID, String dataSetGUIDParameterName, String query, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Add a GovernanceResults relationship.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this governanceMetric
      externalSourceName - unique name of the software capability that owns this governanceMetric
      governanceMetricGUID - unique identifier of the governanceMetric
      governanceMetricGUIDParameterName - parameter supplying the governanceMetricGUID
      dataSetGUID - unique identifier of the element that is being added to the governanceMetric
      dataSetGUIDParameterName - parameter supplying the dataSetGUID
      query - formula to access results (optional)
      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)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • removeGovernanceResults

      public void removeGovernanceResults(String userId, String externalSourceGUID, String externalSourceName, String governanceMetricGUID, String governanceMetricGUIDParameterName, String dataSetGUID, String dataSetGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a GovernanceResults relationship.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this governanceMetric
      externalSourceName - unique name of the software capability that owns this governanceMetric
      governanceMetricGUID - unique identifier of the governanceMetric
      governanceMetricGUIDParameterName - parameter supplying the governanceMetricGUID
      dataSetGUID - unique identifier of the element that is being added to the governanceMetric
      dataSetGUIDParameterName - parameter supplying the dataSetGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • removeGovernanceMetric

      public void removeGovernanceMetric(String userId, String externalSourceGUID, String externalSourceName, String governanceMetricGUID, String governanceMetricGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a governanceMetric. This will delete the governanceMetric and all categories and terms because the Anchors classifications are set up in these elements.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this governanceMetric
      externalSourceName - unique name of the software capability that owns this governanceMetric
      governanceMetricGUID - unique identifier of the metadata element to remove
      governanceMetricGUIDParameterName - parameter supplying the governanceMetricGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • findGovernanceMetrics

      public List<B> findGovernanceMetrics(String userId, String searchString, String searchStringParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of governanceMetric 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
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • getAttachedGovernanceMetricImplementations

      public List<B> getAttachedGovernanceMetricImplementations(String userId, String guid, String guidParameterName, int startFrom, int pageSize, 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
      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:
      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)
    • getGovernanceMetricByGUID

      public B getGovernanceMetricByGUID(String userId, String guid, String guidParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the governanceMetric 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 - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)