java.lang.Object
org.sourceid.saml20.domain.datasource.info.LdapInfo
All Implemented Interfaces:
Serializable, Cloneable

public class LdapInfo extends Object implements Cloneable, Serializable
This class provides an independent wrapper of the LDAP information that was entered by the PingFederate user.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The Ldap Tag Object.
    static enum 
    Supported LDAP types by PingFederate
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Provides a clone of the information stored in the LdapInfo class.
    Retrieves the specified authentication method.
    Retrieves a list of LDAP binary attributes for this datastore.
    Retrieves the alias of the client TLS certificate to use.
    int
    Retrieves the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.
    Retrieves The credentials for this LDAP datastore.
    int
    Retrieves the maximum length of time in milliseconds that previously-retrieved DNS information should be cached before it needs to be refreshed.
    Retrieves the hostname.
    Retrieves The PingFederate id that was generated for the corresponding LDAP connection information.
    Retrieves the prefix used to query LDAP DNS Service Records.
    Retrieves the prefix used to query LDAPs DNS Service Records.
    List<org.sourceid.saml20.domain.datasource.tag.LdapTagConfig>
    Retrieves the List of supported tags for this datastore.
    Retrieves the List of supported tags for this datastore.
    Retrieves the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).
    Retrieves the type of this LDAP datastore.
    int
    Retrieves the maximum number of connections that should be maintained in the pool.
    int
    Retrieves the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.
    int
    Retrieves the number of connections to initially establish when the pool is created.
    Retrieves the name of this LDAP datastore.
     
     
     
    Retrieves the principal to use.
    int
    Retrieves the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.
    Creates a url based on the information contained in this class.
    Creates a url based on the information contained in this class, but uses the provided host names instead of the ones in this class.
    int
    Retrieves the length of time in milliseconds between periodic background health checks against the available connections in this pool.
    boolean
    Indicates whether the connection pool should create a new connection if one is requested when there are none available.
    boolean
    Indicates if retries are enabled.
    boolean
    Indicates that test-on-borrow is enabled or not.
    boolean
    Indicates that test-on-return is enabled or not.
    boolean
    Indicates whether to use DNS Service Records to connect to this LDAP datastore.
    boolean
    Indicates whether associated connections should attempt to follow any referrals that they encounter.
    boolean
    Returns true if the useSSL flag is set.
    boolean
    Indicates whether StartTLS will be used.
    boolean
    Indicates whether to verify the hostname during an SSL connection creation or not.
    void
    setAuthenticationMethod(String authenticationMethod)
    Specifies the authentication method.
    void
    setBinaryAttributes(List<String> binaryAttributes)
    Specifies a list of LDAP binary attributes for this datastore.
    void
    setClientTlsCertificate(String clientTlsCertificate)
    Specifies the client TLS certificate.
    void
    setConnTimeoutMillis(int connTimeoutMillis)
    Specifies the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.
    void
    setCreateIfNecessary(boolean createIfNecessary)
    Specifies whether the connection pool should create a new connection if one is requested when there are none available.
    void
    setCredentials(String credentials)
    Specifies the credentials for this class.
    void
    setDnsTtlMillis(int dnsTtlMillis)
    Specifies the maximum length of time in milliseconds that DNS information should be cached before it needs to be retrieved again.
    void
    Specifies the host name.
    void
    Specifies the LDAP id.
    void
    setLdapDnsSrvPrefix(String ldapDnsSrvPrefix)
    Specifies the prefix used to query LDAP DNS Service Records.
    void
    setLdapsDnsSrvPrefix(String ldapsDnsSrvPrefix)
    Specifies the prefix used to query LDAPs DNS Service Records.
    void
    setLdapTagConfigList(List<org.sourceid.saml20.domain.datasource.tag.LdapTagConfig> ldapTagConfigList)
    Specifies the List of supported tags for this datastore.
    void
    Specifies the List of supported tags for this datastore.
    void
    Specifies the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).
    void
    setLdapTypeDesc(String ldapTypeDesc)
    Specifies the type of this LDAP datastore,
    void
    setMax(int max)
    Specifies the maximum number of connections that should be maintained in the pool.
    void
    setMaxWait(int maxWait)
    Specifies the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.
    void
    setMin(int min)
    Specifies the number of connections to initially establish when the pool is created.
    void
    Specifies the name of this LDAP datastore.
    void
    setPingOneConnection(String pingOneConnection)
     
    void
    setPingOneEnvironment(String pingOneEnvironment)
     
    void
    setPingOneGateway(String pingOneGateway)
     
    void
    setPrincipal(String principal)
    Specifies the principal to use.
    void
    setReadTimeoutMillis(int readTimeoutMillis)
    Specifies the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.
    void
    setRetryFailedOperations(boolean retryFailedOperations)
    Enable/disable retries.
    void
    setTestOnBorrow(boolean testOnBorrow)
    Specifies the status of test-on-borrow.
    void
    setTestOnReturn(boolean testOnReturn)
    Specifies the status of test-on-return.
    void
    setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis)
    Specifies the length of time in milliseconds between periodic background health checks against the available connections in this pool.
    void
    setUseDnsSrvRecords(boolean useDnsSrvRecords)
    Specifies to use DNS Service Records to connect to the LDAP datastore or not.
    void
    setUseLdapReferral(boolean useLdapReferral)
    Specifies whether associated connections should attempt to follow any referrals that they encounter, using the referral connector for the associated connection.
    void
    setUseSSL(boolean useSSL)
    Specifies the useSSL flag.
    void
    setUseStartTLS(boolean useStartTLS)
    Specifies the useStartTLS flag.
    void
    setVerifyHost(boolean verifyHost)
    Specifies to verify the hostname or not during an SSL connection connection.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LdapInfo

      public LdapInfo()
      Default constructor.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public LdapInfo clone()
      Provides a clone of the information stored in the LdapInfo class.
      Returns:
      a new LdapInfo with the same information
    • getServerUrl

      public String getServerUrl()
      Creates a url based on the information contained in this class. It is created in the format: ldap://hostname or ldaps://hostname depending on the UseSSL flag. If multiple hosts name are used, space separated, then each will have the protocol prepended.
      Returns:
      A url suitable to use for connection to an LDAP datastore.
    • getServerUrl

      public String getServerUrl(String hosts)
      Creates a url based on the information contained in this class, but uses the provided host names instead of the ones in this class. It is created in the format: ldap://hostname or ldaps://hostname depending on the UseSSL flag. If multiple hosts name are used, space separated, then each will have the protocol prepended.
      Parameters:
      hosts - The String containing the host names
      Returns:
      A url suitable to use for connection to an LDAP datastore.
    • getAuthenticationMethod

      public String getAuthenticationMethod()
      Retrieves the specified authentication method. Should be one of: none, simple, clientTlsCert
      Returns:
      the authentication method.
      See Also:
    • setAuthenticationMethod

      public void setAuthenticationMethod(String authenticationMethod)
      Specifies the authentication method.

      Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.

      Parameters:
      authenticationMethod - The desired authentication method. Should be one of: none, simple.
      See Also:
    • getCredentials

      public String getCredentials()
      Retrieves The credentials for this LDAP datastore.
      Returns:
      The credentials for this LDAP
      See Also:
    • setCredentials

      public void setCredentials(String credentials)
      Specifies the credentials for this class.

      Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.

      Parameters:
      credentials - The credentials for this LDAP datastore.
      See Also:
    • getClientTlsCertificate

      public String getClientTlsCertificate()
      Retrieves the alias of the client TLS certificate to use.
      Returns:
      The certificate alias.
    • setClientTlsCertificate

      public void setClientTlsCertificate(String clientTlsCertificate)
      Specifies the client TLS certificate. The certificate must exist in the PingFederate Trust Store.
      Parameters:
      clientTlsCertificate - The alias of the certificate to use.
    • getHost

      public String getHost()
      Retrieves the hostname. It can be a space separated list of hostnames. Used by getServerUrl().
      Returns:
      The hostname. It can be a space separated list of host names.
    • setHost

      public void setHost(String host)
      Specifies the host name. A list of space separated hostnames can be used.

      Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.

      Parameters:
      host - The hostname to use. A list of space separated host names can be used.
    • getPrincipal

      public String getPrincipal()
      Retrieves the principal to use.
      Returns:
      The principal information to use.
      See Also:
    • setPrincipal

      public void setPrincipal(String principal)
      Specifies the principal to use.

      Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.

      Parameters:
      principal - security principal to set.
      See Also:
    • isUseSSL

      public boolean isUseSSL()
      Returns true if the useSSL flag is set. This flag is used by getServerUrl() to determine whether to use ldap://hostname or ldaps://hostname.
      Returns:
      true to use SSL.
    • setUseSSL

      public void setUseSSL(boolean useSSL)
      Specifies the useSSL flag. If true, getServerUrl() returns ldaps://hostname. If false, getServerUrl() returns ldap://hostname.

      Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.

      Parameters:
      useSSL - The value to set for the useSSL flag.
    • getId

      public String getId()
      Retrieves The PingFederate id that was generated for the corresponding LDAP connection information.
      Returns:
      the LDAP datastore information id.
    • setId

      public void setId(String id)
      Specifies the LDAP id. Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.
      Parameters:
      id - The value to set.
    • getName

      public String getName()
      Retrieves the name of this LDAP datastore.
      Returns:
      the name of this LDAP datastore
    • setName

      public void setName(String name)
      Specifies the name of this LDAP datastore.
      Parameters:
      name - the LDAP datastore name
    • getLdapType

      public LdapInfo.LdapType getLdapType()
      Retrieves the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).
      Returns:
      the LDAP type
    • setLdapType

      public void setLdapType(LdapInfo.LdapType ldapType)
      Specifies the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).
      Parameters:
      ldapType - the LDAP type to set.
    • getLdapTypeDesc

      public String getLdapTypeDesc()
      Retrieves the type of this LDAP datastore.
      Returns:
      the type of this LDAP datasotre
      See Also:
    • setLdapTypeDesc

      public void setLdapTypeDesc(String ldapTypeDesc)
      Specifies the type of this LDAP datastore,
      Parameters:
      ldapTypeDesc - the LDAP data store type value
      See Also:
    • isTestOnBorrow

      public boolean isTestOnBorrow()
      Indicates that test-on-borrow is enabled or not.
      Returns:
      true if test-on-borrow is enabled, false otherwise
    • setTestOnBorrow

      public void setTestOnBorrow(boolean testOnBorrow)
      Specifies the status of test-on-borrow.
      Parameters:
      testOnBorrow - the test-on-borrow status
    • isTestOnReturn

      public boolean isTestOnReturn()
      Indicates that test-on-return is enabled or not.
      Returns:
      true if test-on-return is enabled, false otherwise
    • setTestOnReturn

      public void setTestOnReturn(boolean testOnReturn)
      Specifies the status of test-on-return.
      Parameters:
      testOnReturn - the test-on-return status
    • isCreateIfNecessary

      public boolean isCreateIfNecessary()
      Indicates whether the connection pool should create a new connection if one is requested when there are none available.
      Returns:
      true if a new connection should be created if none are available when a request is received, otherwise false
    • setCreateIfNecessary

      public void setCreateIfNecessary(boolean createIfNecessary)
      Specifies whether the connection pool should create a new connection if one is requested when there are none available.
      Parameters:
      createIfNecessary - Specifies whether the connection pool should create a new connection if one is requested when there are none available.
    • isRetryFailedOperations

      public boolean isRetryFailedOperations()
      Indicates if retries are enabled.
      Returns:
      whether retries are enabled
    • setRetryFailedOperations

      public void setRetryFailedOperations(boolean retryFailedOperations)
      Enable/disable retries.
      Parameters:
      retryFailedOperations - whether or not to enable retries
    • getMin

      public int getMin()
      Retrieves the number of connections to initially establish when the pool is created. It must be greater than or equal to one.
      Returns:
      the initial connections established in the connection pool
    • setMin

      public void setMin(int min)
      Specifies the number of connections to initially establish when the pool is created. It must be greater than or equal to one.
      Parameters:
      min - the initial connections established in the connection pool
    • getMax

      public int getMax()
      Retrieves the maximum number of connections that should be maintained in the pool.
      Returns:
      the maximum number of connections that should be maintained in the pool.
    • setMax

      public void setMax(int max)
      Specifies the maximum number of connections that should be maintained in the pool. It must be greater than or equal to the initial number of connections.
      Parameters:
      max - the maximum number of connections that should be maintained in the pool.
    • getMaxWait

      public int getMaxWait()
      Retrieves the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.
      Returns:
      The maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool, or zero to indicate that the pool should not block at all if no connections are available and that it should either create a new connection or throw an exception.
    • setMaxWait

      public void setMaxWait(int maxWait)
      Specifies the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.
      Parameters:
      maxWait - The maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool. A value of zero should be used to indicate that the pool should not block at all if no connections are available and that it should either create a new connection or throw an exception
    • getTimeBetweenEvictionRunsMillis

      public int getTimeBetweenEvictionRunsMillis()
      Retrieves the length of time in milliseconds between periodic background health checks against the available connections in this pool.
      Returns:
      The length of time in milliseconds between the periodic background health checks against the available connections in this pool.
    • setTimeBetweenEvictionRunsMillis

      public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis)
      Specifies the length of time in milliseconds between periodic background health checks against the available connections in this pool.
      Parameters:
      timeBetweenEvictionRunsMillis - The length of time in milliseconds between periodic background health checks against the available connections in this pool. The provided value must be greater than zero.
    • getBinaryAttributes

      public List<String> getBinaryAttributes()
      Retrieves a list of LDAP binary attributes for this datastore.
      Returns:
      a list of LDAP binary attributes
    • setBinaryAttributes

      public void setBinaryAttributes(List<String> binaryAttributes)
      Specifies a list of LDAP binary attributes for this datastore.
      Parameters:
      binaryAttributes - list of LDAP binary attributes
    • getReadTimeoutMillis

      public int getReadTimeoutMillis()
      Retrieves the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.
      Returns:
      The maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server, or zero if there should not be any default timeout.
    • setReadTimeoutMillis

      public void setReadTimeoutMillis(int readTimeoutMillis)
      Specifies the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server. A value of zero indicates that there should be no timeout.
      Parameters:
      readTimeoutMillis - The maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.
    • getConnTimeoutMillis

      public int getConnTimeoutMillis()
      Retrieves the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.
      Returns:
      The maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up, or zero to indicate that there should be no connect timeout.
    • setConnTimeoutMillis

      public void setConnTimeoutMillis(int connTimeoutMillis)
      Specifies the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up. A value of zero indicates that there should be no connect timeout.
      Parameters:
      connTimeoutMillis - The maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.
    • isVerifyHost

      public boolean isVerifyHost()
      Indicates whether to verify the hostname during an SSL connection creation or not.
      Returns:
      true if the hostname should be verified, false otherwise
    • setVerifyHost

      public void setVerifyHost(boolean verifyHost)
      Specifies to verify the hostname or not during an SSL connection connection.
      Parameters:
      verifyHost - true to verify the hostname, false otherwise
    • isUseDnsSrvRecords

      public boolean isUseDnsSrvRecords()
      Indicates whether to use DNS Service Records to connect to this LDAP datastore.
      Returns:
      true if DNS Service Records should be used, false otherwise
    • setUseDnsSrvRecords

      public void setUseDnsSrvRecords(boolean useDnsSrvRecords)
      Specifies to use DNS Service Records to connect to the LDAP datastore or not.
      Parameters:
      useDnsSrvRecords - true if DNS Service Records should be used, false otherwise
    • isUseLdapReferral

      public boolean isUseLdapReferral()
      Indicates whether associated connections should attempt to follow any referrals that they encounter.
      Returns:
      true if associated connections should attempt to follow any referrals that they encounter, or false if not.
    • setUseLdapReferral

      public void setUseLdapReferral(boolean useLdapReferral)
      Specifies whether associated connections should attempt to follow any referrals that they encounter, using the referral connector for the associated connection.
      Parameters:
      useLdapReferral - Specifies whether associated connections should attempt to follow any referrals that they encounter.
    • getDnsTtlMillis

      public int getDnsTtlMillis()
      Retrieves the maximum length of time in milliseconds that previously-retrieved DNS information should be cached before it needs to be refreshed.
      Returns:
      The maximum length of time in milliseconds that previously-retrieved DNS information should be cached before it needs to be refreshed.
    • setDnsTtlMillis

      public void setDnsTtlMillis(int dnsTtlMillis)
      Specifies the maximum length of time in milliseconds that DNS information should be cached before it needs to be retrieved again. A value less than or equal to zero will use the default TTL of one hour.
      Parameters:
      dnsTtlMillis - the maximum length of time in milliseconds that DNS information should be cached before it needs to be retrieved again.
    • getLdapDnsSrvPrefix

      public String getLdapDnsSrvPrefix()
      Retrieves the prefix used to query LDAP DNS Service Records.
      Returns:
      the prefix used to query LDAP DNS Service Records
    • setLdapDnsSrvPrefix

      public void setLdapDnsSrvPrefix(String ldapDnsSrvPrefix)
      Specifies the prefix used to query LDAP DNS Service Records. This prefix would be used when isUseSSL() is false.
      Parameters:
      ldapDnsSrvPrefix - the prefix used to query LDAP DNS Service Records
    • getLdapsDnsSrvPrefix

      public String getLdapsDnsSrvPrefix()
      Retrieves the prefix used to query LDAPs DNS Service Records.
      Returns:
      the prefix used to query LDAPs DNS Service Records
    • setLdapsDnsSrvPrefix

      public void setLdapsDnsSrvPrefix(String ldapsDnsSrvPrefix)
      Specifies the prefix used to query LDAPs DNS Service Records. This prefix would be used when isUseSSL() is true.
      Parameters:
      ldapsDnsSrvPrefix - the prefix used to query LDAPs DNS Service Records
    • getPingOneConnection

      public String getPingOneConnection()
    • setPingOneConnection

      public void setPingOneConnection(String pingOneConnection)
    • getPingOneEnvironment

      public String getPingOneEnvironment()
    • setPingOneEnvironment

      public void setPingOneEnvironment(String pingOneEnvironment)
    • getPingOneGateway

      public String getPingOneGateway()
    • setPingOneGateway

      public void setPingOneGateway(String pingOneGateway)
    • getLdapTagConfigList

      public List<org.sourceid.saml20.domain.datasource.tag.LdapTagConfig> getLdapTagConfigList()
      Retrieves the List of supported tags for this datastore.

      NOTE: Use getLdapTags() instead of this Method. This method should only be used By PingFederate internally.

      Returns:
      the List of supported tags
    • setLdapTagConfigList

      public void setLdapTagConfigList(List<org.sourceid.saml20.domain.datasource.tag.LdapTagConfig> ldapTagConfigList)
      Specifies the List of supported tags for this datastore.

      NOTE: Use setLdapTags(List) instead of this Method. This method should only be used By PingFederate internally.

      Parameters:
      ldapTagConfigList - the List of supported tags
    • getLdapTags

      public List<LdapInfo.LdapTag> getLdapTags()
      Retrieves the List of supported tags for this datastore.
      Returns:
      the List of supported tags
      Since:
      10.3
    • setLdapTags

      public void setLdapTags(List<LdapInfo.LdapTag> ldapTags)
      Specifies the List of supported tags for this datastore.
      Parameters:
      ldapTags - the List of supported tags
      Since:
      10.3
    • isUseStartTLS

      public boolean isUseStartTLS()
      Indicates whether StartTLS will be used.
      Returns:
      true to use StartTLS.
      Since:
      12.1
    • setUseStartTLS

      public void setUseStartTLS(boolean useStartTLS)
      Specifies the useStartTLS flag.
      Parameters:
      useStartTLS - The value to set for the useStartTLS flag.
      Since:
      12.1