java.lang.Object
org.odpi.openmetadata.accessservices.stewardshipaction.client.StewardshipAction
All Implemented Interfaces:
org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface, org.odpi.openmetadata.accessservices.stewardshipaction.api.SurveyReportInterface

public class StewardshipAction extends Object implements org.odpi.openmetadata.accessservices.stewardshipaction.api.SurveyReportInterface, org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
StewardshipAction provides the generic client-side interface for the Stewardship Action Open Metadata Access Service (OMAS). This client is initialized with the URL and name of the server that is running the Stewardship Action OMAS.
  • Constructor Details

    • StewardshipAction

      public StewardshipAction(String serverName, String serverPlatformURLRoot, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, int maxPageSize) 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
      auditLog - logging destination
      maxPageSize - maximum value allowed for page size
      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, int maxPageSize) 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 - maximum value allowed for page size
      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, int maxPageSize) 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
      auditLog - logging destination
      maxPageSize - maximum value allowed for page size
      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, int maxPageSize) 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 - maximum value allowed for page size
      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, engine service or integration service typically).
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      restClient - client that issues the REST API calls
      maxPageSize - maximum number of results supported by this server
      auditLog - 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

    • getSurveyReports

      public List<org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport> getSurveyReports(String userId, String assetGUID, 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
      Return the survey reports linked to the asset.
      Specified by:
      getSurveyReports in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.SurveyReportInterface
      Parameters:
      userId - calling user
      assetGUID - unique identifier of the asset
      startFrom - position in the list (used when there are so many reports that paging is needed)
      pageSize - maximum number of elements to return an this call
      Returns:
      list of discovery analysis reports
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem that occurred within the property server.
    • getSurveyReportAnnotations

      public List<org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation> getSurveyReportAnnotations(String userId, String reportGUID, 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
      Return the annotations linked directly to the report.
      Specified by:
      getSurveyReportAnnotations in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.SurveyReportInterface
      Parameters:
      userId - identifier of calling user
      reportGUID - identifier of the discovery request.
      startFrom - initial position in the stored list.
      pageSize - maximum number of definitions to return on this call.
      Returns:
      list of annotations
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem that occurred within the property server.
    • getExtendedAnnotations

      public List<org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation> getExtendedAnnotations(String userId, String annotationGUID, 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
      Return any annotations attached to this annotation.
      Specified by:
      getExtendedAnnotations in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.SurveyReportInterface
      Parameters:
      userId - identifier of calling user
      annotationGUID - anchor annotation
      startFrom - starting position in the list
      pageSize - maximum number of annotations that can be returned.
      Returns:
      list of Annotation objects
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem that occurred within the property server.
    • 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:
      linkElementsAsDuplicates in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      element1GUID - unique identifier of first element
      element2GUID - unique identifier of second element
      statusIdentifier - what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)
      steward - identifier of the steward
      stewardTypeName - type of element used to identify the steward
      stewardPropertyName - property name used to identify steward
      source - source of the duplicate detection processing
      notes - 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 types
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.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:
      unlinkElementsAsDuplicates in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      element1GUID - unique identifier of first element
      element2GUID - 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 duplicates
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.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:
      markElementAsKnownDuplicate in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      elementGUID - 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 types
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.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:
      unmarkElementAsKnownDuplicate in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      elementGUID - 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 duplicates
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getPeerDuplicates

      public List<org.odpi.openmetadata.frameworks.openmetadata.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:
      getPeerDuplicates in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      elementGUID - element to query
      startFrom - paging start point
      pageSize - 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 invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.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:
      markAsConsolidatedDuplicate in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      consolidatedDuplicateGUID - 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 steward
      stewardTypeName - type of element used to identify the steward
      stewardPropertyName - property name used to identify steward
      source - source of the duplicate detection processing
      notes - notes for the steward
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.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:
      linkElementToConsolidatedDuplicate in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      consolidatedDuplicateGUID - unique identifier of consolidated duplicate
      contributingElementGUID - 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 duplicates
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.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:
      unlinkElementFromConsolidatedDuplicate in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      consolidatedDuplicateGUID - unique identifier of consolidated duplicate
      contributingElementGUID - 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 duplicates
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getContributingDuplicates

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.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:
      getContributingDuplicates in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      consolidatedDuplicateGUID - element to query
      startFrom - paging start point
      pageSize - 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 duplicates
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getConsolidatedDuplicate

      public org.odpi.openmetadata.frameworks.openmetadata.metadataelements.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:
      getConsolidatedDuplicate in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      elementGUID - 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 duplicates
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.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:
      removeConsolidatedDuplicate in interface org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface
      Parameters:
      userId - calling user
      consolidatedDuplicateGUID - 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 duplicates
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem