Class ConnectorProvider

java.lang.Object
org.odpi.openmetadata.frameworks.connectors.ConnectorProvider
Direct Known Subclasses:
ConnectorProviderBase, LocalOMRSConnectorProvider

public abstract class ConnectorProvider extends Object
The ConnectorProvider is a formal plug-in interface for the Open Connector Framework (OCF). It provides a factory class for a specific type of connector. Therefore, is it typical to find the ConnectorProvider and Connector implementation written as a pair. The ConnectorProvider uses the properties stored in a Connection object to initialize itself and its Connector instances. the Connection object has the endpoint properties for the server that the connector must communicate with as well as optional additional properties that may be needed for a particular type of connector. It is suggested that the ConnectorProvider validates the contents of the connection and throws ConnectionErrorExceptions if the connection has missing or invalid properties. If there are errors detected in the instantiations or initialization of the connector, then these should be thrown as ConnectorErrorExceptions.
  • Field Details

    • supportedConfigurationProperties

      protected List<ConfigurationPropertyType> supportedConfigurationProperties
      The list of supported configuration property types that describe how the connector's behaviour can be modified.
    • supportedTemplateTypes

      protected List<TemplateType> supportedTemplateTypes
      The list of supported templates that are used by this connector when it creates new open metadata elements.
    • supportedTechnologyTypes

      protected List<SupportedTechnologyType> supportedTechnologyTypes
      The list of technology types that this connector supports.
  • Constructor Details

    • ConnectorProvider

      public ConnectorProvider()
  • Method Details

    • getConnectorTypeProperties

      public abstract ConnectorTypeProperties getConnectorTypeProperties()
      Returns the properties about the type of connector that this ConnectorTypeManager supports.
      Returns:
      properties including the name of the connector type, the connector provider class and any specific connection properties that are recognized by this connector.
    • getConnectorType

      public abstract ConnectorType getConnectorType()
      Returns the properties about the type of connector that this ConnectorTypeManager supports.
      Returns:
      properties including the name of the connector type, the connector provider class and any specific connection properties that are recognized by this connector.
    • getSupportedConfigurationProperties

      public List<ConfigurationPropertyType> getSupportedConfigurationProperties()
      Return the list of supported configuration property types that describe how the connector's behaviour can be modified.
      Returns:
      list of configuration property types
    • getSupportedTemplateTypes

      public List<TemplateType> getSupportedTemplateTypes()
      Return the list of supported template types that describe the templates used by the connector when it is creating new elements.
      Returns:
      list of template types
    • getSupportedTechnologyTypes

      public List<SupportedTechnologyType> getSupportedTechnologyTypes()
      Return the list of technology types supported by this connector.
      Returns:
      technology types
    • getConnector

      public abstract Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException
      Creates a new instance of a connector using the information from the connection and the properties from the subclass(es).
      Parameters:
      connection - connection that should have all the properties needed by the Connector Provider to create a connector instance.
      Returns:
      new connector instance.
      Throws:
      ConnectionCheckedException - an error with the connection.
      ConnectorCheckedException - an error initializing the connector.
    • getConnector

      public abstract Connector getConnector(ConnectionProperties connection) throws ConnectionCheckedException, ConnectorCheckedException
      Creates a new instance of a connector using the information from the connection and the properties from the subclass(es).
      Parameters:
      connection - connection that should have all the properties needed by the Connector Provider to create a connector instance.
      Returns:
      Connector instance of the connector.
      Throws:
      ConnectionCheckedException - if there are missing or invalid properties in the connection
      ConnectorCheckedException - if there are issues instantiating or initializing the connector