Class 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 Detail

      • ExternalReferenceExchangeRESTServices

        public ExternalReferenceExchangeRESTServices()
        Default constructor
    • Method Detail

      • createExternalReference

        public GUIDResponse createExternalReference​(String serverName,
                                                    String userId,
                                                    boolean assetManagerIsHome,
                                                    ExternalReferenceRequestBody requestBody)
        Create a definition of an external reference.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        assetManagerIsHome - ensure that only the asset manager can update this asset
        requestBody - 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,
                                                    boolean forLineage,
                                                    boolean forDuplicateProcessing,
                                                    ExternalReferenceRequestBody requestBody)
        Update the definition of an external reference.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        externalReferenceGUID - unique identifier of external reference
        isMergeUpdate - 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

        public VoidResponse deleteExternalReference​(String serverName,
                                                    String userId,
                                                    String externalReferenceGUID,
                                                    boolean forLineage,
                                                    boolean forDuplicateProcessing,
                                                    UpdateRequestBody requestBody)
        Remove the definition of an external reference.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        externalReferenceGUID - unique identifier of external reference
        forLineage - 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

        public GUIDResponse linkExternalReferenceToElement​(String serverName,
                                                           String userId,
                                                           boolean assetManagerIsHome,
                                                           String attachedToGUID,
                                                           String externalReferenceGUID,
                                                           boolean forLineage,
                                                           boolean forDuplicateProcessing,
                                                           ExternalReferenceLinkRequestBody requestBody)
        Link an external reference to an object.
        Parameters:
        serverName - name of the server to route the request to
        userId - the name of the calling user.
        assetManagerIsHome - ensure that only the asset manager can update this asset
        attachedToGUID - object linked to external references.
        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.
        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,
                                                                 boolean forLineage,
                                                                 boolean forDuplicateProcessing,
                                                                 ExternalReferenceLinkRequestBody requestBody)
        Update the link between an external reference to an object.
        Parameters:
        serverName - name of the server to route the request to
        userId - 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

        public VoidResponse unlinkExternalReferenceFromElement​(String serverName,
                                                               String userId,
                                                               String externalReferenceLinkGUID,
                                                               boolean forLineage,
                                                               boolean forDuplicateProcessing,
                                                               EffectiveTimeQueryRequestBody requestBody)
        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 to
        userId - 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

        public ExternalReferenceElementsResponse 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.
        Parameters:
        serverName - name of the server to route the request to
        userId - 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

        public ExternalReferenceElementsResponse getExternalReferencesById​(String serverName,
                                                                           String userId,
                                                                           int startFrom,
                                                                           int pageSize,
                                                                           boolean forLineage,
                                                                           boolean forDuplicateProcessing,
                                                                           NameRequestBody requestBody)
        Retrieve the list of external references for this requestBody.
        Parameters:
        serverName - name of the server to route the request to
        userId - 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

        public ExternalReferenceElementsResponse getExternalReferencesByURL​(String serverName,
                                                                            String userId,
                                                                            int startFrom,
                                                                            int pageSize,
                                                                            boolean forLineage,
                                                                            boolean forDuplicateProcessing,
                                                                            NameRequestBody requestBody)
        Retrieve the list of external references for this URL.
        Parameters:
        serverName - name of the server to route the request to
        userId - 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

        public ExternalReferenceElementsResponse getExternalReferencesByName​(String serverName,
                                                                             String userId,
                                                                             int startFrom,
                                                                             int pageSize,
                                                                             boolean forLineage,
                                                                             boolean forDuplicateProcessing,
                                                                             NameRequestBody requestBody)
        Retrieve the list of external references for this name.
        Parameters:
        serverName - name of the server to route the request to
        userId - 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

        public ExternalReferenceElementsResponse 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.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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:
        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,
                                                                        boolean forLineage,
                                                                        boolean forDuplicateProcessing,
                                                                        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 to
        userId - the name of the calling user.
        requestBody - regular expression (RegEx) to search for
        startFrom - index of the list to start from (0 for start)
        forLineage - return elements marked with the Memento classification?
        forDuplicateProcessing - do not merge elements marked as duplicates?
        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,
                                                                                        boolean forLineage,
                                                                                        boolean forDuplicateProcessing,
                                                                                        EffectiveTimeQueryRequestBody requestBody)
        Retrieve the list of external references attached to the supplied object.
        Parameters:
        serverName - name of the server to route the request to
        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.
        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

        public ExternalReferenceElementResponse getExternalReferenceByGUID​(String serverName,
                                                                           String userId,
                                                                           String externalReferenceGUID,
                                                                           boolean forLineage,
                                                                           boolean forDuplicateProcessing,
                                                                           EffectiveTimeQueryRequestBody requestBody)
        Return information about a specific external reference.
        Parameters:
        serverName - name of the server to route the request to
        userId - calling user
        externalReferenceGUID - unique identifier for the external reference
        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:
        properties of the external reference or InvalidParameterException externalReferenceGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem