This is an automated email from the git hooks/post-receive script. New commit to branch java8-localdate-localtime in repository jtimer. See http://git.chorem.org/jtimer.git commit 553c5abfa138457bedc6b0fa11bf82e9b648da21 Author: Eric Chatellier <chatellier@codelutin.com> Date: Mon Mar 7 14:20:03 2016 +0100 Add mustache template engine --- pom.xml | 6 +- .../java/org/chorem/jtimer/io/GTimerTimeUtil.java | 2 +- .../chorem/jtimer/ui/report/ReportGenerator.java | 90 +++++++--------- .../report/{ReportUtils.java => ReportScope.java} | 114 ++++++++++++++++----- .../chorem/jtimer/ui/report/TemplateResolver.java | 46 +++++++++ src/main/resources/mustache/reportByDay.mustache | 29 ++++++ src/main/resources/mustache/reportByMonth.mustache | 24 +++++ .../resources/mustache/reportByProject.mustache | 24 +++++ src/main/resources/mustache/reportByWeek.mustache | 24 +++++ src/main/resources/mustache/reportByYear.mustache | 24 +++++ .../chorem/jtimer/ui/report/ReportUtilsTest.java | 24 ++--- 11 files changed, 313 insertions(+), 94 deletions(-) diff --git a/pom.xml b/pom.xml index f2e8538..729f663 100644 --- a/pom.xml +++ b/pom.xml @@ -302,9 +302,9 @@ <scope>runtime</scope> </dependency> <dependency> - <groupId>org.freemarker</groupId> - <artifactId>freemarker</artifactId> - <version>2.3.23</version> + <groupId>com.github.spullara.mustache.java</groupId> + <artifactId>compiler</artifactId> + <version>0.9.1</version> </dependency> <dependency> <groupId>org.yaml</groupId> diff --git a/src/main/java/org/chorem/jtimer/io/GTimerTimeUtil.java b/src/main/java/org/chorem/jtimer/io/GTimerTimeUtil.java index 217f65c..5e67687 100644 --- a/src/main/java/org/chorem/jtimer/io/GTimerTimeUtil.java +++ b/src/main/java/org/chorem/jtimer/io/GTimerTimeUtil.java @@ -61,7 +61,7 @@ public class GTimerTimeUtil { */ public static LocalDate yyyyMMdd2Date(String dateAsString) { - LocalDate date = (LocalDate)GTIMERDATEFORMAT.parse(dateAsString); + LocalDate date = LocalDate.parse(dateAsString, GTIMERDATEFORMAT); return date; } diff --git a/src/main/java/org/chorem/jtimer/ui/report/ReportGenerator.java b/src/main/java/org/chorem/jtimer/ui/report/ReportGenerator.java index 86c5dfa..5b71aa8 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/ReportGenerator.java +++ b/src/main/java/org/chorem/jtimer/ui/report/ReportGenerator.java @@ -26,20 +26,15 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.Date; -import java.util.HashMap; import java.util.List; -import java.util.Locale; -import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.jtimer.entities.TimerProject; -import freemarker.cache.ClassTemplateLoader; -import freemarker.ext.beans.BeansWrapper; -import freemarker.template.Configuration; -import freemarker.template.Template; -import freemarker.template.TemplateException; +import com.github.mustachejava.DefaultMustacheFactory; +import com.github.mustachejava.Mustache; +import com.github.mustachejava.MustacheFactory; /** * Report generator class (process code). @@ -62,8 +57,7 @@ public class ReportGenerator { BY_DAY_REPORT, BY_WEEK_REPORT, BY_MONTH_REPORT, BY_YEAR_REPORT, BY_PROJECT_REPORT } - /** Freemarker */ - protected Configuration freemarkerConfiguration; + protected MustacheFactory mf; /** * Constructor. @@ -71,18 +65,7 @@ public class ReportGenerator { * Init freemarker. */ public ReportGenerator() { - - freemarkerConfiguration = new Configuration(Configuration.VERSION_2_3_23); - - // needed to overwrite "Defaults to default system encoding." - // fix encoding issue on some systems - freemarkerConfiguration.setEncoding(Locale.getDefault(), "UTF-8"); - - // specific template loader to get template from jars (classpath) - ClassTemplateLoader templateLoader = new ClassTemplateLoader(ReportGenerator.class, "/ftl"); - freemarkerConfiguration.setTemplateLoader(templateLoader); - - freemarkerConfiguration.setObjectWrapper(new BeansWrapper(Configuration.VERSION_2_3_23)); + mf = new DefaultMustacheFactory(new TemplateResolver()); } /** @@ -103,33 +86,34 @@ public class ReportGenerator { Date begin, Date end, boolean includeTime, boolean includeAnnotate, boolean includeAnnotateTime, boolean includeIntermediateTotalTime) { - Template template = null; String content = null; + String template = null; try { switch (reportType) { case BY_DAY_REPORT: - template = freemarkerConfiguration.getTemplate("reportByDay.ftl"); + template = "reportByDay.mustache"; break; case BY_WEEK_REPORT: - template = freemarkerConfiguration.getTemplate("reportByWeek.ftl"); + template = "reportByWeek.mustache"; break; case BY_MONTH_REPORT: - template = freemarkerConfiguration.getTemplate("reportByMonth.ftl"); + template = "reportByMonth.mustache"; break; case BY_YEAR_REPORT: - template = freemarkerConfiguration.getTemplate("reportByYear.ftl"); + template = "reportByYear.mustache"; break; case BY_PROJECT_REPORT: - template = freemarkerConfiguration.getTemplate("reportByProject.ftl"); + template = "reportByProject.mustache"; break; } - content = getReportContent(template, projects, begin, end, includeTime, + Mustache mustache = mf.compile(template); + content = getReportContent(mustache, projects, begin, end, includeTime, includeAnnotate, includeAnnotateTime, includeIntermediateTotalTime); - } catch (IOException | TemplateException e) { + } catch (IOException e) { if (log.isErrorEnabled()) { - log.error("Can't get freemarker template", e); + log.error("Can't get mustache template", e); } } @@ -142,7 +126,7 @@ public class ReportGenerator { * @param projects projects sub set * @param begin begin date * @param end end date - * @param template freemarker template to use + * @param mustache mustache template to use * @param includeTime include time * @param includeAnnotate include annotations * @param includeAnnotateTime include annotations time @@ -151,32 +135,30 @@ public class ReportGenerator { * @return string content * * @throws IOException if i/o exception occurs - * @throws TemplateException if freemarker template exception occurs - * - * @see Template */ - protected String getReportContent(Template template, + protected String getReportContent(Mustache mustache, List<TimerProject> projects, Date begin, Date end, boolean includeTime, boolean includeAnnotate, boolean includeAnnotateTime, - boolean includeIntermediateTotalTime) throws TemplateException, IOException { - - // Create the root hash - Map<String, Object> root = new HashMap<>(); - - root.put("projects", projects); - root.put("begin", begin); - root.put("end", end); - root.put("includeTime", includeTime); - root.put("annotations", includeAnnotate); - root.put("annotationsTime", includeAnnotateTime); - root.put("intermediateTotalTime", includeIntermediateTotalTime); - root.put("utils", new ReportUtils()); - - Writer out = new StringWriter(); - template.process(root, out); - out.flush(); + boolean includeIntermediateTotalTime) throws IOException { + + // build scope + ReportScope scope = new ReportScope(); + scope.setProjects(projects); + scope.setBegin(begin); + scope.setEnd(end); + scope.setOptionTime(includeTime); + scope.setOptionAnnotation(includeAnnotate); + scope.setOptionAnnotationTime(includeAnnotateTime); + scope.setOptionIntermediateTotalTime(includeIntermediateTotalTime); + + // process template + String result = null; + try (Writer inWriter = new StringWriter(); Writer out = mustache.execute(inWriter, scope)) { + out.flush(); + result = out.toString(); + } - return out.toString(); + return result; } } diff --git a/src/main/java/org/chorem/jtimer/ui/report/ReportUtils.java b/src/main/java/org/chorem/jtimer/ui/report/ReportScope.java similarity index 86% rename from src/main/java/org/chorem/jtimer/ui/report/ReportUtils.java rename to src/main/java/org/chorem/jtimer/ui/report/ReportScope.java index e96063e..d8b6977 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/ReportUtils.java +++ b/src/main/java/org/chorem/jtimer/ui/report/ReportScope.java @@ -22,6 +22,7 @@ package org.chorem.jtimer.ui.report; +import java.time.LocalDate; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; @@ -30,11 +31,12 @@ import java.util.List; import java.util.Map; import org.apache.commons.lang3.time.DurationFormatUtils; +import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; import org.chorem.jtimer.entities.TimerTaskHelper; /** - * Report utility class for use in freemarker context. + * Report scope for mustache containing data utility class for use in freemarker context. * * @author chatellier * @version $Revision$ @@ -42,7 +44,71 @@ import org.chorem.jtimer.entities.TimerTaskHelper; * Last update : $Date$ * By : $Author$ */ -public class ReportUtils { +public class ReportScope { + + protected List<TimerProject> projects; + protected Date begin; + protected Date end; + protected boolean optionTime; + protected boolean optionAnnotation; + protected boolean optionAnnotationTime; + protected boolean optionIntermediateTotalTime; + + public List<TimerProject> getProjects() { + return projects; + } + + public void setProjects(List<TimerProject> projects) { + this.projects = projects; + } + + public Date getBegin() { + return begin; + } + + public void setBegin(Date begin) { + this.begin = begin; + } + + public Date getEnd() { + return end; + } + + public void setEnd(Date end) { + this.end = end; + } + + public boolean isOptionTime() { + return optionTime; + } + + public void setOptionTime(boolean optionTime) { + this.optionTime = optionTime; + } + + public boolean isOptionAnnotation() { + return optionAnnotation; + } + + public void setOptionAnnotation(boolean optionAnnotation) { + this.optionAnnotation = optionAnnotation; + } + + public boolean isOptionAnnotationTime() { + return optionAnnotationTime; + } + + public void setOptionAnnotationTime(boolean optionAnnotationTime) { + this.optionAnnotationTime = optionAnnotationTime; + } + + public boolean isOptionIntermediateTotalTime() { + return optionIntermediateTotalTime; + } + + public void setOptionIntermediateTotalTime(boolean optionIntermediateTotalTime) { + this.optionIntermediateTotalTime = optionIntermediateTotalTime; + } /** * Get date list, between to date (1 day interval). @@ -137,7 +203,7 @@ public class ReportUtils { * @param day day * @return duration in seconds */ - public long getDailyTaskTime(TimerTask task, Date day) { + public long getDailyTaskTime(TimerTask task, LocalDate day) { long result = task.getTime(day); return result; @@ -154,8 +220,8 @@ public class ReportUtils { * @param toDay to day (inclusive) * @return duration in seconds */ - public long getWeeklyTaskTime(TimerTask task, Date week, Date fromDay, - Date toDay) { + /*public long getWeeklyTaskTime(TimerTask task, LocalDate week, LocalDate fromDay, + LocalDate toDay) { long result = 0; Calendar beginPeriodDate = Calendar.getInstance(); @@ -180,7 +246,7 @@ public class ReportUtils { } return result; - } + }*/ /** * Get task proper time for a month. @@ -193,8 +259,8 @@ public class ReportUtils { * @param toDay to day (inclusive) * @return duration in seconds */ - public long getMonthlyTaskTime(TimerTask task, Date month, Date fromDay, - Date toDay) { + /*public long getMonthlyTaskTime(TimerTask task, LocalDate month, LocalDate fromDay, + LocalDate toDay) { long result = 0; Calendar beginPeriodDate = Calendar.getInstance(); @@ -219,7 +285,7 @@ public class ReportUtils { } return result; - } + }*/ /** * Get task proper time for a year. @@ -232,8 +298,8 @@ public class ReportUtils { * @param toDay to day (inclusive) * @return duration in seconds */ - public long getYearlyTaskTime(TimerTask task, Date year, Date fromDay, - Date toDay) { + /*public long getYearlyTaskTime(TimerTask task, LocalDate year, LocalDate fromDay, + LocalDate toDay) { long result = 0; Calendar beginPeriodDate = Calendar.getInstance(); @@ -259,7 +325,7 @@ public class ReportUtils { } return result; - } + }*/ /** * Get task total time (including subtask) for a day. @@ -268,7 +334,7 @@ public class ReportUtils { * @param day day * @return duration in seconds */ - public long getDailyTotalTaskTime(TimerTask task, Date day) { + public long getDailyTotalTaskTime(TimerTask task, LocalDate day) { long result = TimerTaskHelper.getTotalTime(task, day); return result; @@ -285,8 +351,8 @@ public class ReportUtils { * @param toDay to day (inclusive) * @return duration in seconds */ - public long getWeeklyTotalTaskTime(TimerTask task, Date week, Date fromDay, - Date toDay) { + /*public long getWeeklyTotalTaskTime(TimerTask task, LocalDate week, LocalDate fromDay, + LocalDate toDay) { long result = 0; Calendar beginPeriodDate = Calendar.getInstance(); @@ -311,7 +377,7 @@ public class ReportUtils { } return result; - } + }*/ /** * Get task total time (including subtask) for a month. @@ -324,8 +390,8 @@ public class ReportUtils { * @param toDay to day (inclusive) * @return duration in seconds */ - public long getMonthlyTotalTaskTime(TimerTask task, Date month, - Date fromDay, Date toDay) { + /*public long getMonthlyTotalTaskTime(TimerTask task, LocalDate month, + LocalDate fromDay, LocalDate toDay) { long result = 0; Calendar beginPeriodDate = Calendar.getInstance(); @@ -350,7 +416,7 @@ public class ReportUtils { } return result; - } + }*/ /** * Get task total time (including subtask) for a year. @@ -363,8 +429,8 @@ public class ReportUtils { * @param toDay to day (inclusive) * @return duration in seconds */ - public long getYearlyTotalTaskTime(TimerTask task, Date year, Date fromDay, - Date toDay) { + /*public long getYearlyTotalTaskTime(TimerTask task, LocalDate year, LocalDate fromDay, + LocalDate toDay) { long result = 0; Calendar beginPeriodDate = Calendar.getInstance(); @@ -390,7 +456,7 @@ public class ReportUtils { } return result; - } + }*/ /** * Format duration in 00:00:00 format. @@ -410,12 +476,12 @@ public class ReportUtils { * @param day day * @return annotations of the day */ - public Map<Date, String> getDailyTaskAnnotation(TimerTask task, Date day) { + /*public Map<Date, String> getDailyTaskAnnotation(TimerTask task, LocalDate day) { Map<Date, String> result = TimerTaskHelper.getAnnotationMap(task, day); return result; - } + }*/ /** * Get task annotations for a week. diff --git a/src/main/java/org/chorem/jtimer/ui/report/TemplateResolver.java b/src/main/java/org/chorem/jtimer/ui/report/TemplateResolver.java new file mode 100644 index 0000000..d05a251 --- /dev/null +++ b/src/main/java/org/chorem/jtimer/ui/report/TemplateResolver.java @@ -0,0 +1,46 @@ +/* + * #%L + * jTimer + * %% + * Copyright (C) 2016 CodeLutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +package org.chorem.jtimer.ui.report; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.nio.charset.StandardCharsets; + +import com.github.mustachejava.MustacheResolver; + +/** + * Classpath resolver because default mustache's class path resolver is not working. + * + * @author Eric Chatellier + */ +public class TemplateResolver implements MustacheResolver { + + @Override + public Reader getReader(String resourceName) { + InputStream is = getClass().getResourceAsStream("/mustache/" + resourceName); + + return new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); + } + +} diff --git a/src/main/resources/mustache/reportByDay.mustache b/src/main/resources/mustache/reportByDay.mustache new file mode 100644 index 0000000..9305bae --- /dev/null +++ b/src/main/resources/mustache/reportByDay.mustache @@ -0,0 +1,29 @@ +<#-- + #%L + jTimer + %% + Copyright (C) 2016 CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +Report by day +============= + +{{#projects}} + {{name}} +{{/projects}} + +<#assign periods=utils.getDailyDates(begin?date,end?date)/> diff --git a/src/main/resources/mustache/reportByMonth.mustache b/src/main/resources/mustache/reportByMonth.mustache new file mode 100644 index 0000000..3581ac5 --- /dev/null +++ b/src/main/resources/mustache/reportByMonth.mustache @@ -0,0 +1,24 @@ +<#-- + #%L + jTimer + %% + Copyright (C) 2007 - 2016 CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +Report by month +=============== + diff --git a/src/main/resources/mustache/reportByProject.mustache b/src/main/resources/mustache/reportByProject.mustache new file mode 100644 index 0000000..19e0204 --- /dev/null +++ b/src/main/resources/mustache/reportByProject.mustache @@ -0,0 +1,24 @@ +<#-- + #%L + jTimer + %% + Copyright (C) 2007 - 2016 CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +Report by project +================= + diff --git a/src/main/resources/mustache/reportByWeek.mustache b/src/main/resources/mustache/reportByWeek.mustache new file mode 100644 index 0000000..98bde46 --- /dev/null +++ b/src/main/resources/mustache/reportByWeek.mustache @@ -0,0 +1,24 @@ +<#-- + #%L + jTimer + %% + Copyright (C) 2007 - 2016 CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +Report by week +============== + diff --git a/src/main/resources/mustache/reportByYear.mustache b/src/main/resources/mustache/reportByYear.mustache new file mode 100644 index 0000000..4716877 --- /dev/null +++ b/src/main/resources/mustache/reportByYear.mustache @@ -0,0 +1,24 @@ +<#-- + #%L + jTimer + %% + Copyright (C) 2007 - 2016 CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% +--> +Report by year +============== + diff --git a/src/test/java/org/chorem/jtimer/ui/report/ReportUtilsTest.java b/src/test/java/org/chorem/jtimer/ui/report/ReportUtilsTest.java index e7613f3..ace1335 100644 --- a/src/test/java/org/chorem/jtimer/ui/report/ReportUtilsTest.java +++ b/src/test/java/org/chorem/jtimer/ui/report/ReportUtilsTest.java @@ -72,7 +72,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date102008 = df.parse("vendredi 10 octobre 2008"); Date date112008 = df.parse("lundi 24 novembre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> daylyDates = utils.getDailyDates(date102008, date112008); @@ -93,7 +93,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("lundi 6 octobre 2008"); Date date2 = df.parse("mardi 7 octobre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> daylyDates = utils.getDailyDates(date1, date2); @@ -114,7 +114,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("vendredi 10 octobre 2008"); Date date2 = df.parse("lundi 13 octobre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> daylyDates = utils.getDailyDates(date1, date2); @@ -136,7 +136,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date102008 = df.parse("vendredi 10 octobre 2008"); Date date112008 = df.parse("lundi 24 novembre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> weeklyDates = utils.getWeeklyDates(date102008, date112008); @@ -156,7 +156,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("lundi 6 octobre 2008"); Date date2 = df.parse("vendredi 10 octobre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> weeklyDates = utils.getWeeklyDates(date1, date2); @@ -176,7 +176,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("vendredi 10 octobre 2008"); Date date2 = df.parse("lundi 13 octobre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> weeklyDates = utils.getWeeklyDates(date1, date2); @@ -198,7 +198,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("lundi 24 novembre 2008"); Date date2 = df.parse("mercredi 17 mars 2010"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> monthlyDates = utils.getMonthlyDates(date1, date2); @@ -219,7 +219,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("lundi 3 novembre 2008"); Date date2 = df.parse("mardi 4 novembre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> monthlyDates = utils.getMonthlyDates(date1, date2); @@ -240,7 +240,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("lundi 27 octobre 2008"); Date date2 = df.parse("lundi 10 novembre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> monthlyDates = utils.getMonthlyDates(date1, date2); @@ -261,7 +261,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date112008 = df.parse("lundi 24 novembre 2008"); Date date032010 = df.parse("mercredi 17 mars 2010"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> yearlyDates = utils.getYearlyDates(date112008, date032010); @@ -283,7 +283,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("lundi 24 novembre 2008"); Date date2 = df.parse("vendredi 28 novembre 2008"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> yearlyDates = utils.getYearlyDates(date1, date2); @@ -305,7 +305,7 @@ public class ReportUtilsTest extends AbstractJTimerTest { Date date1 = df.parse("lundi 24 novembre 2008"); Date date2 = df.parse("lundi 5 janvier 2009"); - ReportUtils utils = new ReportUtils(); + ReportScope utils = new ReportScope(); List<Date> yearlyDates = utils.getYearlyDates(date1, date2); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.