lcanals.tc.model
Class PlanTaskBean

java.lang.Object
  |
  +--lcanals.tc.model.PlanTaskBean
All Implemented Interfaces:
PlanTask, java.io.Serializable, Task

public class PlanTaskBean
extends java.lang.Object
implements PlanTask, java.io.Serializable

Bean which represents a line in the plan. Contains the difficulty, risk, description, estimated time, estimated maximum time, used time to complete it and if it's completed or not and functions to change the status.
Two beans of this type are equal if and only if they have the same id

Author:
www.lfcanals.es.org
See Also:
Serialized Form

Fields inherited from interface lcanals.tc.core.PlanTask
FINISHED, IN_PAUSE, NOT_STARTED, RUNNING
 
Constructor Summary
PlanTaskBean(int id, Task taskDescription, Estimation taskEstimation, Timing taskTiming, long timeUnit)
          Builds a new task bean description.
 
Method Summary
 boolean equals(java.lang.Object other)
          Two beans of this type are equals if and only if their ids are the same
 java.lang.String getDescription()
           
 int getDifficulty()
           
 long getEstimatedMaximumTotalTime()
          Return the estimated maximum time to complete the task
 long getEstimatedMinimumTotalTime()
          Return the minimum estimated total time to complete the task
 long getEstimatedProjectTime()
          Return the estimated time must be used to complete the task
 long getEstimatedTotalTime()
          Return the estimated time to complete the task
 int getId()
           
 long getMaximumProjectTime()
          Return the estimated maximum time must be used to complete the task
 long getMinimumProjectTime()
          Return the estimated minimum time must be used to complete the task
 int getRisk()
           
 java.lang.String getStatus()
          Returns a string saying the state.
 long getTimeUnit()
          Returns the unit of milliseconds in that the time functions of this bean return their values
 Timing getTiming()
          Returns the timing related with this task
 long getUsedProjectTime()
          Total project used time
 long getUsedTotalTime()
          Total used time
 boolean isFinished()
          Returns if the task is already finished
 void setEstimation(Estimation estimation)
          Updates estimation
 void setTimeUnit(long timeUnit)
          Sets the unit of milliseconds in that the time functions of this bean will return their values
 void signalPlayPause(java.lang.String comment)
          Receives a play/pause signal (ignored if task is finished yet)
 void signalStop()
          Receives a stop signal, which ends the task
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanTaskBean

public PlanTaskBean(int id,
                    Task taskDescription,
                    Estimation taskEstimation,
                    Timing taskTiming,
                    long timeUnit)
Builds a new task bean description.
Method Detail

getId

public int getId()
Specified by:
getId in interface Task

getDifficulty

public int getDifficulty()
Specified by:
getDifficulty in interface Task

getRisk

public int getRisk()
Specified by:
getRisk in interface Task

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Task

getEstimatedProjectTime

public long getEstimatedProjectTime()
Description copied from interface: PlanTask
Return the estimated time must be used to complete the task
Specified by:
getEstimatedProjectTime in interface PlanTask

getMaximumProjectTime

public long getMaximumProjectTime()
Description copied from interface: PlanTask
Return the estimated maximum time must be used to complete the task
Specified by:
getMaximumProjectTime in interface PlanTask

getMinimumProjectTime

public long getMinimumProjectTime()
Description copied from interface: PlanTask
Return the estimated minimum time must be used to complete the task
Specified by:
getMinimumProjectTime in interface PlanTask

getEstimatedTotalTime

public long getEstimatedTotalTime()
Description copied from interface: PlanTask
Return the estimated time to complete the task
Specified by:
getEstimatedTotalTime in interface PlanTask

getEstimatedMaximumTotalTime

public long getEstimatedMaximumTotalTime()
Description copied from interface: PlanTask
Return the estimated maximum time to complete the task
Specified by:
getEstimatedMaximumTotalTime in interface PlanTask

getEstimatedMinimumTotalTime

public long getEstimatedMinimumTotalTime()
Description copied from interface: PlanTask
Return the minimum estimated total time to complete the task
Specified by:
getEstimatedMinimumTotalTime in interface PlanTask

getUsedProjectTime

public long getUsedProjectTime()
Description copied from interface: PlanTask
Total project used time
Specified by:
getUsedProjectTime in interface PlanTask

getUsedTotalTime

public long getUsedTotalTime()
Description copied from interface: PlanTask
Total used time
Specified by:
getUsedTotalTime in interface PlanTask

isFinished

public boolean isFinished()
Description copied from interface: PlanTask
Returns if the task is already finished
Specified by:
isFinished in interface PlanTask

getStatus

public java.lang.String getStatus()
Description copied from interface: PlanTask
Returns a string saying the state. State can be compared to this static constants:
Specified by:
getStatus in interface PlanTask

getTimeUnit

public long getTimeUnit()
Returns the unit of milliseconds in that the time functions of this bean return their values
Specified by:
getTimeUnit in interface PlanTask

setTimeUnit

public void setTimeUnit(long timeUnit)
Sets the unit of milliseconds in that the time functions of this bean will return their values
Specified by:
setTimeUnit in interface PlanTask

getTiming

public Timing getTiming()
Returns the timing related with this task
Specified by:
getTiming in interface PlanTask

signalPlayPause

public void signalPlayPause(java.lang.String comment)
Receives a play/pause signal (ignored if task is finished yet)
Specified by:
signalPlayPause in interface PlanTask

signalStop

public void signalStop()
Receives a stop signal, which ends the task
Specified by:
signalStop in interface PlanTask

setEstimation

public void setEstimation(Estimation estimation)
Updates estimation
Specified by:
setEstimation in interface PlanTask

equals

public boolean equals(java.lang.Object other)
Two beans of this type are equals if and only if their ids are the same
Specified by:
equals in interface Task
Overrides:
equals in class java.lang.Object


Luis F. Canals. Supported by www.sourceforge.net