Interface DynamicDSGenerator

All Known Implementing Classes:
AuditDSGenerator

public interface DynamicDSGenerator
DynamicDSGenerators 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.
  • Method Details

    • getDataSource

      DataSource getDataSource(String id, DSRequest dsRequest)
      Returns an instance of 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.
      Parameters:
      id - The ID of the DataSource the framework is trying to obtain
      dsRequest - 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
      Returns:
      A DataSource instance