Class GovernanceMetricsManager

java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceMetricsManager
All Implemented Interfaces:
org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface, org.odpi.openmetadata.accessservices.governanceprogram.api.RelatedElementsManagementInterface

public class GovernanceMetricsManager extends GovernanceProgramBaseClient implements org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
GovernanceMetricsManager is the java client for managing governance metrics and their links to all types of governance definitions.
  • Constructor Details

    • GovernanceMetricsManager

      public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • GovernanceMetricsManager

      public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • GovernanceMetricsManager

      public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      maxPageSize - pre-initialized parameter limit
      auditLog - logging destination
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • GovernanceMetricsManager

      public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - pre-initialized parameter limit
      auditLog - logging destination
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • GovernanceMetricsManager

      public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that uses the supplied rest client. This is typically used when called from another OMAG Server.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      restClient - internal client for rest calls
      maxPageSize - pre-initialized parameter limit
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
  • Method Details

    • createGovernanceMetric

      public String createGovernanceMetric(String userId, org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties metricProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Create a new governance metric.
      Specified by:
      createGovernanceMetric in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricProperties - properties of the metric
      Returns:
      unique identifier of the metric
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - typeName, documentIdentifier or userId is null; documentIdentifier is not unique; typeName is not valid
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • updateGovernanceMetric

      public void updateGovernanceMetric(String userId, String metricGUID, boolean isMergeUpdate, org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties metricProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Update an existing governance metric.
      Specified by:
      updateGovernanceMetric in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricGUID - unique identifier of the metric to update
      isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
      metricProperties - properties to update
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • deleteGovernanceMetric

      public void deleteGovernanceMetric(String userId, String metricGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Delete a specific governance metric.
      Specified by:
      deleteGovernanceMetric in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricGUID - unique identifier of the metric to remove
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid is null or not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • setupGovernanceDefinitionMetric

      public void setupGovernanceDefinitionMetric(String userId, String metricGUID, String governanceDefinitionGUID, org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionMetricProperties rationale) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Create a link to show that a governance metric supports the requirements of one of the governance policies. If the link already exists the rationale is updated.
      Specified by:
      setupGovernanceDefinitionMetric in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricGUID - unique identifier of the governance metric
      governanceDefinitionGUID - unique identifier of the governance definition
      rationale - description of how the metric supports the metric
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the guids is null or not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • clearGovernanceDefinitionMetric

      public void clearGovernanceDefinitionMetric(String userId, String metricGUID, String governanceDefinitionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Remove the link between a governance metric and a governance definition.
      Specified by:
      clearGovernanceDefinitionMetric in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricGUID - unique identifier of the governance metric
      governanceDefinitionGUID - unique identifier of the governance definition
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the guids is null or not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • setupGovernanceResults

      public void setupGovernanceResults(String userId, String metricGUID, String dataSetGUID, org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceResultsProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Create a link to show which data set holds the measurements for a data set.
      Specified by:
      setupGovernanceResults in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricGUID - unique identifier of the governance metric
      dataSetGUID - unique identifier of the governance definition
      properties - description of how the data set supports the metric
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the guids is null or not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • clearGovernanceResults

      public void clearGovernanceResults(String userId, String metricGUID, String dataSetGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Remove the link between a governance metric and a data set.
      Specified by:
      clearGovernanceResults in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricGUID - unique identifier of the governance metric
      dataSetGUID - unique identifier of the data set
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the guids is null or not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • setGovernanceMeasurementsDataSet

      public void setGovernanceMeasurementsDataSet(String userId, String dataSetGUID, org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsDataSetProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Classify the data set to indicate that contains governance measurements.
      Specified by:
      setGovernanceMeasurementsDataSet in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      dataSetGUID - unique identifier of the metadata element to classify
      properties - properties of the data set's measurements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)
    • clearGovernanceMeasurementsDataSet

      public void clearGovernanceMeasurementsDataSet(String userId, String dataSetGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Remove the governance data designation from the data set.
      Specified by:
      clearGovernanceMeasurementsDataSet in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      dataSetGUID - unique identifier of the metadata element to classify
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)
    • setGovernanceExpectations

      public void setGovernanceExpectations(String userId, String elementGUID, org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceExpectationsProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Classify the element to indicate the expected values of the governance measurements. Can be used to create or update the values.
      Specified by:
      setGovernanceExpectations in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the metadata element to classify
      properties - properties of the data set's measurements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)
    • clearGovernanceExpectations

      public void clearGovernanceExpectations(String userId, String elementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Remove the governance expectations classification from the element.
      Specified by:
      clearGovernanceExpectations in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the metadata element to classify
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)
    • setGovernanceMeasurements

      public void setGovernanceMeasurements(String userId, String elementGUID, org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Classify the element with relevant governance measurements. Can be used to create or update the values.
      Specified by:
      setGovernanceMeasurements in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the metadata element to classify
      properties - properties of the data set's measurements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)
    • clearGovernanceMeasurements

      public void clearGovernanceMeasurements(String userId, String elementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Remove the measurements from the element.
      Specified by:
      clearGovernanceMeasurements in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the metadata element to classify
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)
    • getGovernanceMetricByGUID

      public org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement getGovernanceMetricByGUID(String userId, String metricGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return information about a specific governance metric.
      Specified by:
      getGovernanceMetricByGUID in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - calling user
      metricGUID - unique identifier for the governance metric
      Returns:
      properties of the governance metric
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - metricGUID or userId is null
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • findGovernanceMetrics

      public List<org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement> findGovernanceMetrics(String userId, String searchString, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Retrieve the list of governance metrics for this search string.
      Specified by:
      findGovernanceMetrics in interface org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface
      Parameters:
      userId - the name of the calling user.
      searchString - value to search for (supports wildcards).
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      list of metrics
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid invalid or the search parameter is not correctly specified, or is null.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - the server is not available.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the calling user is not authorized to issue the call.