Class Connection
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader
org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection
- Direct Known Subclasses:
VirtualConnection
The connection is an object that contains the properties needed to create and initialise a connector to access a
specific data assets.
The properties for a connection 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.
- 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 version information.
- additionalProperties - Any additional properties associated with the connection.
- configurationProperties - properties for configuring the connector.
- 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.
- userId - name or URI or connecting user.
- encryptedPassword - password for the userId - needs decrypting by connector before use.
- clearPassword - password for userId - ready to use.
- connectorType - Properties that describe the connector type for the connector.
- endpoint - Properties that describe the server endpoint where the connector will retrieve the assets.
- assetSummary - short description of the connected asset (if any).
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
additionalProperties, qualifiedName
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
extendedProperties
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
CURRENT_AUDIT_HEADER_VERSION
-
Constructor Summary
ConstructorDescriptionDefault constructor sets the Connection properties to null.Connection
(Connection template) Copy/clone Constructor to return a copy of a connection object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compare the values of the supplied object with those stored in the current object.Return the description of the asset that this connection is linked to - or null if no asset connected, or the asset summary property in the relationship is not set.Return an unencrypted password.Return a copy of the configuration properties.static ElementType
Return the standard type for a connection type.Returns a copy of the properties for this connection's connector type.Returns the stored description property for the connection.Returns the stored display name property for the connection.Return an encrypted password.Returns a copy of the properties for this connection's endpoint.Return a copy of the secured properties.Return the userId to use on this connection.int
hashCode()
Return hash code based on properties.void
setAssetSummary
(String assetSummary) Set up the description of the asset that this connection is linked to - or null if no asset connected, or the asset summary property in the relationship is not set.void
setClearPassword
(String clearPassword) Set up an unencrypted password.void
setConfigurationProperties
(Map<String, Object> configurationProperties) Set up the configuration properties for this Connection.void
setConnectorType
(ConnectorType connectorType) Set up the connector type properties for this Connection.void
setDescription
(String description) Set up description of the element.void
setDisplayName
(String displayName) Set up the display name for UIs and reports.void
setEncryptedPassword
(String encryptedPassword) Set up an encrypted password.void
setEndpoint
(Endpoint endpoint) Set up the endpoint properties for this Connection.void
setSecuredProperties
(Map<String, String> securedProperties) Set up the secured properties for this Connection.void
Set up the userId to use on this connection.toString()
Standard toString method.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable
getAdditionalProperties, getQualifiedName, setAdditionalProperties, setQualifiedName
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
getExtendedProperties, setExtendedProperties
Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader
getClassifications, getGUID, setClassifications, setGUID
Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
getHeaderVersion, getOrigin, getStatus, getType, getVersions, setHeaderVersion, setOrigin, setStatus, setType, setVersions
-
Constructor Details
-
Connection
public Connection()Default constructor sets the Connection properties to null. -
Connection
Copy/clone Constructor to return a copy of a connection object.- Parameters:
template
- Connection to copy
-
-
Method Details
-
getConnectionType
Return the standard type for a connection type.- Returns:
- ElementType object
-
getDisplayName
Returns the stored display name property for the connection. Null means that no displayName is available.- Returns:
- displayName
-
setDisplayName
Set up the display name for UIs and reports.- Parameters:
displayName
- String name
-
setDescription
Set up description of the element.- Parameters:
description
- String
-
getDescription
Returns the stored description property for the connection. If no description is provided then null is returned.- Returns:
- description
-
setConnectorType
Set up the connector type properties for this Connection.- Parameters:
connectorType
- ConnectorType properties object
-
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
Return the userId to use on this connection.- Returns:
- string
-
setUserId
Set up the userId to use on this connection.- Parameters:
userId
- string
-
getEncryptedPassword
Return an encrypted password. The caller is responsible for decrypting it.- Returns:
- string
-
setEncryptedPassword
Set up an encrypted password.- Parameters:
encryptedPassword
- string
-
getClearPassword
Return an unencrypted password.- Returns:
- string
-
setClearPassword
Set up an unencrypted password.- Parameters:
clearPassword
- string
-
setEndpoint
Set up the endpoint properties for this Connection.- Parameters:
endpoint
- Endpoint properties object
-
getEndpoint
Returns a copy of the properties for this connection's endpoint. Null means no endpoint information available.- Returns:
- endpoint for the connection
-
setConfigurationProperties
Set up the configuration properties for this Connection.- Parameters:
configurationProperties
- properties that contain additional configuration information for the connector.
-
getConfigurationProperties
Return a copy of the configuration properties. Null means no configuration properties are available.- Returns:
- configuration properties typically controlling the behaviour for the connector
-
setSecuredProperties
Set up the secured properties for this Connection.- Parameters:
securedProperties
- properties that contain secret information such as log on information.
-
getSecuredProperties
Return a copy of the secured properties. Null means no secured properties are available.- Returns:
- secured properties typically user credentials for the connection
-
getAssetSummary
Return the description of the asset that this connection is linked to - or null if no asset connected, or the asset summary property in the relationship is not set.- Returns:
- string description
-
setAssetSummary
Set up the description of the asset that this connection is linked to - or null if no asset connected, or the asset summary property in the relationship is not set.- Parameters:
assetSummary
- string description
-
toString
Standard toString method. Note SecuredProperties and other credential type properties are not displayed. This is deliberate because there is no knowing where the string will be printed.- Overrides:
toString
in classReferenceable
- Returns:
- print out of variables in a JSON-style
-
equals
Compare the values of the supplied object with those stored in the current object.- Overrides:
equals
in classReferenceable
- Parameters:
objectToCompare
- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()Return hash code based on properties.- Overrides:
hashCode
in classReferenceable
- Returns:
- int
-