Package com.pingidentity.access
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
Connectionclass. It also provides access to LDAP information, and provides access to a configuredCustomDataSourceDriver.- See Also:
LdapInfo
-
-
Constructor Summary
Constructors Constructor Description DataSourceAccessor()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection(String jdbcJndiName)Performs a JNDI lookup on the passed in id, and return a Connection object.CustomDataSourceDrivergetCustomDataSourceDriver(String sourceId)Retrieves the specifiedCustomDataSourceDriverassociated with a specific CustomDataSource.LdapInfogetLdapInfo(String ldapId)Retrieves LDAP lookup information for the specified id.
-
-
-
Method Detail
-
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
LdapInfoor 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
Connectionclass for the corresponding JNDI id. - Throws:
SQLExceptionNamingException
-
getCustomDataSourceDriver
public CustomDataSourceDriver getCustomDataSourceDriver(String sourceId)
Retrieves the specifiedCustomDataSourceDriverassociated 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 appropriateCustomDataSourceDriverbefore being returned.- Parameters:
sourceId- The id of the Custom data source object to retrieve.- Returns:
- A fully configured
CustomDataSourceDriveror null if not found.
-
-