org.outerj.xreporter.report
Interface ReportManager

All Known Implementing Classes:
ReportManagerImpl

public interface ReportManager

This Block manages reports. Some responsibilities to be covered by blocks implementing this interface are:

Public access to the report intances happens using the Report interface.


Field Summary
static java.lang.String ROLE
           
 
Method Summary
 Report createInstance(java.lang.String reportDefinitionId, java.lang.String dataSourceId, User user, ResourceHandle resourceHandle)
          Create a new report instance.
 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 setListener(java.lang.String name, java.net.InetSocketAddress listener, boolean discloseHostName, boolean disclosePortNumber)
          Specify information about the environment this instance is listening on.
 

Field Detail

ROLE

public static final java.lang.String ROLE
See Also:
Constant Field Values
Method Detail

setListener

public void setListener(java.lang.String name,
                        java.net.InetSocketAddress listener,
                        boolean discloseHostName,
                        boolean disclosePortNumber)
Specify information about the environment this instance is listening on. Will be propogated to execution contexts for each instance for use in displaying header information as well as providing a way to determine where to submit requests for subreport output.


createInstance

public Report createInstance(java.lang.String reportDefinitionId,
                             java.lang.String dataSourceId,
                             User user,
                             ResourceHandle resourceHandle)
                      throws UnknownReportDefintionIdException,
                             UnknownDataSourceIdException,
                             java.lang.Exception
Create a new report instance. The returned instance will be locked so that others cannot use it concurrently. You must release the instance (usually in a finally-block) by calling its release method when you're done with it.

This method will also check that the user has the rights to use the report and datasource.

Throws:
UnknownReportDefintionIdException
UnknownDataSourceIdException
java.lang.Exception

getReport

public Report getReport(java.lang.String reportInstanceId,
                        User user)
                 throws UnknownReportId,
                        ReportInUseException,
                        DataSourceAccessDeniedException,
                        ReportAccessDeniedException,
                        UnknownDataSourceIdException,
                        AuthorisationException
Gets an existing report instance. The returned instance will be locked so that others cannot use it concurrently. You must release the instance (usually in a finally-block) by calling its release method when you're done with it.

This method will also check that the user has the rights to use the report and associated datasource.

Throws:
UnknownReportId
ReportInUseException
DataSourceAccessDeniedException
ReportAccessDeniedException
UnknownDataSourceIdException
AuthorisationException

generateCatalog

public void generateCatalog(org.xml.sax.ContentHandler contentHandler,
                            User user,
                            java.lang.String dataSourceId,
                            ResourceHandle resourceHandle)
                     throws org.xml.sax.SAXException,
                            UnknownDataSourceIdException,
                            DataSourceAccessDeniedException,
                            AuthorisationException
Generates a catalog of available report definitions. This catalog will only contain reports to which the user has access (controlled by the 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).

Throws:
org.xml.sax.SAXException
UnknownDataSourceIdException
DataSourceAccessDeniedException
AuthorisationException

destroyReport

public boolean destroyReport(User user,
                             java.lang.String reportInstanceId)
                      throws UnknownReportId
Deletes all trace of the given report by calling its dispose method and removing its handle from the list of current instances.

Throws:
UnknownReportId

generateReportInstanceList

public void generateReportInstanceList(org.xml.sax.ContentHandler contentHandler)
                                throws org.xml.sax.SAXException
Generates a list of all report instances. Used for administration (auditing) purposes.

Throws:
org.xml.sax.SAXException

getReportDefinition

public ReportDefinition getReportDefinition(java.lang.String reportDefinitionId,
                                            User user)
                                     throws UnknownReportDefintionIdException,
                                            ReportAccessDeniedException,
                                            ReportDefinitionViewingNotAllowedException,
                                            AuthorisationException
Throws:
UnknownReportDefintionIdException
ReportAccessDeniedException
ReportDefinitionViewingNotAllowedException
AuthorisationException