|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.chorem.jtimer.ui.report.ReportUtils
public class ReportUtils
Report utility class for use in freemarker context.
Constructor Summary | |
---|---|
ReportUtils()
|
Method Summary | |
---|---|
String |
formatDuration(long duration)
Format duration in 00:00:00 format. |
List<Date> |
getDailyDates(Date begin,
Date end)
Get date list, between to date (1 day interval). |
Map<Date,String> |
getDailyTaskAnnotation(TimerTask task,
Date day)
Get task annotations for a day. |
long |
getDailyTaskTime(TimerTask task,
Date day)
Get task proper time for a day. |
long |
getDailyTotalTaskTime(TimerTask task,
Date day)
Get task total time (including subtask) for a day. |
List<Date> |
getMonthlyDates(Date begin,
Date end)
Get date list, between to date (1 month interval). |
Map<Date,String> |
getMonthlyTaskAnnotation(TimerTask task,
Date month,
Date fromDay,
Date toDay)
Get task annotations for a month. |
long |
getMonthlyTaskTime(TimerTask task,
Date month,
Date fromDay,
Date toDay)
Get task proper time for a month. |
long |
getMonthlyTotalTaskTime(TimerTask task,
Date month,
Date fromDay,
Date toDay)
Get task total time (including subtask) for a month. |
protected List<Date> |
getPeriodDates(Date begin,
Date end,
int calendarField)
Get date list, between to date. |
List<TimerTask> |
getSubTaskOrdered(TimerTask task)
Return task subtasks ordered by name. |
List<Date> |
getWeeklyDates(Date begin,
Date end)
Get date list, between to date (1 week interval). |
Map<Date,String> |
getWeeklyTaskAnnotation(TimerTask task,
Date week,
Date fromDay,
Date toDay)
Get task annotations for a week. |
long |
getWeeklyTaskTime(TimerTask task,
Date week,
Date fromDay,
Date toDay)
Get task proper time for a week. |
long |
getWeeklyTotalTaskTime(TimerTask task,
Date week,
Date fromDay,
Date toDay)
Get task total time (including subtask) for a week. |
List<Date> |
getYearlyDates(Date begin,
Date end)
Get date list, between to date (1 year interval). |
Map<Date,String> |
getYearlyTaskAnnotation(TimerTask task,
Date year,
Date fromDay,
Date toDay)
Get task annotations for a year. |
long |
getYearlyTaskTime(TimerTask task,
Date year,
Date fromDay,
Date toDay)
Get task proper time for a year. |
long |
getYearlyTotalTaskTime(TimerTask task,
Date year,
Date fromDay,
Date toDay)
Get task total time (including subtask) for a year. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReportUtils()
Method Detail |
---|
public List<Date> getDailyDates(Date begin, Date end)
begin
- begin dateend
- end date
public List<Date> getWeeklyDates(Date begin, Date end)
begin
- begin dateend
- end date
public List<Date> getMonthlyDates(Date begin, Date end)
begin
- begin dateend
- end date
public List<Date> getYearlyDates(Date begin, Date end)
begin
- begin dateend
- end date
protected List<Date> getPeriodDates(Date begin, Date end, int calendarField)
begin
- begin dateend
- end datecalendarField
- calendar field to increment
public long getDailyTaskTime(TimerTask task, Date day)
task
- taskday
- day
public long getWeeklyTaskTime(TimerTask task, Date week, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the week week
. Thus you can get weekly task time from tuesday to wednesday.
task
- taskweek
- weekfromDay
- from day (inclusive)toDay
- to day (inclusive)
public long getMonthlyTaskTime(TimerTask task, Date month, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the month month
. Thus you can get monthly task time from third day to twelfth day.
task
- taskmonth
- monthfromDay
- from day (inclusive)toDay
- to day (inclusive)
public long getYearlyTaskTime(TimerTask task, Date year, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the year year
. Thus you can get yearly task time from 03/01 to 31/07.
task
- taskyear
- yearfromDay
- from day (inclusive)toDay
- to day (inclusive)
public long getDailyTotalTaskTime(TimerTask task, Date day)
task
- taskday
- day
public long getWeeklyTotalTaskTime(TimerTask task, Date week, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the week week
. Thus you can get weekly task time from tuesday to wednesday.
task
- taskweek
- weekfromDay
- from day (inclusive)toDay
- to day (inclusive)
public long getMonthlyTotalTaskTime(TimerTask task, Date month, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the month month
. Thus you can get monthly task time from third day to twelfth day.
task
- taskmonth
- monthfromDay
- from day (inclusive)toDay
- to day (inclusive)
public long getYearlyTotalTaskTime(TimerTask task, Date year, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the year year
. Thus you can get yearly task time from 03/01 to 31/07.
task
- taskyear
- yearfromDay
- from day (inclusive)toDay
- to day (inclusive)
public String formatDuration(long duration)
duration
- duration in seconds
public Map<Date,String> getDailyTaskAnnotation(TimerTask task, Date day)
task
- taskday
- day
public Map<Date,String> getWeeklyTaskAnnotation(TimerTask task, Date week, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the week week
. Thus you can get weekly task annotations from tuesday to wednesday.
task
- taskweek
- weekfromDay
- from day (inclusive)toDay
- to day (inclusive)
public Map<Date,String> getMonthlyTaskAnnotation(TimerTask task, Date month, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the month month
. Thus you can get monthly task annotations from third day to twelfth day.
task
- taskmonth
- monthfromDay
- from day (inclusive)toDay
- to day (inclusive)
public Map<Date,String> getYearlyTaskAnnotation(TimerTask task, Date year, Date fromDay, Date toDay)
fromDay
and toDay
allows you to define lower and upper bound
in the year year
. Thus you can get yearly task annotations from 03/01 to 31/07.
task
- taskyear
- yearfromDay
- from day (inclusive)toDay
- to day (inclusive)
public List<TimerTask> getSubTaskOrdered(TimerTask task)
task
- task to get subtasks
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |