public class Task extends ResourcesContainer
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_COLLECTOR |
static int |
TYPE_MILESTONE |
static int |
TYPE_PHASE |
static int |
TYPE_TASK |
static int |
TYPE_TOPIC |
Constructor and Description |
---|
Task(IExternable taskOrPhase,
java.lang.String text,
int type)
Constructor
|
Task(java.lang.String text,
int type)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addChildTask(Task task)
Adds an sub task
|
Task[] |
getChildTasks()
Returns all child tasks
|
java.util.Date |
getDeadline()
Returns the deadline date of the task
|
java.lang.String |
getDescription()
Returns the description of the task
|
int |
getDurationInHours()
Returns the duration in hours
|
java.util.Date |
getEndDate()
Returns the end date/time of the task
|
java.lang.String |
getExternalId()
Returns the unique identifier of the task in the external application
|
int |
getPercentComplete()
Returns the percent complete value
|
java.util.Date |
getStartDate()
Returns the start date/time of the task
|
java.lang.String |
getText()
Returns the text of the task (name)
|
int |
getType()
Returns the type of the task
|
boolean |
isCollector()
Convenience method for checking the task type.
|
boolean |
isMilestone()
Convenience method for checking the task type
|
boolean |
isPhase()
Convenience method for checking the task type
|
boolean |
isTask()
Convenience method for checking the task type
|
boolean |
isTopic()
Convenience method for checking the task type
|
boolean |
isType(int type)
Compares the equality of types
|
void |
setDeadline(java.util.Date deadline)
Sets the deadline date of the task
|
void |
setDescription(java.lang.String description)
Sets the description of the task
|
void |
setDurationInHours(int durationInHours)
Sets the duration in hours
|
void |
setEndDate(java.util.Date endDate)
Sets the end date/time of the task
|
void |
setExternalId(java.lang.String externalId)
Sets the unique identifier of the task in the external application
|
void |
setPercentComplete(int percentComplete)
Sets the percent complete value
|
void |
setStartDate(java.util.Date startDate)
Sets the start date/time of the task
|
addResource, getResources
public static final int TYPE_TASK
public static final int TYPE_PHASE
public static final int TYPE_TOPIC
public static final int TYPE_MILESTONE
public static final int TYPE_COLLECTOR
public Task(IExternable taskOrPhase, java.lang.String text, int type)
taskOrPhase
- reference to the corresponding LLworkplace task object.text
- nametype
- type (e.g. TYPE_TASK, TYPE_PHASE, ...)public Task(java.lang.String text, int type)
text
- nametype
- type (e.g. TYPE_TASK, TYPE_PHASE, ...)public void addChildTask(Task task)
task
- the child taskpublic Task[] getChildTasks()
public boolean isTask()
public boolean isPhase()
public boolean isTopic()
public boolean isMilestone()
public boolean isCollector()
public boolean isType(int type)
type
- comparison typepublic int getDurationInHours()
public void setDurationInHours(int durationInHours)
durationInHours
- duration in hourspublic java.lang.String getText()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- descriptionpublic int getType()
public java.lang.String getExternalId()
public void setExternalId(java.lang.String externalId)
externalId
- external unique identifierpublic int getPercentComplete()
public void setPercentComplete(int percentComplete)
percentComplete
- percent complete valuepublic java.util.Date getStartDate()
public void setStartDate(java.util.Date startDate)
startDate
- start date of the taskpublic java.util.Date getEndDate()
public void setEndDate(java.util.Date endDate)
endDate
- end date of the taskpublic java.util.Date getDeadline()
public void setDeadline(java.util.Date deadline)
deadline
- deadline date