org.eclipse.datatools.connectivity.oda.consumer.services
Interface IPropertyProvider


public interface IPropertyProvider

The interface of the provider of run-time data source properties. An ODA consumer application that implements the org.eclipse.datatools.connectivity.oda.consumer.propertyProvider extension point must provide a concrete class implementation of this interface.


Field Summary
static java.lang.String APP_RUNTIME_LOCALE_KEY
          The key for an application runtime ULocale instance in a consumer application context map.
static java.lang.String ODA_CONN_PROP_CONTEXT
           
static java.lang.String ODA_CONSUMER_ID
           
static java.lang.String ODA_RELOAD_PROFILE_STORE
          The pre-defined key in an application context Map to specify the profile loading behavior of an IPropertyProvider implementation that supports it.
static java.lang.String sm_packageName
           
 
Method Summary
 java.util.Properties getDataSourceProperties(java.util.Properties candidateProperties, java.lang.Object appContext)
          Provides the effective property values to use at runtime to open a connection to a data source.
 

Field Detail

sm_packageName

static final java.lang.String sm_packageName

ODA_CONSUMER_ID

static final java.lang.String ODA_CONSUMER_ID
See Also:
Constant Field Values

ODA_CONN_PROP_CONTEXT

static final java.lang.String ODA_CONN_PROP_CONTEXT
See Also:
Constant Field Values

APP_RUNTIME_LOCALE_KEY

static final java.lang.String APP_RUNTIME_LOCALE_KEY
The key for an application runtime ULocale instance in a consumer application context map.

Since:
3.2.2 (DTP 1.7.2)
See Also:
Constant Field Values

ODA_RELOAD_PROFILE_STORE

static final java.lang.String ODA_RELOAD_PROFILE_STORE
The pre-defined key in an application context Map to specify the profile loading behavior of an IPropertyProvider implementation that supports it.
A Boolean.TRUE value mapped to the key indicates to always reload and get the current content of an external profile store; a Boolean.FALSE value indicates to reuse the profile properties previously loaded, if available.

Since:
3.2.3 (DTP 1.8)
See Also:
org.eclipse.datatools.connectivity.oda.consumer.services.impl.ProviderUtil#setReloadProfileStoreContextValue(Map,Boolean)}
Method Detail

getDataSourceProperties

java.util.Properties getDataSourceProperties(java.util.Properties candidateProperties,
                                             java.lang.Object appContext)
                                             throws OdaException
Provides the effective property values to use at runtime to open a connection to a data source.

Parameters:
candidateProperties - the set of candidate property name-value pairs specified by an ODA consumer application in its call to an ODA driver's IConnection.open method. It may contain a configuration id or key specific to the consumer application to uniquely identify a set of externalized property values. Such use is entirely implementation dependent.
appContext - the application context value provided by an ODA consumer application in its call to an ODA driver's IDriver.setAppContext method, associated with the ODA_CONN_PROP_CONTEXT key.
The provider may use this application-specific context to assist in its lookup and processing of its externalized configuration framework. May be null.
Returns:
the set of effective property name-value pairs to use
Throws:
OdaException - if provider error occurs