public interface DynamicDSGenerator
DynamicDSGenerator
s can be registered with the SmartClient Server framework via the DataSource.addDynamicDSGenerator(DynamicDSGenerator)
method. The framework will call the getDataSource
method of registered DynamicDSGenerators
whenever it needs to obtain a DataSource, giving user code a means of generating DataSource definitions at runtime, rather than (or as well as) providing them as .ds.xml
files in the filesystem.Modifier and Type | Method and Description |
---|---|
DataSource | getDataSource(java.lang.String id, DSRequest dsRequest) Returns an instance of DataSource . |
DataSource getDataSource(java.lang.String id, DSRequest dsRequest)
DataSource
. If you do not wish to provide an instance for the given ID, return null
and the system will go through its normal process for loading a DataSource. Please see the docs for DataSource.addDynamicDSGenerator(DynamicDSGenerator)
for an important warning about this. NOTE: Please scan the client-side documentation for "serverDataSourceImplementation" for a discussion of caching and thread-safety issues with server-side DataSources.id
- The ID of the DataSource the framework is trying to obtaindsRequest
- The DSRequest
for which the framework is trying to obtain a DataSource. This will be null if the DataSource is not needed in the context of a DSRequest