Class ExternalReferenceExchangeService


  • public class ExternalReferenceExchangeService
    extends java.lang.Object
    DataAssetExchangeService is the context for managing data assets and associated elements such as schemas.
    • Method Detail

      • setAssetManagerIsHome

        public void setAssetManagerIsHome​(boolean assetManagerIsHome)
        Set up the flag that controls the ownership of metadata created for this asset manager. Default is true.
        Parameters:
        assetManagerIsHome - should the metadata be marked as owned by the infrastructure manager so others can not update?
      • isForLineage

        public boolean isForLineage()
        Return whether retrieval requests from this service are to include elements with the Memento classification attached or not.
        Returns:
        boolean flag
      • setForLineage

        public void setForLineage​(boolean forLineage)
        Set up whether retrieval requests from this service are to include elements with the Memento classification attached or not.
        Parameters:
        forLineage - boolean flag
      • isForDuplicateProcessing

        public boolean isForDuplicateProcessing()
        Return whether retrieval requests from this service are to avoid merging duplicates or not.
        Returns:
        boolean flag
      • setForDuplicateProcessing

        public void setForDuplicateProcessing​(boolean forDuplicateProcessing)
        Set up whether retrieval requests from this service are to avoid merging duplicates or not.
        Parameters:
        forDuplicateProcessing - boolean flag
      • updateExternalReference

        public void updateExternalReference​(java.lang.String externalReferenceGUID,
                                            java.lang.String referenceExternalIdentifier,
                                            boolean isMergeUpdate,
                                            ExternalReferenceProperties properties,
                                            java.util.Date effectiveTime)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Update the definition of a external reference.
        Parameters:
        externalReferenceGUID - unique identifier of external reference
        referenceExternalIdentifier - unique identifier of the external reference in the external asset manager
        isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
        properties - properties to change
        effectiveTime - the time that the retrieved elements must be effective for
        Throws:
        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 void deleteExternalReference​(java.lang.String externalReferenceGUID,
                                            java.lang.String referenceExternalIdentifier,
                                            java.util.Date effectiveTime)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Remove the definition of a external reference.
        Parameters:
        externalReferenceGUID - unique identifier of external reference
        referenceExternalIdentifier - unique identifier of the external reference in the external asset manager
        effectiveTime - the time that the retrieved elements must be effective for
        Throws:
        InvalidParameterException - guid or userId is null; guid is not known
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • linkExternalReferenceToElement

        public java.lang.String linkExternalReferenceToElement​(java.lang.String attachedToGUID,
                                                               java.lang.String externalReferenceGUID,
                                                               ExternalReferenceLinkProperties linkProperties,
                                                               java.util.Date effectiveTime)
                                                        throws InvalidParameterException,
                                                               PropertyServerException,
                                                               UserNotAuthorizedException
        Link an external reference to an object.
        Parameters:
        attachedToGUID - object linked to external references.
        linkProperties - 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.
        effectiveTime - the time that the retrieved elements must be effective for
        Returns:
        Unique identifier for new relationship
        Throws:
        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 void updateExternalReferenceToElementLink​(java.lang.String externalReferenceLinkGUID,
                                                         ExternalReferenceLinkProperties linkProperties,
                                                         java.util.Date effectiveTime)
                                                  throws InvalidParameterException,
                                                         PropertyServerException,
                                                         UserNotAuthorizedException
        Update the link between an external reference to an object.
        Parameters:
        linkProperties - description for the reference from the perspective of the object that the reference is being attached to.
        externalReferenceLinkGUID - unique identifier (guid) of the external reference details.
        effectiveTime - the time that the retrieved elements must be effective for
        Throws:
        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 void unlinkExternalReferenceFromElement​(java.lang.String externalReferenceLinkGUID,
                                                       java.util.Date effectiveTime)
                                                throws InvalidParameterException,
                                                       PropertyServerException,
                                                       UserNotAuthorizedException
        Remove the link between a external reference and an element. If the element is its anchor, the external reference is removed.
        Parameters:
        externalReferenceLinkGUID - identifier of the external reference relationship.
        effectiveTime - the time that the retrieved elements must be effective for
        Throws:
        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.
      • getExternalReferencesById

        public java.util.List<ExternalReferenceElement> getExternalReferencesById​(java.lang.String resourceId,
                                                                                  int startFrom,
                                                                                  int pageSize,
                                                                                  java.util.Date effectiveTime)
                                                                           throws InvalidParameterException,
                                                                                  PropertyServerException,
                                                                                  UserNotAuthorizedException
        Retrieve the list of external references for this resourceId.
        Parameters:
        resourceId - unique reference id assigned by the resource owner (supports wildcards). This is the qualified name of the entity
        effectiveTime - the time that the retrieved elements must be effective for
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        links to addition information.
        Throws:
        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 java.util.List<ExternalReferenceElement> getExternalReferencesByURL​(java.lang.String url,
                                                                                   int startFrom,
                                                                                   int pageSize,
                                                                                   java.util.Date effectiveTime)
                                                                            throws InvalidParameterException,
                                                                                   PropertyServerException,
                                                                                   UserNotAuthorizedException
        Retrieve the list of external references for this URL.
        Parameters:
        url - URL of the external resource.
        effectiveTime - the time that the retrieved elements must be effective for
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        Returns:
        links to addition information.
        Throws:
        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 java.util.List<ExternalReferenceElement> getExternalReferencesByName​(java.lang.String name,
                                                                                    int startFrom,
                                                                                    int pageSize,
                                                                                    java.util.Date effectiveTime)
                                                                             throws InvalidParameterException,
                                                                                    PropertyServerException,
                                                                                    UserNotAuthorizedException
        Retrieve the list of external references for this name.
        Parameters:
        name - qualifiedName or displayName of the external resource.
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        effectiveTime - the time that the retrieved elements must be effective for
        Returns:
        links to addition information.
        Throws:
        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.
      • findExternalReferences

        public java.util.List<ExternalReferenceElement> findExternalReferences​(java.lang.String searchString,
                                                                               int startFrom,
                                                                               int pageSize,
                                                                               java.util.Date effectiveTime)
                                                                        throws InvalidParameterException,
                                                                               PropertyServerException,
                                                                               UserNotAuthorizedException
        Find the external references that contain the search string - which may contain wildcards.
        Parameters:
        searchString - regular expression (RegEx) to search for
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        effectiveTime - the time that the retrieved elements must be effective for
        Returns:
        links to addition information.
        Throws:
        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 java.util.List<ExternalReferenceLinkElement> retrieveAttachedExternalReferences​(java.lang.String attachedToGUID,
                                                                                               int startFrom,
                                                                                               int pageSize,
                                                                                               java.util.Date effectiveTime)
                                                                                        throws InvalidParameterException,
                                                                                               PropertyServerException,
                                                                                               UserNotAuthorizedException
        Retrieve the list of external references attached to the supplied object.
        Parameters:
        attachedToGUID - object linked to external reference.
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        effectiveTime - the time that the retrieved elements must be effective for
        Returns:
        links to addition information.
        Throws:
        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.