com.pingidentity.access
Class DataSourceAccessor

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

public class DataSourceAccessor
extends java.lang.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:
LdapInfo

Constructor Summary
DataSourceAccessor()
          Default constructor
 
Method Summary
 java.sql.Connection getConnection(java.lang.String jdbcJndiName)
          Performs a JNDI lookup on the passed in id, and return a Connection object.
 CustomDataSourceDriver getCustomDataSourceDriver(java.lang.String sourceId)
          Retrieves the specified CustomDataSourceDriver associated with a specific CustomDataSource.
 org.sourceid.saml20.domain.datasource.info.LdapInfo getLdapInfo(java.lang.String ldapId)
          Retrieves LDAP lookup information for the specified id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceAccessor

public DataSourceAccessor()
Default constructor

Method Detail

getLdapInfo

public org.sourceid.saml20.domain.datasource.info.LdapInfo getLdapInfo(java.lang.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 java.sql.Connection getConnection(java.lang.String jdbcJndiName)
                                  throws java.sql.SQLException,
                                         javax.naming.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:
java.sql.SQLException
javax.naming.NamingException

getCustomDataSourceDriver

public CustomDataSourceDriver getCustomDataSourceDriver(java.lang.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.


Copyright 2007 Ping Identity Corp. All rights reserved.