|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.outerj.xreporter.report.ReportManagerImpl
Implementation of ReportManager
.
Field Summary | |
protected AuthorisationManager |
authorisationManager
|
protected org.apache.avalon.framework.component.ComponentManager |
componentManager
|
protected static java.lang.String |
DATASOURCE_NAME_EL
|
protected DataSourceManager |
dataSourceManager
|
protected java.lang.ClassLoader |
extensionsClassLoader
ClassLoader used for user extensions, currenlty custom "execute steps". |
protected IdGenerator |
idGenerator
|
protected static java.lang.String |
INFO_EL
|
protected org.outerj.xreporter.report.ReportManagerImpl.ManagementThread |
managementThread
|
protected int |
managementThreadIntervalMs
Time in between runs of the management thread that cleans up expired report instances |
protected static java.lang.String |
REPORT
|
protected java.lang.String |
REPORTCATALOG_EL
|
protected java.util.Map |
reportDefinitionFiles
Map containing an absolute filename as the key and a ReportDefinitionFile
file object as the value. |
protected java.util.Map |
reportDefinitionsById
|
protected java.io.File |
reportDirectory
|
protected int |
reportExpirationTimeMs
|
protected org.apache.commons.collections.FastHashMap |
reportInstancesById
|
protected static java.lang.String |
REPORTS
|
protected java.lang.String |
resultSetNavigationStrategy
|
protected Catalog |
rootCatalog
|
protected org.outerj.xreporter.report.ReportManagerImpl.ScanReportDirectoryThread |
scanReportDirectoryThread
|
protected int |
scanReportDirectoryThreadIntervalMs
|
protected static java.lang.String |
TIME_EL
|
Fields inherited from interface org.outerj.xreporter.report.ReportManager |
ROLE |
Constructor Summary | |
ReportManagerImpl()
|
Method Summary | |
void |
compose(org.apache.avalon.framework.component.ComponentManager componentManager)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
Report |
createInstance(java.lang.String reportDefinitionId,
java.lang.String dataSourceId,
User user,
ResourceHandle resourceHandle)
Create a new report instance. |
protected boolean |
destroyReport(User user,
ReportImpl report)
|
boolean |
destroyReport(User user,
java.lang.String reportInstanceId)
Deletes all trace of the given report by calling its dispose method and removing its handle from the list of current instances. |
void |
generateCatalog(org.xml.sax.ContentHandler contentHandler,
User user,
java.lang.String dataSourceId,
ResourceHandle resourceHandle)
Generates a catalog of available report definitions. |
void |
generateReportInstanceList(org.xml.sax.ContentHandler contentHandler)
Generates a list of all report instances. |
Report |
getReport(java.lang.String reportInstanceId,
User user)
Gets an existing report instance. |
ReportDefinition |
getReportDefinition(java.lang.String reportDefinitionId,
User user)
|
void |
initialize()
|
protected void |
logReportCreatedEvent(java.lang.String user,
java.lang.String customer,
long time,
java.lang.String reportId,
java.lang.String reportDefinitionId,
java.lang.String dataSourceId)
|
void |
setListener(java.lang.String name,
java.net.InetSocketAddress listener,
boolean discloseHostName,
boolean disclosePortNumber)
Specify information about the environment this instance is listening on. |
void |
start()
|
void |
stop()
|
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 |
Field Detail |
protected java.io.File reportDirectory
protected java.util.Map reportDefinitionsById
protected java.util.Map reportDefinitionFiles
ReportDefinitionFile
file object as the value. This map will contain an entry for every ".xml" file in
the report definition directory, regardless of whether a report definition could
actually be built from it.
protected org.apache.commons.collections.FastHashMap reportInstancesById
protected IdGenerator idGenerator
protected DataSourceManager dataSourceManager
protected AuthorisationManager authorisationManager
protected org.apache.avalon.framework.component.ComponentManager componentManager
protected Catalog rootCatalog
protected java.lang.ClassLoader extensionsClassLoader
protected int managementThreadIntervalMs
protected org.outerj.xreporter.report.ReportManagerImpl.ManagementThread managementThread
protected int reportExpirationTimeMs
protected org.outerj.xreporter.report.ReportManagerImpl.ScanReportDirectoryThread scanReportDirectoryThread
protected int scanReportDirectoryThreadIntervalMs
protected java.lang.String resultSetNavigationStrategy
protected final java.lang.String REPORTCATALOG_EL
protected static final java.lang.String TIME_EL
protected static final java.lang.String DATASOURCE_NAME_EL
protected static final java.lang.String INFO_EL
protected static final java.lang.String REPORTS
protected static final java.lang.String REPORT
Constructor Detail |
public ReportManagerImpl()
Method Detail |
public void setListener(java.lang.String name, java.net.InetSocketAddress listener, boolean discloseHostName, boolean disclosePortNumber)
ReportManager
setListener
in interface ReportManager
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
public void compose(org.apache.avalon.framework.component.ComponentManager componentManager) throws org.apache.avalon.framework.component.ComponentException
compose
in interface org.apache.avalon.framework.component.Composable
org.apache.avalon.framework.component.ComponentException
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
public Report createInstance(java.lang.String reportDefinitionId, java.lang.String dataSourceId, User user, ResourceHandle resourceHandle) throws UnknownReportDefintionIdException, UnknownDataSourceIdException, java.lang.Exception
ReportManager
This method will also check that the user has the rights to use the report and datasource.
createInstance
in interface ReportManager
UnknownReportDefintionIdException
UnknownDataSourceIdException
java.lang.Exception
ReportManager.createInstance(java.lang.String, java.lang.String, org.outerj.xreporter.user.User, org.outerj.xreporter.resource.ResourceHandle)
protected void logReportCreatedEvent(java.lang.String user, java.lang.String customer, long time, java.lang.String reportId, java.lang.String reportDefinitionId, java.lang.String dataSourceId)
public Report getReport(java.lang.String reportInstanceId, User user) throws UnknownReportId, ReportInUseException, DataSourceAccessDeniedException, ReportAccessDeniedException, UnknownDataSourceIdException, AuthorisationException
ReportManager
This method will also check that the user has the rights to use the report and associated datasource.
getReport
in interface ReportManager
UnknownReportId
ReportInUseException
DataSourceAccessDeniedException
ReportAccessDeniedException
UnknownDataSourceIdException
AuthorisationException
ReportManager.getReport(java.lang.String, org.outerj.xreporter.user.User)
public ReportDefinition getReportDefinition(java.lang.String reportDefinitionId, User user) throws UnknownReportDefintionIdException, ReportAccessDeniedException, ReportDefinitionViewingNotAllowedException, AuthorisationException
getReportDefinition
in interface ReportManager
UnknownReportDefintionIdException
ReportAccessDeniedException
ReportDefinitionViewingNotAllowedException
AuthorisationException
public void generateCatalog(org.xml.sax.ContentHandler contentHandler, User user, java.lang.String dataSourceId, ResourceHandle resourceHandle) throws org.xml.sax.SAXException, UnknownDataSourceIdException, DataSourceAccessDeniedException, AuthorisationException
ReportManager
AuthorisationManager
),
and with which the datasource is compatible. Additionaly, an
exception will be thrown when the user has no access to the data source (also controlled by the AuthorisationManager).
generateCatalog
in interface ReportManager
org.xml.sax.SAXException
UnknownDataSourceIdException
DataSourceAccessDeniedException
AuthorisationException
ReportManager.generateCatalog(org.xml.sax.ContentHandler, org.outerj.xreporter.user.User, java.lang.String, org.outerj.xreporter.resource.ResourceHandle)
public void start() throws java.lang.Exception
start
in interface org.apache.avalon.framework.activity.Startable
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface org.apache.avalon.framework.activity.Startable
java.lang.Exception
public void generateReportInstanceList(org.xml.sax.ContentHandler contentHandler) throws org.xml.sax.SAXException
ReportManager
generateReportInstanceList
in interface ReportManager
org.xml.sax.SAXException
ReportManager.generateReportInstanceList(org.xml.sax.ContentHandler)
public boolean destroyReport(User user, java.lang.String reportInstanceId) throws UnknownReportId
ReportManager
destroyReport
in interface ReportManager
UnknownReportId
ReportManager.destroyReport(org.outerj.xreporter.user.User, java.lang.String)
protected boolean destroyReport(User user, ReportImpl report)
ReportManager.destroyReport(org.outerj.xreporter.user.User, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |