Class DataSourceAccessor

java.lang.Object
com.pingidentity.access.DataSourceAccessor

public class DataSourceAccessor extends Object
This class provides access to supported datastore information.

This class may also be used as an alternate way to retrieve a SQL Connection class. It also provides access to LDAP information, and provides access to a configured CustomDataSourceDriver.

See Also:
  • Constructor Details

    • DataSourceAccessor

      public DataSourceAccessor()
      Default constructor
  • Method Details

    • getLdapInfo

      public LdapInfo getLdapInfo(String ldapId)
      Retrieves LDAP lookup information for the specified id.
      Parameters:
      ldapId - The id of the LDAP datastore information to retrieve
      Returns:
      The LdapInfo or null if not found.
    • getConnection

      public Connection getConnection(String jdbcJndiName) throws SQLException, NamingException
      Performs a JNDI lookup on the passed in id, and return a Connection object.
      Parameters:
      jdbcJndiName - The JNDI name to perform the lookup on
      Returns:
      A Connection class for the corresponding JNDI id.
      Throws:
      SQLException
      NamingException
    • getCustomDataSourceDriver

      public CustomDataSourceDriver getCustomDataSourceDriver(String sourceId)
      Retrieves the specified CustomDataSourceDriver associated with a specific CustomDataSource. The Custom data source object contains configuration information that was set during the data source creation. This information is passed to the appropriate CustomDataSourceDriver before being returned.
      Parameters:
      sourceId - The id of the Custom data source object to retrieve.
      Returns:
      A fully configured CustomDataSourceDriver or null if not found.