Class ExternalReferenceHandler<B>


  • public class ExternalReferenceHandler<B>
    extends ReferenceableHandler<B>
    ExternalReferenceHandler manages ExternalReference objects. It runs server-side in the OMAG Server Platform and retrieves ExternalReference entities through the OMRSRepositoryConnector.
    • Constructor Detail

      • ExternalReferenceHandler

        public ExternalReferenceHandler​(OpenMetadataAPIGenericConverter<B> converter,
                                        Class<B> beanClass,
                                        String serviceName,
                                        String serverName,
                                        InvalidParameterHandler invalidParameterHandler,
                                        RepositoryHandler repositoryHandler,
                                        OMRSRepositoryHelper repositoryHelper,
                                        String localServerUserId,
                                        OpenMetadataServerSecurityVerifier securityVerifier,
                                        List<String> supportedZones,
                                        List<String> defaultZones,
                                        List<String> publishZones,
                                        AuditLog auditLog)
        Construct the handler information needed to interact with the repository services
        Parameters:
        converter - specific converter for this bean class
        beanClass - name of bean class that is represented by the generic class B
        serviceName - name of this service
        serverName - name of the local server
        invalidParameterHandler - handler for managing parameter errors
        repositoryHandler - manages calls to the repository services
        repositoryHelper - provides utilities for manipulating the repository services objects
        localServerUserId - userId for this server
        securityVerifier - open metadata security services verifier
        supportedZones - list of zones that the access service is allowed to serve Asset instances from.
        defaultZones - list of zones that the access service should set in all new Asset instances.
        publishZones - list of zones that the access service sets up in published Asset instances.
        auditLog - destination for audit log events.
    • Method Detail

      • createExternalReference

        public String createExternalReference​(String userId,
                                              String externalSourceGUID,
                                              String externalSourceName,
                                              String anchorGUID,
                                              String qualifiedName,
                                              String displayName,
                                              String description,
                                              String url,
                                              String referenceVersion,
                                              String organization,
                                              Map<String,​String> additionalProperties,
                                              String suppliedTypeName,
                                              Map<String,​Object> extendedProperties,
                                              Date effectiveFrom,
                                              Date effectiveTo,
                                              String methodName)
                                       throws InvalidParameterException,
                                              UserNotAuthorizedException,
                                              PropertyServerException
        Create a definition of a operating platform.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        anchorGUID - 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).
        qualifiedName - unique name for the reference
        displayName - short display name for the reference
        description - description of the reference
        url - the location of the reference
        referenceVersion - version of the reference
        organization - owning org for the reference
        additionalProperties - additional properties for an external reference
        suppliedTypeName - type of external reference
        extendedProperties - properties for an external reference subtype
        effectiveFrom - starting time for this relationship (null for all time)
        effectiveTo - ending time for this relationship (null for all time)
        methodName - calling method
        Returns:
        unique identifier of external reference
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • updateExternalReference

        public void updateExternalReference​(String userId,
                                            String externalSourceGUID,
                                            String externalSourceName,
                                            String operatingPlatformGUID,
                                            String operatingPlatformGUIDParameterName,
                                            String qualifiedName,
                                            String displayName,
                                            String description,
                                            String url,
                                            String referenceVersion,
                                            String organization,
                                            Map<String,​String> additionalProperties,
                                            String suppliedTypeName,
                                            Map<String,​Object> extendedProperties,
                                            boolean isMergeUpdate,
                                            Date effectiveFrom,
                                            Date effectiveTo,
                                            String methodName)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Update the operating platform.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        operatingPlatformGUID - unique identifier of the operating platform to update
        operatingPlatformGUIDParameterName - parameter passing the operatingPlatformGUID
        qualifiedName - unique name for the reference
        displayName - short display name for the reference
        description - description of the reference
        url - the location of the reference
        referenceVersion - version of the reference
        organization - owning org for the reference
        additionalProperties - additional properties for an external reference
        suppliedTypeName - name of sub type or null
        extendedProperties - properties for a governance operatingPlatform subtype
        isMergeUpdate - should the properties be merged with existing properties or replace the existing properties?
        effectiveFrom - starting time for this relationship (null for all time)
        effectiveTo - ending time for this relationship (null for all time)
        methodName - calling method
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • removeExternalReference

        public void removeExternalReference​(String userId,
                                            String externalSourceGUID,
                                            String externalSourceName,
                                            String operatingPlatformGUID,
                                            String operatingPlatformGUIDParameterName,
                                            String methodName)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Remove the metadata element representing an external reference.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        operatingPlatformGUID - unique identifier of the metadata element to remove
        operatingPlatformGUIDParameterName - parameter supplying the operatingPlatformGUID
        methodName - calling method
        Throws:
        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)
      • getExternalReferencesById

        public List<B> getExternalReferencesById​(String userId,
                                                 String referenceId,
                                                 String referenceIdParameterName,
                                                 int startFrom,
                                                 int pageSize,
                                                 Date effectiveTime,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Retrieve the list of external reference metadata elements with a matching referenceId. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        referenceId - referenceId to search for
        referenceIdParameterName - parameter supplying referenceId
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        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)
      • getExternalReferencesByName

        public List<B> getExternalReferencesByName​(String userId,
                                                   String name,
                                                   String nameParameterName,
                                                   int startFrom,
                                                   int pageSize,
                                                   Date effectiveTime,
                                                   String methodName)
                                            throws InvalidParameterException,
                                                   UserNotAuthorizedException,
                                                   PropertyServerException
        Retrieve the list of external reference metadata elements with a matching name. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        name - name to search for
        nameParameterName - parameter supplying name
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        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)
      • getExternalReferencesByURL

        public List<B> getExternalReferencesByURL​(String userId,
                                                  String url,
                                                  String urlParameterName,
                                                  int startFrom,
                                                  int pageSize,
                                                  Date effectiveTime,
                                                  String methodName)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Retrieve the list of external reference metadata elements with a matching url. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        url - url to search for
        urlParameterName - parameter supplying url
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        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 List<B> findExternalReferences​(String userId,
                                              String searchString,
                                              String searchStringParameterName,
                                              int startFrom,
                                              int pageSize,
                                              Date effectiveTime,
                                              String methodName)
                                       throws InvalidParameterException,
                                              UserNotAuthorizedException,
                                              PropertyServerException
        Retrieve the list of metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        userId - calling user
        searchString - string to find in the properties
        searchStringParameterName - name of parameter supplying the search string
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        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)