Class EndpointHandler<B>


public class EndpointHandler<B> extends ReferenceableHandler<B>
EndpointHandler manages Endpoint objects. These describe the network addresses where services are running. They are used by connection objects to describe the service that the connector should call. They are linked to servers to show their network address where the services that they are hosting are running. EndpointHandler runs server-side in the OMAG Server Platform and retrieves Endpoint entities through the OMRSRepositoryConnector via the generic handler and repository handler.
  • Constructor Details

    • EndpointHandler

      public EndpointHandler(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

    • createEndpoint

      public String createEndpoint(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String qualifiedName, String displayName, String description, String networkAddress, String protocol, String encryptionMethod, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Creates a new endpoint and returns the unique identifier for it.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      anchorGUID - the unique identifier for the anchor entity (null for unanchored endpoints)
      qualifiedName - unique name of the endpoint
      displayName - human memorable name for the endpoint - does not need to be unique
      description - (optional) description of the endpoint. Setting a description, particularly in a public endpoint makes the endpoint more valuable to other users and can act as an embryonic glossary term
      networkAddress - the network address (typically the URL but this depends on the protocol)
      protocol - the name of the protocol to use to connect to the endpoint
      encryptionMethod - encryption method to use when passing data to this endpoint
      additionalProperties - name value pairs for values that are not formally defined in the type system
      suppliedTypeName - name of the subtype for the endpoint or null for standard type
      extendedProperties - any properties for a 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
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Returns:
      GUID for new endpoint
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - there is a problem adding the endpoint properties to the property server.
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • createEndpointFromTemplate

      public String createEndpointFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, String qualifiedName, String displayName, String description, String networkAddress, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a connection using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new element.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      templateGUID - unique identifier of the metadata element to copy
      qualifiedName - unique name for the element - used in other configuration
      displayName - short display name for the new element
      description - description of the new element
      networkAddress - network address
      methodName - calling method
      Returns:
      unique identifier of the new 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)
    • updateEndpoint

      public void updateEndpoint(String userId, String externalSourceGUID, String externalSourceName, String endpointGUID, String endpointGUIDParameterName, String qualifiedName, String displayName, String description, String networkAddress, String protocol, String encryptionMethod, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, boolean isMergeUpdate, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Updates the properties of an existing endpoint.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      endpointGUID - unique identifier for the endpoint
      endpointGUIDParameterName - parameter providing endpointGUID
      qualifiedName - unique name of the endpoint
      displayName - human memorable name for the endpoint - does not need to be unique
      description - (optional) description of the endpoint. Setting a description, particularly in a public endpoint makes the endpoint more valuable to other users and can act as an embryonic glossary term
      networkAddress - the network address (typically the URL but this depends on the protocol)
      protocol - the name of the protocol to use to connect to the endpoint
      encryptionMethod - encryption method to use when passing data to this endpoint
      additionalProperties - name value pairs for values that are not formally defined in the type system
      suppliedTypeName - name of the subtype for the endpoint or null for standard type
      extendedProperties - any properties for a subtype
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      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 null or invalid.
      PropertyServerException - there is a problem adding the endpoint properties to the property server.
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • removeEndpoint

      public void removeEndpoint(String userId, String externalSourceGUID, String externalSourceName, String guid, String guidParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element. This will delete all elements anchored to it.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      guid - unique identifier of the metadata element to remove
      guidParameterName - parameter supplying the guid
      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)
    • getEndpointsByNetworkAddress

      public List<B> getEndpointsByNetworkAddress(String userId, String networkAddress, String networkAddressParameterName, List<String> serviceSupportedZones, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the list of endpoints exactly matching the supplied network address.
      Parameters:
      userId - the calling user
      networkAddress - network address of endpoint
      networkAddressParameterName - parameter providing endpoint
      serviceSupportedZones - list of supported zones for this service
      startFrom - index of the list ot start from (0 for start)
      pageSize - maximum number of elements to return
      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:
      endpoint list
      Throws:
      InvalidParameterException - the userId is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getEndpointsByNetworkAddress

      public List<B> getEndpointsByNetworkAddress(String userId, String networkAddress, String networkAddressParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the list of endpoints exactly matching the supplied network address.
      Parameters:
      userId - the calling user
      networkAddress - network address of endpoint
      networkAddressParameterName - parameter providing endpoint
      startFrom - index of the list ot start from (0 for start)
      pageSize - maximum number of elements to return
      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:
      endpoint list
      Throws:
      InvalidParameterException - the userId is null or invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • findEndpoints

      public List<B> findEndpoints(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 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
      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)
    • getEndpointsByName

      public List<B> getEndpointsByName(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 metadata elements with a matching qualified name, display name or network address. 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)
    • getEndpointByGUID

      public B getEndpointByGUID(String userId, String guid, String guidParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      guid - unique identifier of the requested metadata element
      guidParameterName - parameter name of guid
      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)