Class StewardshipAction
java.lang.Object
org.odpi.openmetadata.accessservices.stewardshipaction.client.StewardshipAction
- All Implemented Interfaces:
org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
public class StewardshipAction
extends Object
implements org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
StewardshipAction provides the generic client-side interface for the Stewardship Action Open Metadata Access Service (OMAS).
There are other clients that provide specialized methods for specific types of Asset.
This client is initialized with the URL and name of the server that is running the Asset Owner OMAS.
This server is responsible for locating and managing the asset owner's definitions exchanged with this client.
-
Constructor Summary
ConstructorsConstructorDescriptionStewardshipAction(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.StewardshipAction(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.StewardshipAction(String serverName, String serverPlatformURLRoot, String userId, String password, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.StewardshipAction(String serverName, String serverPlatformURLRoot, StewardshipActionRESTClient restClient, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Create a new client that is going to be used in an OMAG Server (view service or integration service typically).StewardshipAction(String serverName, String serverPlatformURLRoot, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionorg.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStubgetConsolidatedDuplicate(String userId, String elementGUID) Return details of the consolidated duplicate for a requested element.List<org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub>getContributingDuplicates(String userId, String consolidatedDuplicateGUID, int startFrom, int pageSize) List the elements that are contributing to a consolidating duplicate element.List<org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.DuplicateElement>getPeerDuplicates(String userId, String elementGUID, int startFrom, int pageSize) List the elements that are linked as peer duplicates to the requested element.voidlinkElementsAsDuplicates(String userId, String element1GUID, String element2GUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes) Create a simple relationship between two elements.voidlinkElementToConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID, String contributingElementGUID) Create a ConsolidatedDuplicateLink relationship between the consolidated duplicate element and one of its contributing element.voidmarkAsConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes) Mark an element as a consolidated duplicate (or update the properties if it is already marked as such).voidmarkElementAsKnownDuplicate(String userId, String elementGUID) Classify an element as a known duplicate.voidremoveConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID) Remove the consolidated duplicate element and the links to the elements that contributed to its values.voidunlinkElementFromConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID, String contributingElementGUID) Remove the relationship between two elements that marks them as duplicates.voidunlinkElementsAsDuplicates(String userId, String element1GUID, String element2GUID) Remove the relationship between two elements that marks them as duplicates.voidunmarkElementAsKnownDuplicate(String userId, String elementGUID) Remove the classification that identifies this element as a known duplicate.
-
Constructor Details
-
StewardshipAction
public StewardshipAction(String serverName, String serverPlatformURLRoot, 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 toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesauditLog- logging destination- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
StewardshipAction
public StewardshipAction(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 toserverPlatformURLRoot- the network address of the server running the OMAS REST services- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
StewardshipAction
public StewardshipAction(String serverName, String serverPlatformURLRoot, String userId, String password, 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 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 requestsauditLog- logging destination- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
StewardshipAction
public StewardshipAction(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 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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
StewardshipAction
public StewardshipAction(String serverName, String serverPlatformURLRoot, StewardshipActionRESTClient restClient, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException Create a new client that is going to be used in an OMAG Server (view service or integration service typically).- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesrestClient- client that issues the REST API callsmaxPageSize- maximum number of results supported by this serverauditLog- logging destination- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
linkElementsAsDuplicates
public void linkElementsAsDuplicates(String userId, String element1GUID, String element2GUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Create a simple relationship between two elements. These elements must be of the same type. If the relationship already exists, the properties are updated.- Specified by:
linkElementsAsDuplicatesin interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userelement1GUID- unique identifier of first elementelement2GUID- unique identifier of second elementstatusIdentifier- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward- identifier of the stewardstewardTypeName- type of element used to identify the stewardstewardPropertyName- property name used to identify stewardsource- source of the duplicate detection processingnotes- notes for the steward- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid, or the elements are of different typesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
unlinkElementsAsDuplicates
public void unlinkElementsAsDuplicates(String userId, String element1GUID, String element2GUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Remove the relationship between two elements that marks them as duplicates.- Specified by:
unlinkElementsAsDuplicatesin interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userelement1GUID- unique identifier of first elementelement2GUID- unique identifier of second element- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid or the elements are not linked as duplicatesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
markElementAsKnownDuplicate
public void markElementAsKnownDuplicate(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 Classify an element as a known duplicate. This will mean that it is included in duplicate processing during metadata retrieval requests.- Specified by:
markElementAsKnownDuplicatein interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userelementGUID- unique identifier of the element- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid, or the elements are of different typesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
unmarkElementAsKnownDuplicate
public void unmarkElementAsKnownDuplicate(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 classification that identifies this element as a known duplicate.- Specified by:
unmarkElementAsKnownDuplicatein interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userelementGUID- unique identifier of the element- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid or the elements are not linked as duplicatesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
getPeerDuplicates
public List<org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.DuplicateElement> getPeerDuplicates(String userId, String elementGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException List the elements that are linked as peer duplicates to the requested element.- Specified by:
getPeerDuplicatesin interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userelementGUID- element to querystartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of linked duplicates
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
markAsConsolidatedDuplicate
public void markAsConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Mark an element as a consolidated duplicate (or update the properties if it is already marked as such). This method assumes that a standard create method has been used to create the element first using the values from contributing elements. It is just adding the ConsolidatedDuplicate classification to the element.- Specified by:
markAsConsolidatedDuplicatein interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userconsolidatedDuplicateGUID- unique identifier of the element that contains the consolidated information from a collection of elements that are all duplicates of one another.statusIdentifier- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward- identifier of the stewardstewardTypeName- type of element used to identify the stewardstewardPropertyName- property name used to identify stewardsource- source of the duplicate detection processingnotes- notes for the steward- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
linkElementToConsolidatedDuplicate
public void linkElementToConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID, String contributingElementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Create a ConsolidatedDuplicateLink relationship between the consolidated duplicate element and one of its contributing element.- Specified by:
linkElementToConsolidatedDuplicatein interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userconsolidatedDuplicateGUID- unique identifier of consolidated duplicatecontributingElementGUID- unique identifier of duplicate element- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid or the elements are not linked as duplicatesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
unlinkElementFromConsolidatedDuplicate
public void unlinkElementFromConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID, String contributingElementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Remove the relationship between two elements that marks them as duplicates.- Specified by:
unlinkElementFromConsolidatedDuplicatein interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userconsolidatedDuplicateGUID- unique identifier of consolidated duplicatecontributingElementGUID- unique identifier of duplicate element- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid or the elements are not linked as duplicatesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
getContributingDuplicates
public List<org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub> getContributingDuplicates(String userId, String consolidatedDuplicateGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException List the elements that are contributing to a consolidating duplicate element.- Specified by:
getContributingDuplicatesin interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userconsolidatedDuplicateGUID- element to querystartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of contributing duplicates
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid or the elements are not linked as duplicatesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
getConsolidatedDuplicate
public org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub getConsolidatedDuplicate(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 Return details of the consolidated duplicate for a requested element.- Specified by:
getConsolidatedDuplicatein interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userelementGUID- element to query- Returns:
- header of consolidated duplicated or null if none
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid or the elements are not linked as duplicatesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
removeConsolidatedDuplicate
public void removeConsolidatedDuplicate(String userId, String consolidatedDuplicateGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Remove the consolidated duplicate element and the links to the elements that contributed to its values.- Specified by:
removeConsolidatedDuplicatein interfaceorg.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface- Parameters:
userId- calling userconsolidatedDuplicateGUID- unique identifier of element to remove- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid or the elements are not linked as duplicatesorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-