Class Connection

  • All Implemented Interfaces:
    Serializable

    public class Connection
    extends Referenceable
    Connection is a set of properties that describes an open metadata asset. It is designed to convey the important properties needed to make a security decision.
    See Also:
    Serialized Form
    • Constructor Detail

      • Connection

        public Connection()
        Default constructor
      • Connection

        public Connection​(Connection template)
        Copy/clone constructor. Note, this is a deep copy
        Parameters:
        template - template values for asset summary
    • Method Detail

      • getDisplayName

        public String getDisplayName()
        Returns the stored display name property for the asset. If no display name is available then null is returned.
        Returns:
        String name
      • setDisplayName

        public void setDisplayName​(String displayName)
        Set up the stored display name property for the asset.
        Parameters:
        displayName - String name
      • getDescription

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

        public void setDescription​(String description)
        Set up the stored description property associated with the asset.
        Parameters:
        description - String text
      • getNetworkAddress

        public String getNetworkAddress()
        Return the endpoint that this connection points to.
        Returns:
        string - typically url
      • setNetworkAddress

        public void setNetworkAddress​(String networkAddress)
        Set up the endpoint that this connection points to.
        Parameters:
        networkAddress - string - typically url
      • getUserId

        public String getUserId()
        Return the userId to use on this connection.
        Returns:
        string
      • setUserId

        public void setUserId​(String userId)
        Set up the the userId to use on this connection.
        Parameters:
        userId - string
      • getEncryptedPassword

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

        public void setEncryptedPassword​(String encryptedPassword)
        Set up an encrypted password.
        Parameters:
        encryptedPassword - string
      • getClearPassword

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

        public void setClearPassword​(String clearPassword)
        Set up an unencrypted password.
        Parameters:
        clearPassword - string
      • setConfigurationProperties

        public void setConfigurationProperties​(Map<String,​Object> configurationProperties)
        Set up the configuration properties for this Connection.
        Parameters:
        configurationProperties - properties that contain additional configuration information for the connector.
      • getConfigurationProperties

        public Map<String,​Object> getConfigurationProperties()
        Return a copy of the configuration properties. Null means no secured properties are available.
        Returns:
        secured properties typically user credentials for the connection
      • setSecuredProperties

        public void setSecuredProperties​(Map<String,​Object> securedProperties)
        Set up the secured properties for this Connection.
        Parameters:
        securedProperties - properties that contain secret information such as log on information.
      • getSecuredProperties

        public Map<String,​Object> getSecuredProperties()
        Return a copy of the secured properties. Null means no secured properties are available.
        Returns:
        secured properties typically user credentials for the connection
      • toString

        public String toString()
        Standard toString method.
        Overrides:
        toString in class Referenceable
        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 Referenceable
        Parameters:
        objectToCompare - supplied object
        Returns:
        boolean result of comparison
      • hashCode

        public int hashCode()
        Return has code based on properties.
        Overrides:
        hashCode in class Referenceable
        Returns:
        int