Class ExternalReferenceExchangeResource
java.lang.Object
org.odpi.openmetadata.accessservices.assetmanager.server.spring.ExternalReferenceExchangeResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/asset-manager/users/{userId}")
public class ExternalReferenceExchangeResource
extends Object
GlossaryExchangeResource is the server-side implementation of the Asset Manager OMAS's
support for glossaries. It matches the GlossaryExchangeClient.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateExternalReference
(String serverName, String userId, boolean assetManagerIsHome, ExternalReferenceRequestBody requestBody) Create a definition of an external reference.deleteExternalReference
(String serverName, String userId, String externalReferenceGUID, boolean forLineage, boolean forDuplicateProcessing, UpdateRequestBody requestBody) Remove the definition of an external reference.findExternalReferences
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, SearchStringRequestBody requestBody) Find the external references that contain the search string - which may contain wildcards.getExternalReferenceByGUID
(String serverName, String userId, String externalReferenceGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Return information about a specific external reference.getExternalReferences
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the list of external references sorted in open metadata.getExternalReferencesById
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the list of external references for this requestBody.getExternalReferencesByName
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the list of external references for this name.getExternalReferencesByURL
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the list of external references for this URL.getExternalReferencesForAssetManager
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the list of external reference created on behalf of the named asset manager.linkExternalReferenceToElement
(String serverName, String userId, String attachedToGUID, String externalReferenceGUID, boolean assetManagerIsHome, boolean forLineage, boolean forDuplicateProcessing, ExternalReferenceLinkRequestBody requestBody) Link an external reference to an object.retrieveAttachedExternalReferences
(String serverName, String userId, String attachedToGUID, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the list of external references attached to the supplied object.unlinkExternalReferenceFromElement
(String serverName, String userId, String externalReferenceLinkGUID, EffectiveTimeQueryRequestBody requestBody, boolean forLineage, boolean forDuplicateProcessing) Remove the link between an external reference and an element.updateExternalReference
(String serverName, String userId, String externalReferenceGUID, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, ExternalReferenceRequestBody requestBody) Update the definition of an external reference.updateExternalReferenceToElementLink
(String serverName, String userId, String externalReferenceLinkGUID, boolean forLineage, boolean forDuplicateProcessing, ExternalReferenceLinkRequestBody requestBody) Update the link between an external reference to an object.
-
Constructor Details
-
ExternalReferenceExchangeResource
public ExternalReferenceExchangeResource()Default constructor
-
-
Method Details
-
createExternalReference
@PostMapping(path="/external-references") public GUIDResponse createExternalReference(@PathVariable String serverName, @PathVariable String userId, @RequestParam boolean assetManagerIsHome, @RequestBody ExternalReferenceRequestBody requestBody) Create a definition of an 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
@PostMapping(path="/external-references/{externalReferenceGUID}") public VoidResponse updateExternalReference(@PathVariable String serverName, @PathVariable String userId, @PathVariable String externalReferenceGUID, @RequestParam boolean isMergeUpdate, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody ExternalReferenceRequestBody requestBody) Update the definition of an 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?forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/{externalReferenceGUID}/remove") public VoidResponse deleteExternalReference(@PathVariable String serverName, @PathVariable String userId, @PathVariable String externalReferenceGUID, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody UpdateRequestBody requestBody) Remove the definition of an external reference.- Parameters:
serverName
- name of the server to route the request touserId
- calling userexternalReferenceGUID
- unique identifier of external referenceforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- 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
@PostMapping(path="/external-references/{externalReferenceGUID}/links/{attachedToGUID}") public GUIDResponse linkExternalReferenceToElement(@PathVariable String serverName, @PathVariable String userId, @PathVariable String attachedToGUID, @PathVariable String externalReferenceGUID, @RequestParam boolean assetManagerIsHome, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/links/{externalReferenceLinkGUID}/update") public VoidResponse updateExternalReferenceToElementLink(@PathVariable String serverName, @PathVariable String userId, @PathVariable String externalReferenceLinkGUID, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/links/{externalReferenceLinkGUID}/remove") public VoidResponse unlinkExternalReferenceFromElement(@PathVariable String serverName, @PathVariable String userId, @PathVariable String externalReferenceLinkGUID, @RequestBody EffectiveTimeQueryRequestBody requestBody, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing) Remove the link between an 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/by-type") public ExternalReferenceElementsResponse getExternalReferences(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/by-resource-id") public ExternalReferenceElementsResponse getExternalReferencesById(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/by-url") public ExternalReferenceElementsResponse getExternalReferencesByURL(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/by-name") public ExternalReferenceElementsResponse getExternalReferencesByName(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/by-asset-manager") public ExternalReferenceElementsResponse getExternalReferencesForAssetManager(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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 returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- 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
@PostMapping(path="/external-references/by-search-string") public ExternalReferenceElementsResponse findExternalReferences(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?- 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
@PostMapping(path="/external-references/attached-to/{attachedToGUID}") public ExternalReferenceLinkElementsResponse retrieveAttachedExternalReferences(@PathVariable String serverName, @PathVariable String userId, @PathVariable String attachedToGUID, @RequestParam int startFrom, @RequestParam int pageSize, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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.forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?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
@PostMapping(path="/external-references/{externalReferenceGUID}/by-guid") public ExternalReferenceElementResponse getExternalReferenceByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String externalReferenceGUID, @RequestParam(required=false,defaultValue="false") boolean forLineage, @RequestParam(required=false,defaultValue="false") boolean forDuplicateProcessing, @RequestBody 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 referenceforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- 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
-