public class ExternalReferenceManager extends Object implements ExternalReferencesInterface
| Constructor and Description |
|---|
ExternalReferenceManager(String serverName,
String serverPlatformURLRoot)
Create a new client with no authentication embedded in the HTTP request.
|
ExternalReferenceManager(String serverName,
String serverPlatformURLRoot,
GovernanceProgramRESTClient restClient,
int maxPageSize)
Create a new client that uses the supplied rest client.
|
ExternalReferenceManager(String serverName,
String serverPlatformURLRoot,
int maxPageSize,
AuditLog auditLog)
Create a new client with no authentication embedded in the HTTP request.
|
ExternalReferenceManager(String serverName,
String serverPlatformURLRoot,
String userId,
String password)
Create a new client that passes userId and password in each HTTP request.
|
ExternalReferenceManager(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.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createExternalReference(String userId,
String anchorGUID,
ExternalReferenceProperties properties)
Create a definition of a external reference.
|
void |
deleteExternalReference(String userId,
String externalReferenceGUID)
Remove the definition of a external reference.
|
List<ExternalReferenceElement> |
findExternalReferencesById(String userId,
String resourceId,
int startFrom,
int pageSize)
Retrieve the list of external references for this resourceId.
|
ExternalReferenceElement |
getExternalReferenceByGUID(String userId,
String externalReferenceGUID)
Return information about a specific external reference.
|
List<ExternalReferenceElement> |
getExternalReferencesByURL(String userId,
String url,
int startFrom,
int pageSize)
Retrieve the list of external references for this URL.
|
void |
linkExternalReferenceToElement(String userId,
String attachedToGUID,
String externalReferenceGUID,
ExternalReferenceLinkProperties linkProperties)
Link an external reference to an object.
|
List<ExternalReferenceElement> |
retrieveAttachedExternalReferences(String userId,
String attachedToGUID,
int startFrom,
int pageSize)
Retrieve the list of external references attached to the supplied object.
|
void |
unlinkExternalReferenceFromElement(String userId,
String attachedToGUID,
String externalReferenceGUID)
Remove the link between a external reference and an element.
|
void |
updateExternalReference(String userId,
String externalReferenceGUID,
boolean isMergeUpdate,
ExternalReferenceProperties properties)
Update the definition of a external reference.
|
public ExternalReferenceManager(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversInvalidParameterException - bad input parameterspublic ExternalReferenceManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversuserId - caller's userId embedded in all HTTP requestspassword - caller's userId embedded in all HTTP requestsInvalidParameterException - bad input parameterspublic ExternalReferenceManager(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversmaxPageSize - pre-initialized parameter limitauditLog - logging destinationInvalidParameterException - bad input parameterspublic ExternalReferenceManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversuserId - caller's userId embedded in all HTTP requestspassword - caller's userId embedded in all HTTP requestsmaxPageSize - pre-initialized parameter limitauditLog - logging destinationInvalidParameterException - bad input parameterspublic ExternalReferenceManager(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversrestClient - internal client for rest callsmaxPageSize - pre-initialized parameter limitInvalidParameterException - bad input parameterspublic String createExternalReference(String userId, String anchorGUID, ExternalReferenceProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
createExternalReference in interface ExternalReferencesInterfaceuserId - 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 deleted (once the external reference is linked to the anchor).properties - properties for a external referenceInvalidParameterException - qualifiedName or userId is null; qualifiedName is not uniquePropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void updateExternalReference(String userId, String externalReferenceGUID, boolean isMergeUpdate, ExternalReferenceProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateExternalReference in interface ExternalReferencesInterfaceuserId - calling userexternalReferenceGUID - unique identifier of external referenceisMergeUpdate - are unspecified properties unchanged (true) or replaced with null?properties - properties to changeInvalidParameterException - guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not knownPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void deleteExternalReference(String userId, String externalReferenceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
deleteExternalReference in interface ExternalReferencesInterfaceuserId - calling userexternalReferenceGUID - unique identifier of external referenceInvalidParameterException - guid or userId is null; guid is not knownPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void linkExternalReferenceToElement(String userId, String attachedToGUID, String externalReferenceGUID, ExternalReferenceLinkProperties linkProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
linkExternalReferenceToElement in interface ExternalReferencesInterfaceuserId - 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.InvalidParameterException - problem with the GUID or the external references are not correctly specified, or are null.PropertyServerException - the server is not available.UserNotAuthorizedException - the calling user is not authorized to issue the call.public void unlinkExternalReferenceFromElement(String userId, String attachedToGUID, String externalReferenceGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
unlinkExternalReferenceFromElement in interface ExternalReferencesInterfaceuserId - the name of the calling user.attachedToGUID - object linked to external references.externalReferenceGUID - identifier of the external reference.InvalidParameterException - problem with the GUID or the external references are not correctly specified, or are null.PropertyServerException - the server is not available.UserNotAuthorizedException - the calling user is not authorized to issue the call.public ExternalReferenceElement getExternalReferenceByGUID(String userId, String externalReferenceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getExternalReferenceByGUID in interface ExternalReferencesInterfaceuserId - calling userexternalReferenceGUID - unique identifier for the external referenceInvalidParameterException - externalReferenceGUID or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<ExternalReferenceElement> findExternalReferencesById(String userId, String resourceId, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
findExternalReferencesById in interface ExternalReferencesInterfaceuserId - 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.InvalidParameterException - guid invalid or the external references are not correctly specified, or are null.PropertyServerException - the server is not available.UserNotAuthorizedException - the calling user is not authorized to issue the call.public List<ExternalReferenceElement> getExternalReferencesByURL(String userId, String url, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getExternalReferencesByURL in interface ExternalReferencesInterfaceuserId - 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.InvalidParameterException - guid invalid or the external references are not correctly specified, or are null.PropertyServerException - the server is not available.UserNotAuthorizedException - the calling user is not authorized to issue the call.public List<ExternalReferenceElement> retrieveAttachedExternalReferences(String userId, String attachedToGUID, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
retrieveAttachedExternalReferences in interface ExternalReferencesInterfaceuserId - 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.InvalidParameterException - guid invalid or the external references are not correctly specified, or are null.PropertyServerException - the server is not available.UserNotAuthorizedException - the calling user is not authorized to issue the call.Copyright © 2018–2021 LF AI & Data Foundation. All rights reserved.