Class PortHandler<B>

  • Type Parameters:
    B - class of bean for returning the port attributes

    public class PortHandler<B>
    extends OpenMetadataAPIGenericHandler<B>
    Manages the maintenance of port entities. It does not currently support effectivity dates but probably should give that option.
    • Constructor Detail

      • PortHandler

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

      • createPort

        public String createPort​(String userId,
                                 String externalSourceGUID,
                                 String externalSourceName,
                                 String processGUID,
                                 String processGUIDParameterName,
                                 String qualifiedName,
                                 String displayName,
                                 int portType,
                                 Map<String,​String> additionalProperties,
                                 String suppliedTypeName,
                                 Map<String,​Object> extendedProperties,
                                 String methodName)
                          throws InvalidParameterException,
                                 UserNotAuthorizedException,
                                 PropertyServerException
        Create a new metadata element to represent a port.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        processGUID - unique identifier of the process where the port is located
        processGUIDParameterName - parameter supplying processGUID
        qualifiedName - unique name for the port - used in other configuration
        displayName - short display name for the port
        portType - description of the port
        additionalProperties - additional properties for a port
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a port subtype
        methodName - calling method
        Returns:
        unique identifier of the new metadata element for the port
        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)
      • updatePort

        public void updatePort​(String userId,
                               String externalSourceGUID,
                               String externalSourceName,
                               String portGUID,
                               String portGUIDParameterName,
                               String qualifiedName,
                               String displayName,
                               int portType,
                               Map<String,​String> additionalProperties,
                               String suppliedTypeName,
                               Map<String,​Object> extendedProperties,
                               String methodName)
                        throws InvalidParameterException,
                               UserNotAuthorizedException,
                               PropertyServerException
        Update the properties of the metadata element representing a port. This call replaces all existing properties with the supplied properties.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        portGUID - unique identifier of the port to update
        portGUIDParameterName - parameter supplying portGUID
        qualifiedName - unique name for the port - used in other configuration
        displayName - short display name for the port
        portType - description of the port
        additionalProperties - additional properties for a port
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a port subtype
        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)
      • setupProcessPort

        public void setupProcessPort​(String userId,
                                     String externalSourceGUID,
                                     String externalSourceName,
                                     String processGUID,
                                     String processGUIDParameterName,
                                     String portGUID,
                                     String portGUIDParameterName,
                                     String methodName)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Link a port to a process.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        processGUID - unique identifier of the process
        processGUIDParameterName - parameter supplying processGUID
        portGUID - unique identifier of the port
        portGUIDParameterName - parameter supplying portGUID
        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)
      • clearProcessPort

        public void clearProcessPort​(String userId,
                                     String externalSourceGUID,
                                     String externalSourceName,
                                     String processGUID,
                                     String processGUIDParameterName,
                                     String portGUID,
                                     String portGUIDParameterName,
                                     String methodName)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Unlink a port from a process.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        processGUID - unique identifier of the process
        processGUIDParameterName - parameter supplying processGUID
        portGUID - unique identifier of the port
        portGUIDParameterName - parameter supplying portGUID
        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)
      • setupPortDelegation

        public void setupPortDelegation​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String portOneGUID,
                                        String portOneGUIDParameterName,
                                        String portTwoGUID,
                                        String portTwoGUIDParameterName,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Link two ports together to show that portTwo is an implementation of portOne. (That is, portOne delegates to portTwo.)
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        portOneGUID - unique identifier of the port at end 1
        portOneGUIDParameterName - parameter supplying portOneGUID
        portTwoGUID - unique identifier of the port at end 2
        portTwoGUIDParameterName - parameter supplying portTwoGUID
        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)
      • clearPortDelegation

        public void clearPortDelegation​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String portOneGUID,
                                        String portOneGUIDParameterName,
                                        String portTwoGUID,
                                        String portTwoGUIDParameterName,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Remove the port delegation relationship between two ports.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        portOneGUID - unique identifier of the port at end 1
        portOneGUIDParameterName - parameter supplying portOneGUID
        portTwoGUID - unique identifier of the port at end 2
        portTwoGUIDParameterName - parameter supplying portTwoGUID
        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)
      • setupPortSchemaType

        public void setupPortSchemaType​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String portGUID,
                                        String portGUIDParameterName,
                                        String schemaTypeGUID,
                                        String schemaTypeGUIDParameterName,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Link a schema type to a port to show the structure of data it accepts.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        portGUID - unique identifier of the port
        portGUIDParameterName - parameter supplying portGUID
        schemaTypeGUID - unique identifier of the schemaType
        schemaTypeGUIDParameterName - parameter supplying schemaTypeGUID
        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)
      • clearPortSchemaType

        public void clearPortSchemaType​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String portGUID,
                                        String portGUIDParameterName,
                                        String schemaTypeGUID,
                                        String schemaTypeGUIDParameterName,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Remove the schema type from a port.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        portGUID - unique identifier of the port
        portGUIDParameterName - parameter supplying portGUID
        schemaTypeGUID - unique identifier of the schemaType
        schemaTypeGUIDParameterName - parameter supplying schemaTypeGUID
        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)
      • findPorts

        public List<B> findPorts​(String userId,
                                 String searchString,
                                 String searchStringParameterName,
                                 int startFrom,
                                 int pageSize,
                                 String methodName)
                          throws InvalidParameterException,
                                 UserNotAuthorizedException,
                                 PropertyServerException
        Retrieve the list of port 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 - parameter supplying searchString
        startFrom - paging start point
        pageSize - maximum results that can be returned
        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)