Class GovernanceMetricsManager
java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceMetricsManager
- All Implemented Interfaces:
GovernanceMetricsInterface
,RelatedElementsManagementInterface
public class GovernanceMetricsManager
extends GovernanceProgramBaseClient
implements GovernanceMetricsInterface
GovernanceMetricsManager is the java client for managing governance metrics and their links to all types of governance definitions.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
nullRequestBody
-
Constructor Summary
ConstructorDescriptionGovernanceMetricsManager
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.GovernanceMetricsManager
(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request.GovernanceMetricsManager
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.GovernanceMetricsManager
(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.GovernanceMetricsManager
(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) Create a new client that uses the supplied rest client. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearGovernanceDefinitionMetric
(String userId, String metricGUID, String governanceDefinitionGUID) Remove the link between a governance metric and a governance definition.void
clearGovernanceExpectations
(String userId, String elementGUID) Remove the governance expectations classification from the element.void
clearGovernanceMeasurements
(String userId, String elementGUID) Remove the measurements from the element.void
clearGovernanceMeasurementsDataSet
(String userId, String dataSetGUID) Remove the governance data designation from the data set.void
clearGovernanceResults
(String userId, String metricGUID, String dataSetGUID) Remove the link between a governance metric and a data set.createGovernanceMetric
(String userId, GovernanceMetricProperties metricProperties) Create a new governance metric.void
deleteGovernanceMetric
(String userId, String metricGUID) Delete a specific governance metric.findGovernanceMetrics
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of governance metrics for this search string.getGovernanceMetricByGUID
(String userId, String metricGUID) Return information about a specific governance metric.void
setGovernanceExpectations
(String userId, String elementGUID, GovernanceExpectationsProperties properties) Classify the element to indicate the expected values of the governance measurements.void
setGovernanceMeasurements
(String userId, String elementGUID, GovernanceMeasurementsProperties properties) Classify the element with relevant governance measurements.void
setGovernanceMeasurementsDataSet
(String userId, String dataSetGUID, GovernanceMeasurementsDataSetProperties properties) Classify the data set to indicate that contains governance measurements.void
setupGovernanceDefinitionMetric
(String userId, String metricGUID, String governanceDefinitionGUID, GovernanceDefinitionMetricProperties rationale) Create a link to show that a governance metric supports the requirements of one of the governance policies.void
setupGovernanceResults
(String userId, String metricGUID, String dataSetGUID, GovernanceResultsProperties properties) Create a link to show which data set holds the measurements for a data set.void
updateGovernanceMetric
(String userId, String metricGUID, boolean isMergeUpdate, GovernanceMetricProperties metricProperties) Update an existing governance metric.Methods inherited from class org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
clearAssignmentScope, clearGovernanceDefinitionScope, clearGovernanceResponsibilityAssignment, clearGovernedBy, clearMoreInformation, clearResource, clearStakeholder, getAssignedActors, getAssignedScopes, getDescriptiveElements, getGovernanceDefinitionScopes, getGovernanceDefinitionsForElement, getGovernedElements, getMoreInformation, getResourceList, getResponsibleRoles, getRoleResponsibilities, getScopedGovernanceDefinitions, getStakeholderCommissionedElements, getStakeholders, getSupportedByResource, removeReferenceable, setupAssignmentScope, setupGovernanceDefinitionScope, setupGovernanceResponsibilityAssignment, setupGovernedBy, setupMoreInformation, setupResource, setupStakeholder, updateGovernanceDefinitionStatus, updateRelationship
-
Constructor Details
-
GovernanceMetricsManager
public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- bad input parameters
-
GovernanceMetricsManager
public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws 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 toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- bad input parameters
-
GovernanceMetricsManager
public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesmaxPageSize
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- bad input parameters
-
GovernanceMetricsManager
public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) throws 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 toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsmaxPageSize
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- bad input parameters
-
GovernanceMetricsManager
public GovernanceMetricsManager(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) throws 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 toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- internal client for rest callsmaxPageSize
- pre-initialized parameter limit- Throws:
InvalidParameterException
- bad input parameters
-
-
Method Details
-
createGovernanceMetric
public String createGovernanceMetric(String userId, GovernanceMetricProperties metricProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new governance metric.- Specified by:
createGovernanceMetric
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricProperties
- properties of the metric- Returns:
- unique identifier of the metric
- Throws:
InvalidParameterException
- typeName, documentIdentifier or userId is null; documentIdentifier is not unique; typeName is not validPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
updateGovernanceMetric
public void updateGovernanceMetric(String userId, String metricGUID, boolean isMergeUpdate, GovernanceMetricProperties metricProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update an existing governance metric.- Specified by:
updateGovernanceMetric
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricGUID
- unique identifier of the metric to updateisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?metricProperties
- properties to update- Throws:
InvalidParameterException
- guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
deleteGovernanceMetric
public void deleteGovernanceMetric(String userId, String metricGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Delete a specific governance metric.- Specified by:
deleteGovernanceMetric
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricGUID
- unique identifier of the metric to remove- Throws:
InvalidParameterException
- guid is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
setupGovernanceDefinitionMetric
public void setupGovernanceDefinitionMetric(String userId, String metricGUID, String governanceDefinitionGUID, GovernanceDefinitionMetricProperties rationale) throws InvalidParameterException, UserNotAuthorizedException, 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 interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricGUID
- unique identifier of the governance metricgovernanceDefinitionGUID
- unique identifier of the governance definitionrationale
- description of how the metric supports the metric- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
clearGovernanceDefinitionMetric
public void clearGovernanceDefinitionMetric(String userId, String metricGUID, String governanceDefinitionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the link between a governance metric and a governance definition.- Specified by:
clearGovernanceDefinitionMetric
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricGUID
- unique identifier of the governance metricgovernanceDefinitionGUID
- unique identifier of the governance definition- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
setupGovernanceResults
public void setupGovernanceResults(String userId, String metricGUID, String dataSetGUID, GovernanceResultsProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a link to show which data set holds the measurements for a data set.- Specified by:
setupGovernanceResults
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricGUID
- unique identifier of the governance metricdataSetGUID
- unique identifier of the governance definitionproperties
- description of how the data set supports the metric- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
clearGovernanceResults
public void clearGovernanceResults(String userId, String metricGUID, String dataSetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the link between a governance metric and a data set.- Specified by:
clearGovernanceResults
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricGUID
- unique identifier of the governance metricdataSetGUID
- unique identifier of the data set- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
setGovernanceMeasurementsDataSet
public void setGovernanceMeasurementsDataSet(String userId, String dataSetGUID, GovernanceMeasurementsDataSetProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Classify the data set to indicate that contains governance measurements.- Specified by:
setGovernanceMeasurementsDataSet
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling userdataSetGUID
- unique identifier of the metadata element to classifyproperties
- properties of the data set's measurements- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearGovernanceMeasurementsDataSet
public void clearGovernanceMeasurementsDataSet(String userId, String dataSetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the governance data designation from the data set.- Specified by:
clearGovernanceMeasurementsDataSet
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling userdataSetGUID
- unique identifier of the metadata element to classify- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setGovernanceExpectations
public void setGovernanceExpectations(String userId, String elementGUID, GovernanceExpectationsProperties properties) throws InvalidParameterException, UserNotAuthorizedException, 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 interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the metadata element to classifyproperties
- properties of the data set's measurements- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearGovernanceExpectations
public void clearGovernanceExpectations(String userId, String elementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the governance expectations classification from the element.- Specified by:
clearGovernanceExpectations
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the metadata element to classify- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setGovernanceMeasurements
public void setGovernanceMeasurements(String userId, String elementGUID, GovernanceMeasurementsProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Classify the element with relevant governance measurements. Can be used to create or update the values.- Specified by:
setGovernanceMeasurements
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the metadata element to classifyproperties
- properties of the data set's measurements- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearGovernanceMeasurements
public void clearGovernanceMeasurements(String userId, String elementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the measurements from the element.- Specified by:
clearGovernanceMeasurements
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the metadata element to classify- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getGovernanceMetricByGUID
public GovernanceMetricElement getGovernanceMetricByGUID(String userId, String metricGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific governance metric.- Specified by:
getGovernanceMetricByGUID
in interfaceGovernanceMetricsInterface
- Parameters:
userId
- calling usermetricGUID
- unique identifier for the governance metric- Returns:
- properties of the governance metric
- Throws:
InvalidParameterException
- metricGUID or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
findGovernanceMetrics
public List<GovernanceMetricElement> findGovernanceMetrics(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the list of governance metrics for this search string.- Specified by:
findGovernanceMetrics
in interfaceGovernanceMetricsInterface
- 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:
InvalidParameterException
- guid invalid or the search parameter is not correctly specified, or is null.PropertyServerException
- the server is not available.UserNotAuthorizedException
- the calling user is not authorized to issue the call.
-