org.openengsb.domain.report
Interface ReportDomain

All Superinterfaces:
Domain, OpenEngSBService
All Known Implementing Classes:
AbstractReportDomain

public interface ReportDomain
extends Domain


Method Summary
 void addReportPart(String reportId, ReportPart reportPart)
          Add the given report part to the report data currently collected for the given reportId.
 String collectData()
          Start a report data collection.
 void createCategory(String category)
          Creates the given category, which is empty at the start.
 Report generateReport(String reportId, String category, String reportName)
          Generate the report using the information stored under the given reportId and stop collecting data for this report.
 List<String> getAllCategories()
          Get all report categories.
 List<Report> getAllReports(String category)
          Get all finished reports of the given category.
 Report getDraft(String reportId, String draftName)
          Generate a report based on the currently available data stored for the given reportId.
 void processEvent(String reportId, Event event)
          Analyzes the given event and adds all information stored in the event to the report data collection associated with the given reportId, which was initialized by calling #collectData(IdType, String).
 void removeCategory(String category)
          Remove the given category and all reports stored in this category.
 void removeReport(String category, Report report)
          Remove the given report from the given category.
 void storeReport(String category, Report report)
          Store the given report in the report store under the given category.
 
Methods inherited from interface org.openengsb.core.common.Domain
getAliveState
 
Methods inherited from interface org.openengsb.core.common.OpenEngSBService
getInstanceId
 

Method Detail

generateReport

Report generateReport(String reportId,
                      String category,
                      String reportName)
                      throws NoSuchReportException
Generate the report using the information stored under the given reportId and stop collecting data for this report. The report is added to the specified report category and named as specified by the reportName parameter. The category is created if it is not already present. If there is already a report with the same name under this category it is overwritten.

Returns:
the generated report
Throws:
NoSuchReportException - if no report with the given reportId is currently collecting data.

getDraft

Report getDraft(String reportId,
                String draftName)
                throws NoSuchReportException
Generate a report based on the currently available data stored for the given reportId. The report is generated but not stored. Furthermore the data collection is not stopped for this report. This method can be used if a preview of the report is needed, but the data collection is not finished yet.

Returns:
the generated report draft
Throws:
NoSuchReportException - if no report with the given reportId is currently collecting data.

collectData

String collectData()
Start a report data collection. If the data collection process is finished the report can be generated by calling the generateReport(String, String, String) method specifying the reportId returned by this method.

Returns:
the reportId that can later be used to generate the report by calling generateReport(String, String, String)

addReportPart

void addReportPart(String reportId,
                   ReportPart reportPart)
                   throws NoSuchReportException
Add the given report part to the report data currently collected for the given reportId. The report part is appended at the end of the report.

Throws:
NoSuchReportException - if no report with the given reportId is currently collecting data.

processEvent

void processEvent(String reportId,
                  Event event)
                  throws NoSuchReportException
Analyzes the given event and adds all information stored in the event to the report data collection associated with the given reportId, which was initialized by calling #collectData(IdType, String).

Throws:
NoSuchReportException - if no report with the given reportId is currently collecting data

getAllReports

List<Report> getAllReports(String category)
Get all finished reports of the given category. Reports, which are currently generated and collect data are not included. If the given category does not exist an empty list is returned.


storeReport

void storeReport(String category,
                 Report report)
Store the given report in the report store under the given category. The category is created if it is not already present. If there is already a report with the same name under this category it is overwritten.


removeReport

void removeReport(String category,
                  Report report)
Remove the given report from the given category. The report is deleted and cannot be restored if it is not also stored under another category. If no such report exist no operation is performed.


getAllCategories

List<String> getAllCategories()
Get all report categories.


removeCategory

void removeCategory(String category)
Remove the given category and all reports stored in this category. If no category with the specified name exists, nothing is done.


createCategory

void createCategory(String category)
Creates the given category, which is empty at the start. Reports can later be added by either calling storeReport(String, Report) or generateReport(String, String, String) specifying the respective category. If a category exists with the given name no operation is performed.



Copyright © 2009-2010. All Rights Reserved.