Class ConnectionProperties

Direct Known Subclasses:
ConnectorBase.ProtectedConnection, EnterpriseOMRSConnection, VirtualConnectionProperties

public class ConnectionProperties extends AssetReferenceable
ConnectionProperties is an object that contains the properties needed to create and initialise a connector to access a specific data assets.

The properties for ConnectionProperties are defined in model 0201. They include the following options for connector name:
  • guid - Globally unique identifier for the connection.
  • url - URL of the connection definition in the metadata repository. This URL can be stored as a property in another entity to create an explicit link to this connection.
  • qualifiedName - The official (unique) name for the connection. This is often defined by the IT systems management organization and should be used (when available) on audit logs and error messages. The qualifiedName is defined in the 0010 model as part of Referenceable.
  • displayName - A consumable name for the connection. Often a shortened form of the qualifiedName for use on user interfaces and messages. The displayName should be only be used for audit logs and error messages if the qualifiedName is not set.
Either the guid, qualifiedName or displayName can be used to specify the name for a connection. Other properties for the connection include:
  • type - information about the TypeDef for Connection
  • description - A full description of the connection covering details of the assets it connects to along with usage and versioning information.
  • additionalProperties - Any additional properties associated with the connection.
  • configurationProperties - Any specific configuration properties for the underlying technology.
  • securedProperties - Protected properties for secure log on by connector to back end server. These are protected properties that can only be retrieved by privileged connector code.
  • connectorType - Properties that describe the connector type for the connector.
  • endpoint - Properties that describe the server endpoint where the connector will retrieve the assets.
  • Field Details

    • connectionBean

      protected Connection connectionBean
  • Constructor Details

    • ConnectionProperties

      public ConnectionProperties(Connection connectionBean)
      Bean constructor
      Parameters:
      connectionBean - bean containing the properties
    • ConnectionProperties

      public ConnectionProperties(ConnectionProperties templateConnection)
      Copy/clone Constructor to return a copy of a connection object that is connected to an asset.
      Parameters:
      templateConnection - template object to copy.
    • ConnectionProperties

      public ConnectionProperties(ConnectionProperties templateConnection, ConnectorType connectorType)
      Copy/clone Constructor to return a copy of a connection object but with a replacement connector type.
      Parameters:
      templateConnection - template object to copy.
      connectorType - connector type to replace in the connection
  • Method Details

    • getConnectionBean

      protected Connection getConnectionBean()
      Return the bean with all the properties.
      Returns:
      connection bean
    • getDisplayName

      public String getDisplayName()
      Returns the stored display name property for the connection. Null means no displayName is available.
      Returns:
      displayName
    • getConnectionName

      public String getConnectionName()
      Returns a formatted string with the connection name. It is used in formatting error messages for the exceptions thrown by consuming components. It is extremely cautious because most of the exceptions are reporting a malformed connection object so who knows what else is wrong with it.

      Within the connection are 2 possible properties that could contain the connection name: ** qualifiedName - this is a uniqueName and should be there ** displayName - shorter simpler name but may not be unique - so may not identify the connection in error

      This method inspects these properties and builds up a string to represent the connection name
      Returns:
      connection name
    • getDescription

      public String getDescription()
      Returns the stored description property for the connection. If no description is provided then null is returned.
      Returns:
      description
    • getConnectorType

      public ConnectorTypeProperties getConnectorType()
      Returns a copy of the properties for this connection's connector type. A null means there is no connection type.
      Returns:
      connector type for the connection
    • getUserId

      public String getUserId()
      Return id of the calling user.
      Returns:
      string
    • getEncryptedPassword

      public String getEncryptedPassword()
      Return an encrypted password. The caller is responsible for decrypting it.
      Returns:
      string
    • getClearPassword

      public String getClearPassword()
      Return an unencrypted password.
      Returns:
      string
    • getEndpoint

      public EndpointProperties getEndpoint()
      Returns a copy of the properties for this connection's endpoint. Null means no endpoint information available.
      Returns:
      endpoint for the connection
    • getConfigurationProperties

      public Map<String,Object> getConfigurationProperties()
      Return a copy of the configuration properties. Null means no properties are available.
      Returns:
      configuration properties for the underlying technology
    • getSecuredProperties

      public Map<String,String> getSecuredProperties()
      Return a copy of the secured properties. Null means no secured properties are available. This method is protected so only OCF (or subclasses) can access them. When Connector is passed to calling OMAS, the secured properties are not available.
      Returns:
      secured properties typically user credentials for the connection
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class AssetReferenceable
      Returns:
      print out of variables in a JSON-style
    • equals

      public boolean equals(Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      Overrides:
      equals in class AssetReferenceable
      Parameters:
      objectToCompare - supplied object
      Returns:
      boolean result of comparison
    • hashCode

      public int hashCode()
      Hash of properties
      Overrides:
      hashCode in class AssetReferenceable
      Returns:
      int