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 Details

    • 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 Details

    • 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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a port.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software 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
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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 capability representing the caller
      externalSourceName - unique name of software 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
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Link a port to a process.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      processGUID - unique identifier of the process
      processGUIDParameterName - parameter supplying processGUID
      portGUID - unique identifier of the port
      portGUIDParameterName - parameter supplying portGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Unlink a port from a process.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      processGUID - unique identifier of the process
      processGUIDParameterName - parameter supplying processGUID
      portGUID - unique identifier of the port
      portGUIDParameterName - parameter supplying portGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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 capability representing the caller
      externalSourceName - unique name of software 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
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the port delegation relationship between two ports.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software 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
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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 capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      portGUID - unique identifier of the port
      portGUIDParameterName - parameter supplying portGUID
      schemaTypeGUID - unique identifier of the schemaType
      schemaTypeGUIDParameterName - parameter supplying schemaTypeGUID
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the schema type from a port.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      portGUID - unique identifier of the port
      portGUIDParameterName - parameter supplying portGUID
      schemaTypeGUID - unique identifier of the schemaType
      schemaTypeGUIDParameterName - parameter supplying schemaTypeGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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)
    • removePort

      public void removePort(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a port.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      portGUID - unique identifier of the metadata element to remove
      portGUIDParameterName - parameter supplying portGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • getPortsForProcess

      public List<B> getPortsForProcess(String userId, String processGUID, String processGUIDParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of ports associated with a process.
      Parameters:
      userId - calling user
      processGUID - unique identifier of the process of interest
      processGUIDParameterName - parameter passing processGUID
      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?
      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 associated 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)
    • getPortUse

      public List<B> getPortUse(String userId, String portGUID, String portGUIDParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of ports that delegate to this port.
      Parameters:
      userId - calling user
      portGUID - unique identifier of the starting port
      portGUIDParameterName - parameter passing portGUID
      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?
      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 associated 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)
    • getPortDelegation

      public B getPortDelegation(String userId, String portGUID, String portGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the port that this port delegates to.
      Parameters:
      userId - calling user
      portGUID - unique identifier of the starting port alias
      portGUIDParameterName - parameter passing portGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      matching metadata element
      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)
    • getPortsByName

      public List<B> getPortsByName(String userId, String name, String nameParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of port metadata elements with a matching qualified or display 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
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      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)
    • getPortByGUID

      public B getPortByGUID(String userId, String portGUID, String portGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the port metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      portGUID - unique identifier of the requested metadata element
      portGUIDParameterName - parameter passing portGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      matching metadata element
      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)