org.chorem.jtimer.ui.report
Class ReportGenerator

java.lang.Object
  extended by org.chorem.jtimer.ui.report.ReportGenerator

public class ReportGenerator
extends Object

Report generator class (process code).

Version:
$Revision: 2607 $ Last update : $Date: 2009-06-18 17:19:19 +0200 (jeu., 18 juin 2009) $ By : $Author: echatellier $
Author:
chatellier

Nested Class Summary
static class ReportGenerator.Type
          Report type
 
Field Summary
protected  freemarker.template.Configuration freemarkerConfiguration
          Freemarker
 
Constructor Summary
ReportGenerator()
          Constructor.
 
Method Summary
protected  String getReportContent(freemarker.template.Template template, List<TimerProject> projects, Date begin, Date end, boolean includeAnnotate)
          Get report content with freemarker template execution.
 String getReportText(ReportGenerator.Type reportType, List<TimerProject> projects, Date begin, Date end, boolean includeAnnotate)
          Make report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

freemarkerConfiguration

protected freemarker.template.Configuration freemarkerConfiguration
Freemarker

Constructor Detail

ReportGenerator

public ReportGenerator()
Constructor. Init freemarker.

Method Detail

getReportText

public String getReportText(ReportGenerator.Type reportType,
                            List<TimerProject> projects,
                            Date begin,
                            Date end,
                            boolean includeAnnotate)
Make report.

Parameters:
reportType - type, (daily, weekly...)
projects - projects sub set
begin - begin date
end - end date
includeAnnotate - include annotations
Returns:
report text

getReportContent

protected String getReportContent(freemarker.template.Template template,
                                  List<TimerProject> projects,
                                  Date begin,
                                  Date end,
                                  boolean includeAnnotate)
                           throws freemarker.template.TemplateException,
                                  IOException
Get report content with freemarker template execution.

Parameters:
projects - projects sub set
begin - begin date
end - end date
template - freemarker template to use
includeAnnotate - include annotations
Returns:
string content
Throws:
IOException - if i/o exception occurs
freemarker.template.TemplateException - if freemarker template exception occurs
See Also:
Template


Copyright © 2007-2010 CodeLutin. All Rights Reserved.