Class ExternalReferenceManager

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

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

    • ExternalReferenceManager

      public ExternalReferenceManager(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
    • ExternalReferenceManager

      public ExternalReferenceManager(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
    • ExternalReferenceManager

      public ExternalReferenceManager(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
    • ExternalReferenceManager

      public ExternalReferenceManager(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
    • ExternalReferenceManager

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

    • createExternalReference

      public String createExternalReference(String userId, String anchorGUID, org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties 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 definition of an external reference.
      Specified by:
      createExternalReference in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - calling user
      anchorGUID - optional element to link the external reference to that will act as an anchor - that is, this external reference will be deleted when the element is deleted (once the external reference is linked to the anchor).
      properties - properties for a external reference
      Returns:
      unique identifier of the external reference
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - qualifiedName or userId is null; qualifiedName is not unique
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • updateExternalReference

      public void updateExternalReference(String userId, String externalReferenceGUID, boolean isMergeUpdate, org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Update the definition of an external reference.
      Specified by:
      updateExternalReference in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - calling user
      externalReferenceGUID - unique identifier of external reference
      isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
      properties - properties to change
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid, qualifiedName or userId is null; qualifiedName 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
    • deleteExternalReference

      public void deleteExternalReference(String userId, String externalReferenceGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Remove the definition of an external reference.
      Specified by:
      deleteExternalReference in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - calling user
      externalReferenceGUID - unique identifier of external reference
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid or userId is null; 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
    • linkExternalReferenceToElement

      public void linkExternalReferenceToElement(String userId, String attachedToGUID, String externalReferenceGUID, org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceLinkProperties linkProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Link an external reference to an object.
      Specified by:
      linkExternalReferenceToElement in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - the name of the calling user.
      attachedToGUID - object linked to external references.
      externalReferenceGUID - unique identifier (guid) of the external reference details.
      linkProperties - description for the reference from the perspective of the object that the reference is being attached to.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - problem with the GUID or the external references are not correctly specified, or are 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.
    • unlinkExternalReferenceFromElement

      public void unlinkExternalReferenceFromElement(String userId, String attachedToGUID, String externalReferenceGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Remove the link between an external reference and an element. If the element is its anchor, the external reference is removed.
      Specified by:
      unlinkExternalReferenceFromElement in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - the name of the calling user.
      attachedToGUID - object linked to external references.
      externalReferenceGUID - identifier of the external reference.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - problem with the GUID or the external references are not correctly specified, or are 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.
    • getExternalReferenceByGUID

      public org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement getExternalReferenceByGUID(String userId, String externalReferenceGUID) 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 external reference.
      Specified by:
      getExternalReferenceByGUID in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - calling user
      externalReferenceGUID - unique identifier for the external reference
      Returns:
      properties of the external reference
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - externalReferenceGUID 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
    • findExternalReferencesById

      public List<org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement> findExternalReferencesById(String userId, String resourceId, 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 external references for this resourceId.
      Specified by:
      findExternalReferencesById in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - the name of the calling user.
      resourceId - unique reference id assigned by the resource owner (supports wildcards). This is the qualified name of the entity
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      links to addition information.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid invalid or the external references are not correctly specified, or are 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.
    • getExternalReferencesByURL

      public List<org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement> getExternalReferencesByURL(String userId, String url, 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 external references for this URL.
      Specified by:
      getExternalReferencesByURL in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - the name of the calling user.
      url - URL of the external resource.
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      links to addition information.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid invalid or the external references are not correctly specified, or are 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.
    • retrieveAttachedExternalReferences

      public List<org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement> retrieveAttachedExternalReferences(String userId, String attachedToGUID, 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 external references attached to the supplied object.
      Specified by:
      retrieveAttachedExternalReferences in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - the name of the calling user.
      attachedToGUID - object linked to external reference.
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      links to addition information.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid invalid or the external references are not correctly specified, or are 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.
    • getElementsForExternalReference

      public List<org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement> getElementsForExternalReference(String userId, String externalReferenceGUID, 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 information about the elements linked to a externalReference.
      Specified by:
      getElementsForExternalReference in interface org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface
      Parameters:
      userId - calling user
      externalReferenceGUID - unique identifier for the externalReference
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      properties of the related elements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - qualifiedName 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