Package com.pingidentity.access
Class DataSourceAccessor
java.lang.Object
com.pingidentity.access.DataSourceAccessor
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(String jdbcJndiName) Performs a JNDI lookup on the passed in id, and return a Connection object.getCustomDataSourceDriver(String sourceId) Retrieves the specifiedCustomDataSourceDriverassociated with a specific CustomDataSource.getLdapInfo(String ldapId) Retrieves LDAP lookup information for the specified id.
-
Constructor Details
-
DataSourceAccessor
public DataSourceAccessor()Default constructor
-
-
Method Details
-
getLdapInfo
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
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
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.
-