pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics
Class SendReportEmailJobletConfiguration

java.lang.Object
  extended by org.torweg.pulse.configuration.Configuration
      extended by org.torweg.pulse.component.statistics.SendReportEmailJobletConfiguration
All Implemented Interfaces:
java.io.Serializable

public class SendReportEmailJobletConfiguration
extends Configuration

The Configuration of the SendReportEmailJoblet.

Version:
$Revision: 1566 $
Author:
Daniel Dietz
See Also:
Serialized Form

Nested Class Summary
static class SendReportEmailJobletConfiguration.ReportEmailAddressConfiguration
          Configures per email address: the StatisticsServers the types of the reports per StatisticsServer for the recipient.
protected static class SendReportEmailJobletConfiguration.ReporterConfiguration
          Maps the class name of a report controller IStatisticsPDFReportController to an identifier name.
 
Constructor Summary
protected SendReportEmailJobletConfiguration()
          Deprecated. 
 
Method Summary
 boolean createReportOfTypeForServer(java.lang.String reportName, StatisticsServer server)
          Returns whether to create the report with the given identifier name for the given StatisticsServer.
 Duration getDurationForReports(long timestamp)
          Calculates the Duration for building the reports.
 Period getPeriodForCalculatingDuration()
          Returns the Period which is to be used for calculating the Duration for the data of the reports.
 java.util.Set<SendReportEmailJobletConfiguration.ReportEmailAddressConfiguration> getReportEmailAddressConfigurations()
          Returns the ReportEmailAddressConfigurations.
 EmailConfiguration getReportEmailConfiguration()
          Returns the report EmailConfiguration.
 java.util.Set<SendReportEmailJobletConfiguration.ReporterConfiguration> getReporterConfigurations()
          Returns the ReporterConfigurations.
 XSLHandleConfiguration getReportPDFXsl()
          Returns the report PDF XSLHandleConfiguration.
 
Methods inherited from class org.torweg.pulse.configuration.Configuration
getBundle, isBundleConfiguration, isModified, setBundle, setConfigFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendReportEmailJobletConfiguration

@Deprecated
protected SendReportEmailJobletConfiguration()
Deprecated. 

Default constructor.

Method Detail

getReporterConfigurations

public final java.util.Set<SendReportEmailJobletConfiguration.ReporterConfiguration> getReporterConfigurations()
Returns the ReporterConfigurations.

Returns:
an unmodifiable view of the ReporterConfigurations

getPeriodForCalculatingDuration

public final Period getPeriodForCalculatingDuration()
Returns the Period which is to be used for calculating the Duration for the data of the reports.

Returns:
the periodForCalculatingDuration

getReportEmailAddressConfigurations

public final java.util.Set<SendReportEmailJobletConfiguration.ReportEmailAddressConfiguration> getReportEmailAddressConfigurations()
Returns the ReportEmailAddressConfigurations.

Returns:
an unmodifiable view of the ReportEmailAddressConfigurations.

getReportEmailConfiguration

public final EmailConfiguration getReportEmailConfiguration()
Returns the report EmailConfiguration.

PLEASE NOTE:

Do not configure any recipients via the recipients configuration of the EmailConfiguration since these recipients will be ignored.

Use ReportEmailAddressConfiguration:
   <report-email-address-configurations>
      ...
   </report-email-address-configurations>
for configuration of recipients instead.

Returns:
the report EmailConfiguration, cleared of any recipients which might be configured

getReportPDFXsl

public final XSLHandleConfiguration getReportPDFXsl()
Returns the report PDF XSLHandleConfiguration.

Returns:
the report PDF XSLHandleConfiguration

getDurationForReports

public final Duration getDurationForReports(long timestamp)
Calculates the Duration for building the reports.

Based on the given time stamp a Duration with the configured Period will be calculated as follows:

  1. A Duration will be retrieved via Period for the given time stamp and the configured periodForCalculatingDuration
  2. The duration will be scrolled levelled via Period to the previous duration using the configured periodForCalculatingDuration

Parameters:
timestamp - the time stamp
Returns:
the Duration to be used for the reports.

createReportOfTypeForServer

public final boolean createReportOfTypeForServer(java.lang.String reportName, StatisticsServer server)
Returns whether to create the report with the given identifier name for the given StatisticsServer.

Parameters:
reportName - the identifier name of the report as in ReporterConfiguration
server - the StatisticsServer
Returns:
if the report with the given identifier is to be created for the given server