org.squashtest.csp.tm.domain.report
Class ReportCategory
java.lang.Object
org.squashtest.csp.tm.domain.report.ReportCategory
- Direct Known Subclasses:
- CategoryExecutionPhase, CategoryPreparationPhase
public abstract class ReportCategory
- extends Object
This is the abstract class representing a ReportCategory, which is logically an qualifying attribute of a Report
and practically a container of Report.
Registering or unregistering a Report to/from a ReportCategory just happens the same way than a ReportFactory
registers/unregisters a ReportCategory, please refer to its documentation for more details.
Implementing ReportCategory :
=============================
* just set the key name in an init section or in the constructor, using setResourceKeyName(). This key name is meant
to be used as a key in a MessageSource.
* remember that the constructor must (explicitely or implicitely) call super() in order to register
the new instance of a subclass of ReportCategory against the ReportFactory.
- Author:
- bsiri
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReportCategory
public ReportCategory()
getId
public Integer getId()
- Returns:
- the id of this ReportCategory bean instance.
getReportList
public List<Report> getReportList()
- Returns:
- the list of the Reports registered in this ReportCategory.
addReport
public void addReport(Report report)
- Parameters:
report - : the Report to register in this Category.
findReportById
public Report findReportById(Integer id)
- Parameters:
id - the id of the Report to find.
- Returns:
- the Report registered under this id, or null if not found.
getResourceKeyName
public String getResourceKeyName()
- Returns:
- the key to look for in a MessageSource to get a localized name for this ReportCategory.
setResourceKeyName
protected void setResourceKeyName(String resourceKeyName)
- Parameters:
resourceKeyName - the key corresponding to this ReportCategory.
removeReport
public void removeReport(Report report)
- Will unregister a previously registered Report.
- Parameters:
report - a Report to unregister
removeReport
public void removeReport(Integer reportId)
- Will unregister a previously registered Report.
- Parameters:
reportId - the id of the report to unregister.
Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.