org.openengsb.domain.report.common
Class AbstractReportDomain

java.lang.Object
  extended by org.openengsb.core.common.AbstractOpenEngSBService
      extended by org.openengsb.domain.report.common.AbstractReportDomain
All Implemented Interfaces:
org.openengsb.core.api.Domain, org.openengsb.core.api.OpenEngSBService, ReportDomain

public abstract class AbstractReportDomain
extends org.openengsb.core.common.AbstractOpenEngSBService
implements ReportDomain


Field Summary
 
Fields inherited from class org.openengsb.core.common.AbstractOpenEngSBService
instanceId
 
Constructor Summary
AbstractReportDomain(String instanceId)
           
 
Method Summary
 void createCategory(String category)
          Creates the given category, which is empty at the start.
 List<String> getAllCategories()
          Get all report categories.
 List<Report> getAllReports(String category)
          Get all finished reports of the given category.
 ReportStore getStore()
           
 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 setStore(ReportStore store)
           
 void storeReport(String category, Report report)
          Store the given report in the report store under the given category.
 
Methods inherited from class org.openengsb.core.common.AbstractOpenEngSBService
getInstanceId, setInstanceId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openengsb.domain.report.ReportDomain
addReportPart, collectData, generateReport, getDraft, processEvent
 
Methods inherited from interface org.openengsb.core.api.Domain
getAliveState
 
Methods inherited from interface org.openengsb.core.api.OpenEngSBService
getInstanceId
 

Constructor Detail

AbstractReportDomain

public AbstractReportDomain(String instanceId)
Method Detail

getAllReports

public List<Report> getAllReports(String category)
Description copied from interface: ReportDomain
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.

Specified by:
getAllReports in interface ReportDomain

storeReport

public void storeReport(String category,
                        Report report)
Description copied from interface: ReportDomain
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.

Specified by:
storeReport in interface ReportDomain

removeReport

public void removeReport(String category,
                         Report report)
Description copied from interface: ReportDomain
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.

Specified by:
removeReport in interface ReportDomain

getAllCategories

public List<String> getAllCategories()
Description copied from interface: ReportDomain
Get all report categories.

Specified by:
getAllCategories in interface ReportDomain

removeCategory

public void removeCategory(String category)
Description copied from interface: ReportDomain
Remove the given category and all reports stored in this category. If no category with the specified name exists, nothing is done.

Specified by:
removeCategory in interface ReportDomain

createCategory

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

Specified by:
createCategory in interface ReportDomain

setStore

public void setStore(ReportStore store)

getStore

public ReportStore getStore()


Copyright © 2009-2011. All Rights Reserved.