Package b4j.report
Class AbstractReportGenerator
java.lang.Object
b4j.report.AbstractReportGenerator
- All Implemented Interfaces:
BugzillaReportGenerator
,IConfigurable
- Direct Known Subclasses:
AbstractEmailReport
,AbstractFileReport
,LogReport
public abstract class AbstractReportGenerator extends java.lang.Object implements BugzillaReportGenerator
- Author:
- Ralph Schuster
-
Constructor Summary
Constructors Constructor Description AbstractReportGenerator()
-
Method Summary
Modifier and Type Method Description void
configure(org.apache.commons.configuration.Configuration config)
Configures the file report.protected Session
getBugzillaSession()
Returns the current Bugzilla session object.java.lang.String
getMaximumBugzillaVersion()
Returns the maximum Bugzilla version this session supports.java.lang.String
getMinimumBugzillaVersion()
Returns the minimum Bugzilla version this session supports.void
prepareReport()
Prepares a new report.void
setBugzillaSession(Session bugzillaSession)
Sets the current Session object used.
-
Constructor Details
-
AbstractReportGenerator
public AbstractReportGenerator()
-
-
Method Details
-
configure
public void configure(org.apache.commons.configuration.Configuration config) throws org.apache.commons.configuration.ConfigurationExceptionConfigures the file report. This implementation retrieves the value for "outputFile" or throws an exception when no such element was defined.- Specified by:
configure
in interfaceIConfigurable
- Parameters:
config
- - the configuration object- Throws:
org.apache.commons.configuration.ConfigurationException
- - when a configuration problem occurs
-
getMaximumBugzillaVersion
public java.lang.String getMaximumBugzillaVersion()Returns the maximum Bugzilla version this session supports. Returns null to indicate that no upper limits must be enforced.- Specified by:
getMaximumBugzillaVersion
in interfaceBugzillaReportGenerator
- Returns:
- maximum version of supported Bugzilla version or null
-
getMinimumBugzillaVersion
public java.lang.String getMinimumBugzillaVersion()Returns the minimum Bugzilla version this session supports. Returns null to indicate that no lower limits must be enforced.- Specified by:
getMinimumBugzillaVersion
in interfaceBugzillaReportGenerator
- Returns:
- minimum version of supported Bugzilla version or null
-
prepareReport
public void prepareReport()Prepares a new report. This will be called when a new report must be generated.- Specified by:
prepareReport
in interfaceBugzillaReportGenerator
-
getBugzillaSession
Returns the current Bugzilla session object.- Returns:
- the bugzillaSession used for this report.
-
setBugzillaSession
Sets the current Session object used. Implementations can use this session object to retrieve more data out of Bugzilla if the need to do so.- Specified by:
setBugzillaSession
in interfaceBugzillaReportGenerator
- Parameters:
bugzillaSession
- - the current session object
-