Class ExternalReferenceLinkHandler<B>


  • public class ExternalReferenceLinkHandler<B>
    extends ReferenceableHandler<B>
    ExternalReferenceLinkHandler manages retrieval of ExternalReference objects attached to a specific element. Thus it includes the relationship properties and entity properties in the bean. It runs server-side in the OMAG Server Platform and retrieves ExternalReference entities through the OMRSRepositoryConnector.
    • Constructor Detail

      • ExternalReferenceLinkHandler

        public ExternalReferenceLinkHandler​(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

      • setupExternalReferenceLink

        public String setupExternalReferenceLink​(String userId,
                                                 String externalSourceGUID,
                                                 String externalSourceName,
                                                 String referenceableGUID,
                                                 String referenceableGUIDParameterName,
                                                 String externalReferenceGUID,
                                                 String externalReferenceGUIDParameterName,
                                                 String referenceId,
                                                 String referenceDescription,
                                                 Date effectiveFrom,
                                                 Date effectiveTo,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Create a relationship between a host and an 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
        referenceableGUID - unique identifier of the referenceable
        referenceableGUIDParameterName - parameter supplying the referenceableGUID
        externalReferenceGUID - unique identifier of the external reference
        externalReferenceGUIDParameterName - parameter supplying the externalReferenceGUID
        referenceId - local identifier for the reference
        referenceDescription - short description for the link (think hover text)
        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 relationship
        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)
      • updateExternalReferenceLink

        public void updateExternalReferenceLink​(String userId,
                                                String externalSourceGUID,
                                                String externalSourceName,
                                                String relationshipGUID,
                                                String relationshipGUIDParameterName,
                                                String referenceId,
                                                String referenceDescription,
                                                Date effectiveFrom,
                                                Date effectiveTo,
                                                String methodName)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Create a relationship between a host and an 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
        relationshipGUID - unique identifier of relationship
        relationshipGUIDParameterName - parameter supplying the relationshipGUID
        referenceId - local identifier for the reference
        referenceDescription - short description for the link (think hover text)
        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 - 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)
      • clearExternalReferenceLink

        public Relationship clearExternalReferenceLink​(String userId,
                                                       String externalSourceGUID,
                                                       String externalSourceName,
                                                       String relationshipGUID,
                                                       String relationshipGUIDParameterName,
                                                       Date effectiveTime,
                                                       String methodName)
                                                throws InvalidParameterException,
                                                       UserNotAuthorizedException,
                                                       PropertyServerException
        Remove a relationship between a host and an 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
        relationshipGUID - unique identifier of the referenceable
        relationshipGUIDParameterName - parameter supplying the relationshipGUID
        effectiveTime - the time that the retrieved elements must be effective for
        methodName - calling method
        Returns:
        relationship that has just been deleted
        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)
      • getExternalReferences

        public List<B> getExternalReferences​(String userId,
                                             String startingGUID,
                                             String startingGUIDParameterName,
                                             String startingTypeName,
                                             List<String> serviceSupportedZones,
                                             int startingFrom,
                                             int pageSize,
                                             Date effectiveTime,
                                             String methodName)
                                      throws InvalidParameterException,
                                             PropertyServerException,
                                             UserNotAuthorizedException
        Return the external references attached to an anchor entity.
        Parameters:
        userId - calling user
        startingGUID - identifier for the entity that the reference is attached to
        startingGUIDParameterName - name of parameter supplying the GUID
        startingTypeName - name of the type of object being attached to
        serviceSupportedZones - supported zones for calling service
        startingFrom - where to start from in the list
        pageSize - maximum number of results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for
        methodName - calling method
        Returns:
        list of retrieved objects
        Throws:
        InvalidParameterException - the input properties are invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server