|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.workflow.simple.Duration
Contains a task's due date and duration information, computed in server locale with millisecond precision. Start date can be set at instatantiation time or later. Duration and due date can be set at any time after instatantiation.
Field Summary | |
static String |
versionId
|
Constructor Summary | |
Duration(Date startDate)
Constructor that leaves duration unspecified. |
|
Duration(Date startDate,
int minutes)
Constructor with start date, and duration in minutes. |
|
Duration(Date startDate,
int days,
int hours,
int minutes)
Constructor with start date, and duration in days, hours, and minutes. |
|
Duration(int minutes)
Constructor with duration in minutes. |
|
Duration(int days,
int hours,
int minutes)
Constructor with duration in days, hours, and minutes. |
Method Summary | |
Date |
getDueDate()
Returns the due date. |
int |
getDuration()
Returns the number of minutes of the duration. |
Date |
getStartDate()
Returns the start date. |
boolean |
isPassedOverDue()
Checks if system clock is past the overdue date. |
boolean |
isPassedOverDue(Date date)
Checks if a date is past the overdue date. |
static void |
main(String[] arg)
|
void |
printSummary(PrintStream out)
Prints a summary to a java.io.PrintStream. |
void |
setDuration(int minutes)
Sets the duration in minutes. |
void |
setDuration(int days,
int hours,
int minutes)
Sets the duration in days, hours, and minutes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public Duration(int days, int hours, int minutes)
days
- the number of dayshours
- the number of hoursminutes
- the number of minutespublic Duration(int minutes)
public Duration(Date startDate)
startDate
- the start datesetDuration(int)
public Duration(Date startDate, int days, int hours, int minutes)
startDate
- the start datedays
- the duration in dayshours
- the duration in hoursminutes
- the duration in minutespublic Duration(Date startDate, int minutes)
startDate
- the start dateminutes
- the duration in minutesMethod Detail |
public void setDuration(int days, int hours, int minutes)
days
- the duration in dayshours
- the duration in hoursminutes
- the duration in minutespublic void setDuration(int minutes)
minutes
- the duration in minutespublic Date getStartDate()
public Date getDueDate()
public int getDuration()
public boolean isPassedOverDue()
true
if it is past
the overdue date; false
otherwise.public boolean isPassedOverDue(Date date)
true
if the date is past
the overdue date; false
otherwise.public void printSummary(PrintStream out) throws Exception
out
- the output print stream to print to
Exception
public static void main(String[] arg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |