Class ExternalReferenceExchangeRESTServices
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.assetmanager.server.ExternalReferenceExchangeRESTServices
-
public class ExternalReferenceExchangeRESTServices extends Object
ExternalReferenceExchangeRESTServices is the server-side implementation of the Asset Manager OMAS's support for glossaries. It matches the ExternalReferenceExchangeClient.
-
-
Constructor Summary
Constructors Constructor Description ExternalReferenceExchangeRESTServices()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GUIDResponsecreateExternalReference(String serverName, String userId, boolean assetManagerIsHome, ExternalReferenceRequestBody requestBody)Create a definition of a external reference.VoidResponsedeleteExternalReference(String serverName, String userId, String externalReferenceGUID, MetadataCorrelationProperties requestBody)Remove the definition of a external reference.ExternalReferenceElementsResponsefindExternalReferences(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody)Find the external references that contain the search string - which may contain wildcards.ExternalReferenceElementResponsegetExternalReferenceByGUID(String serverName, String userId, String externalReferenceGUID, EffectiveTimeQueryRequestBody requestBody)Return information about a specific external reference.ExternalReferenceElementsResponsegetExternalReferences(String serverName, String userId, int startFrom, int pageSize, EffectiveTimeQueryRequestBody requestBody)Retrieve the list of external references sorted in open metadata.ExternalReferenceElementsResponsegetExternalReferencesById(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody)Retrieve the list of external references for this requestBody.ExternalReferenceElementsResponsegetExternalReferencesByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody)Retrieve the list of external references for this name.ExternalReferenceElementsResponsegetExternalReferencesByURL(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody)Retrieve the list of external references for this URL.ExternalReferenceElementsResponsegetExternalReferencesForAssetManager(String serverName, String userId, int startFrom, int pageSize, EffectiveTimeQueryRequestBody requestBody)Retrieve the list of external reference created on behalf of the named asset manager.GUIDResponselinkExternalReferenceToElement(String serverName, String userId, boolean assetManagerIsHome, String attachedToGUID, String externalReferenceGUID, ExternalReferenceLinkRequestBody requestBody)Link an external reference to an object.ExternalReferenceLinkElementsResponseretrieveAttachedExternalReferences(String serverName, String userId, String attachedToGUID, int startFrom, int pageSize, EffectiveTimeQueryRequestBody requestBody)Retrieve the list of external references attached to the supplied object.VoidResponseunlinkExternalReferenceFromElement(String serverName, String userId, String externalReferenceLinkGUID, AssetManagerIdentifiersRequestBody requestBody)Remove the link between a external reference and an element.VoidResponseupdateExternalReference(String serverName, String userId, String externalReferenceGUID, boolean isMergeUpdate, ExternalReferenceRequestBody requestBody)Update the definition of a external reference.VoidResponseupdateExternalReferenceToElementLink(String serverName, String userId, String externalReferenceLinkGUID, ExternalReferenceLinkRequestBody requestBody)Update the link between an external reference to an object.
-
-
-
Method Detail
-
createExternalReference
public GUIDResponse createExternalReference(String serverName, String userId, boolean assetManagerIsHome, ExternalReferenceRequestBody requestBody)
Create a definition of a external reference.- Parameters:
serverName- name of the server to route the request touserId- calling userassetManagerIsHome- ensure that only the asset manager can update this assetrequestBody- properties for a external reference- Returns:
- unique identifier of the external reference or InvalidParameterException qualifiedName or userId is null; qualifiedName is not unique PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
updateExternalReference
public VoidResponse updateExternalReference(String serverName, String userId, String externalReferenceGUID, boolean isMergeUpdate, ExternalReferenceRequestBody requestBody)
Update the definition of a external reference.- Parameters:
serverName- name of the server to route the request touserId- calling userexternalReferenceGUID- unique identifier of external referenceisMergeUpdate- are unspecified properties unchanged (true) or replaced with null?requestBody- properties to change- Returns:
- void or InvalidParameterException guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
deleteExternalReference
public VoidResponse deleteExternalReference(String serverName, String userId, String externalReferenceGUID, MetadataCorrelationProperties requestBody)
Remove the definition of a external reference.- Parameters:
serverName- name of the server to route the request touserId- calling userexternalReferenceGUID- unique identifier of external referencerequestBody- unique identifiers of the external reference in the external asset manager- Returns:
- void or InvalidParameterException guid or userId is null; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkExternalReferenceToElement
public GUIDResponse linkExternalReferenceToElement(String serverName, String userId, boolean assetManagerIsHome, String attachedToGUID, String externalReferenceGUID, ExternalReferenceLinkRequestBody requestBody)
Link an external reference to an object.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.assetManagerIsHome- ensure that only the asset manager can update this assetattachedToGUID- object linked to external references.requestBody- 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.- Returns:
- Unique identifier for new relationship or 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.
-
updateExternalReferenceToElementLink
public VoidResponse updateExternalReferenceToElementLink(String serverName, String userId, String externalReferenceLinkGUID, ExternalReferenceLinkRequestBody requestBody)
Update the link between an external reference to an object.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.externalReferenceLinkGUID- unique identifier (guid) of the external reference details.requestBody- description for the reference from the perspective of the object that the reference is being attached to.- Returns:
- void or 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.
-
unlinkExternalReferenceFromElement
public VoidResponse unlinkExternalReferenceFromElement(String serverName, String userId, String externalReferenceLinkGUID, AssetManagerIdentifiersRequestBody requestBody)
Remove the link between a external reference and an element. If the element is its anchor, the external reference is removed.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.externalReferenceLinkGUID- identifier of the external reference relationship.requestBody- unique identifier of software server capability representing the caller- Returns:
- void or 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.
-
getExternalReferences
public ExternalReferenceElementsResponse getExternalReferences(String serverName, String userId, int startFrom, int pageSize, EffectiveTimeQueryRequestBody requestBody)
Retrieve the list of external references sorted in open metadata.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.startFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.requestBody- the time that the retrieved elements must be effective for- Returns:
- links to addition information or 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.
-
getExternalReferencesById
public ExternalReferenceElementsResponse getExternalReferencesById(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody)
Retrieve the list of external references for this requestBody.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.startFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.requestBody- unique reference id assigned by the resource owner (supports wildcards). This is the qualified name of the entity- Returns:
- links to addition information or 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.
-
getExternalReferencesByURL
public ExternalReferenceElementsResponse getExternalReferencesByURL(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody)
Retrieve the list of external references for this URL.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.startFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.requestBody- URL of the external resource.- Returns:
- links to addition information or 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.
-
getExternalReferencesByName
public ExternalReferenceElementsResponse getExternalReferencesByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody)
Retrieve the list of external references for this name.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.startFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.requestBody- name of the external resource.- Returns:
- links to addition information or 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.
-
getExternalReferencesForAssetManager
public ExternalReferenceElementsResponse getExternalReferencesForAssetManager(String serverName, String userId, int startFrom, int pageSize, EffectiveTimeQueryRequestBody requestBody)
Retrieve the list of external reference created on behalf of the named asset manager.- Parameters:
serverName- name of the server to route the request touserId- calling userstartFrom- paging start pointpageSize- maximum results that can be returnedrequestBody- the time that the retrieved elements must be effective for- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
findExternalReferences
public ExternalReferenceElementsResponse findExternalReferences(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody)
Find the external references that contain the search string - which may contain wildcards.- Parameters:
serverName- name of the server to route the request touserId- the name of the calling user.requestBody- regular expression (RegEx) to search forstartFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.- Returns:
- links to addition information or 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.
-
retrieveAttachedExternalReferences
public ExternalReferenceLinkElementsResponse retrieveAttachedExternalReferences(String serverName, String userId, String attachedToGUID, int startFrom, int pageSize, EffectiveTimeQueryRequestBody requestBody)
Retrieve the list of external references attached to the supplied object.- Parameters:
serverName- name of the server to route the request touserId- 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.requestBody- the time that the retrieved elements must be effective for- Returns:
- links to addition information or 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.
-
getExternalReferenceByGUID
public ExternalReferenceElementResponse getExternalReferenceByGUID(String serverName, String userId, String externalReferenceGUID, EffectiveTimeQueryRequestBody requestBody)
Return information about a specific external reference.- Parameters:
serverName- name of the server to route the request touserId- calling userexternalReferenceGUID- unique identifier for the external referencerequestBody- the time that the retrieved elements must be effective for- Returns:
- properties of the external reference or InvalidParameterException externalReferenceGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
-