org.outerj.xreporter.datasource
Class DataSourceManagerImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.outerj.xreporter.datasource.DataSourceManagerImpl
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, DataSourceManager, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.thread.ThreadSafe
- public class DataSourceManagerImpl
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements DataSourceManager, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.component.Composable
Implementation of DataSourceManager. During initialisation, this class will read the data source
definitions from two XML files. See XReporter's documentation for a description of the format of this file.
Method Summary |
void |
compose(org.apache.avalon.framework.component.ComponentManager componentManager)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
void |
generateCatalog(org.xml.sax.ContentHandler contentHandler,
User user,
ResourceHandle resourceHandle)
Generates a list of datasources. |
DataSource |
getDataSource(java.lang.String dataSourceId)
Get the datasource with the specified id. |
void |
initialize()
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
configFileLocation
protected java.lang.String configFileLocation
dataSourcesById
protected java.util.HashMap dataSourcesById
componentManager
protected org.apache.avalon.framework.component.ComponentManager componentManager
authoristionManager
protected AuthorisationManager authoristionManager
TIME_EL
protected static final java.lang.String TIME_EL
- See Also:
- Constant Field Values
DATASOURCE_NAME_EL
protected static final java.lang.String DATASOURCE_NAME_EL
- See Also:
- Constant Field Values
INFO_EL
protected static final java.lang.String INFO_EL
- See Also:
- Constant Field Values
DataSourceManagerImpl
public DataSourceManagerImpl()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure
in interface org.apache.avalon.framework.configuration.Configurable
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
compose
public void compose(org.apache.avalon.framework.component.ComponentManager componentManager)
throws org.apache.avalon.framework.component.ComponentException
- Specified by:
compose
in interface org.apache.avalon.framework.component.Composable
- Throws:
org.apache.avalon.framework.component.ComponentException
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
- Throws:
java.lang.Exception
getDataSource
public DataSource getDataSource(java.lang.String dataSourceId)
throws UnknownDataSourceIdException
- Description copied from interface:
DataSourceManager
- Get the datasource with the specified id.
- Specified by:
getDataSource
in interface DataSourceManager
- Throws:
UnknownDataSourceIdException
generateCatalog
public void generateCatalog(org.xml.sax.ContentHandler contentHandler,
User user,
ResourceHandle resourceHandle)
throws org.xml.sax.SAXException,
AuthorisationException
- Description copied from interface:
DataSourceManager
- Generates a list of datasources. The list will only contain data sources to which
access is allowed (determined by the
AuthorisationManager
).
The items will be sorted according to the sortcodes of the data source. Name and description of the
datasources will be translated in the user language.
- Specified by:
generateCatalog
in interface DataSourceManager
- Throws:
org.xml.sax.SAXException
AuthorisationException