Class ExternalReferenceManagerClient
java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.client.ExternalReferenceManagerClient
- All Implemented Interfaces:
org.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface
public class ExternalReferenceManagerClient
extends Object
implements org.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface
ExternalReferenceManagerClient supports the APIs to maintain links to external documentation and
other resources.
-
Constructor Summary
ConstructorsConstructorDescriptionExternalReferenceManagerClient(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.ExternalReferenceManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.ExternalReferenceManagerClient(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.ExternalReferenceManagerClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Create a new client that is going to be used in an OMAG Server.ExternalReferenceManagerClient(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 TypeMethodDescriptioncreateExternalReference(String userId, String anchorGUID, String linkId, String linkDescription, org.odpi.openmetadata.accessservices.datamanager.properties.ExternalReferenceProperties properties) Create a definition of a external reference.voiddeleteExternalReference(String userId, String externalReferenceGUID) Remove the definition of a external reference.List<org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement>findExternalReferencesById(String userId, String resourceId, int startFrom, int pageSize) Retrieve the list of external references for this resourceId (qualified name).List<org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement>findExternalReferencesByURL(String userId, String url, int startFrom, int pageSize) Retrieve the list of external references for this URL.org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElementgetExternalReferenceByGUID(String userId, String externalReferenceGUID) Return information about a specific external reference.voidlinkExternalReferenceToElement(String userId, String attachedToGUID, String linkId, String linkDescription, String externalReferenceGUID) Link an external reference to an object.List<org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement>retrieveAttachedExternalReferences(String userId, String attachedToGUID, int startFrom, int pageSize) Retrieve the list of external references attached to the supplied object.voidunlinkExternalReferenceFromElement(String userId, String attachedToGUID, String externalReferenceGUID) Remove the link between a external reference and an element.voidupdateExternalReference(String userId, String externalReferenceGUID, boolean isMergeUpdate, org.odpi.openmetadata.accessservices.datamanager.properties.ExternalReferenceProperties properties) Update the definition of a external reference.
-
Constructor Details
-
ExternalReferenceManagerClient
public ExternalReferenceManagerClient(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.
-
ExternalReferenceManagerClient
public ExternalReferenceManagerClient(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.
-
ExternalReferenceManagerClient
public ExternalReferenceManagerClient(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.
-
ExternalReferenceManagerClient
public ExternalReferenceManagerClient(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.
-
ExternalReferenceManagerClient
public ExternalReferenceManagerClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient 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.- 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
-
createExternalReference
public String createExternalReference(String userId, String anchorGUID, String linkId, String linkDescription, org.odpi.openmetadata.accessservices.datamanager.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 a external reference.- Specified by:
createExternalReferencein interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- Parameters:
userId- calling useranchorGUID- 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 deletedlinkId- identifier for the reference from the perspective of the anchor object that the reference is being attached to.linkDescription- description for the reference from the perspective of the anchor object that the reference is being attached to.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 uniqueorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
updateExternalReference
public void updateExternalReference(String userId, String externalReferenceGUID, boolean isMergeUpdate, org.odpi.openmetadata.accessservices.datamanager.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 a external reference.- Specified by:
updateExternalReferencein interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- Parameters:
userId- calling userexternalReferenceGUID- unique identifier of external referenceisMergeUpdate- 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 knownorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.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 a external reference.- Specified by:
deleteExternalReferencein interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- Parameters:
userId- calling userexternalReferenceGUID- unique identifier of external reference- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- guid or userId is null; guid is not knownorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
linkExternalReferenceToElement
public void linkExternalReferenceToElement(String userId, String attachedToGUID, String linkId, String linkDescription, String externalReferenceGUID) 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:
linkExternalReferenceToElementin interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- Parameters:
userId- the name of the calling user.attachedToGUID- object linked to external references.linkId- identifier for the reference from the perspective of the object that the reference is being attached to.linkDescription- description for the reference from the perspective of the object that the reference is being attached to.externalReferenceGUID- unique identifier (guid) of the external reference details.- 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 a external reference and an element. If the element is its anchor, the external reference is removed.- Specified by:
unlinkExternalReferenceFromElementin interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- 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.datamanager.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:
getExternalReferenceByGUIDin interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- Parameters:
userId- calling userexternalReferenceGUID- unique identifier for the external reference- Returns:
- properties of the external reference
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- externalReferenceGUID or userId is nullorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
findExternalReferencesById
public List<org.odpi.openmetadata.accessservices.datamanager.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 (qualified name).- Specified by:
findExternalReferencesByIdin interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- 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 entitystartFrom- 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.
-
findExternalReferencesByURL
public List<org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement> findExternalReferencesByURL(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:
findExternalReferencesByURLin interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- 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.datamanager.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:
retrieveAttachedExternalReferencesin interfaceorg.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface- 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.
-