org.outerj.xreporter.reportstore
Interface ReportStore

All Known Implementing Classes:
ReportStoreImpl

public interface ReportStore

The component responsible for storing and loading report instances.


Field Summary
static java.lang.String ROLE
           
 
Method Summary
 void delete(java.lang.String name, User user)
          Deletes a stored report.
 void generateStoredReportList(User user, org.xml.sax.ContentHandler contentHandler, ResourceHandle resourceHandle)
          Generates a list of all stored reports for a user to a SAX ContentHandler.
 Report makeInstance(java.lang.String name, User user, ResourceHandle resourceHandle)
          Makes an instance of the report stored under the given name.
 void store(java.lang.String name, Report report, User user, boolean overwrite)
          Stores a report.
 

Field Detail

ROLE

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

store

public void store(java.lang.String name,
                  Report report,
                  User user,
                  boolean overwrite)
           throws ReportNameExistsException,
                  ReportStoreException
Stores a report.

Parameters:
overwrite - if true and there exists already a report with the given name (for the given user), then it will be overwitten. Otherwise a ReportNameExistsException will be thrown.
Throws:
ReportNameExistsException
ReportStoreException

makeInstance

public Report makeInstance(java.lang.String name,
                           User user,
                           ResourceHandle resourceHandle)
                    throws NonExistingStoredReport,
                           ReportStoreException
Makes an instance of the report stored under the given name.

The returned report will be locked, so it must be released by the caller when no longer needed.

Throws:
NonExistingStoredReport
ReportStoreException

generateStoredReportList

public void generateStoredReportList(User user,
                                     org.xml.sax.ContentHandler contentHandler,
                                     ResourceHandle resourceHandle)
                              throws org.xml.sax.SAXException,
                                     ReportStoreException
Generates a list of all stored reports for a user to a SAX ContentHandler. The reports will be sorted on their name.

Throws:
org.xml.sax.SAXException
ReportStoreException

delete

public void delete(java.lang.String name,
                   User user)
            throws ReportStoreException
Deletes a stored report.

Throws:
ReportStoreException