com.starteam
Class Task

java.lang.Object
  extended by com.starteam.TypedResource
      extended by com.starteam.LiveObject
          extended by com.starteam.TrackedObject
              extended by com.starteam.VersionedObject
                  extended by com.starteam.ViewMember
                      extended by com.starteam.Item
                          extended by com.starteam.TreeItem
                              extended by com.starteam.Task
All Implemented Interfaces:
ISecurable, Lockable, LockableObject, java.lang.Cloneable

public class Task
extends TreeItem

Represents a StarTeam Task item.


Nested Class Summary
static class Task.Constraint
          Task Constraint Type
static class Task.LifeCycleType
          Task LifeCycleType
static class Task.Origin
          Task Origin
static class Task.Priority
          Priority of the Task
static class Task.ProcessUsage
          Indicates the type of operation that created a given process task and its associated process links.
static class Task.Status
          Status of the Task
static class Task.TaskType
          Task Type
static class Task.Type
          Type meta-data (schema) for Task object instances
static class Task.WebCacheTask
          Item accessor for cached SDK Tasks contained objects are obtained from the artifact cache
 
Nested classes/interfaces inherited from class com.starteam.TreeItem
TreeItem.MoSCoW, TreeItem.WebCacheTreeItem
 
Nested classes/interfaces inherited from class com.starteam.Item
Item.WebCacheItem
 
Nested classes/interfaces inherited from class com.starteam.ViewMember
ViewMember.LockType, ViewMember.MyLock, ViewMember.ShareState, ViewMember.WebCacheViewMember
 
Nested classes/interfaces inherited from class com.starteam.VersionedObject
VersionedObject.WebCacheVersionedObject
 
Nested classes/interfaces inherited from class com.starteam.TrackedObject
TrackedObject.WebCacheTrackedObject
 
Nested classes/interfaces inherited from class com.starteam.LiveObject
LiveObject.WebCacheLiveObject
 
Nested classes/interfaces inherited from class com.starteam.TypedResource
TypedResource.BranchState
 
Constructor Summary
Task(Task parentTask)
          Creates a new task that is a subtask of an existing task.
 
Method Summary
 void addPredecessorLink(int predecessorID, int lagTime, int depType)
          Adds a new predecessor to this task.
 void addResource(User user)
          Adds the specified User object as a resource for this Task.
static Task create(Folder prnt)
          Create a Task in the specified parent folder.
 WorkRecord createWorkRecord(User user)
          Creates a new WorkRecord for the specified Task and user.
 void discard()
          This will discard all cached data associated with this task including changes made but not yet saved.
 Date getActualFinishDate()
          Returns the actual finish date of this task.
 Date getActualStartDate()
          Returns the actual start date of this task.
 TimeSpan getActualWorkToDate()
          Returns the actual number of hours spent on this task.
 java.lang.String getAttentionNotes()
          Returns the text in the "Needs Attention" note for this task.
 Task.Constraint getConstraint()
          Returns the MS Project Constraint Type of this task.
 DateTime getConstraintDate()
          Returns the task's Constraint Date from MS Project.
 DateTime getDependencyLastUpdate()
          Returns the date that a work record or task dependency (predecessor or successor) was last added to this task.
 java.lang.String getDescription()
          Returns the description for this task.
 Date getEstimatedFinishDate()
          Returns the estimated date at which this task will be completed.
 int getEstimatedFinishVariance()
          Returns the Estimated Finish Variance of this task.
 TimeSpan getEstimatedHoursVariance()
          Returns the Estimated Hours Variance of this task.
 Date getEstimatedStartDate()
          Returns the estimated start date of this task.
 int getEstimatedStartVariance()
          Returns the Estimated Start Variance of this task.
 TimeSpan getEstimatedTotalWork()
          Returns an estimate of the number of hours that will be spent completing this task.
 GUID getGUID()
          Returns the MS Project GUID of this task.
 Task.LifeCycleType getLifeCycleType()
          Returns a value indicating the life cycle type (e.g.
 java.lang.String getMSProjectFileName()
          Returns the MS Project FileName of this task.
 DateTime getMSProjectLastUpdate()
          Returns the date that this task was last updated from MS Project.
 Task.TaskType getMSProjectTaskType()
          Returns the task's type in MS Project.
 java.lang.String getName()
          Returns the Name of this task.
 java.lang.String getNotes()
          Returns the text in the "Notes" for this task.
 int getNumber()
          Returns the number assigned to this task.
 double getOrder()
          Returns the order in which the task should be worked on.
 DoubleProperty getOrderProperty()
          Returns a DoubleProperty used for ordering tree item instances Any TreeItem Type that intends to have the children of a particular parent ordered using a default numeric scheme must provide a double property to store the implicit order.
 Task.Origin getOrigin()
          Returns a value indicating the origin (e.g., StarTeam or MS Project) of this task.
 Story getParentStory()
          Return the Story containing this Task or null
 int getPercentComplete()
          Returns a percentage indicating how much of the task has been completed.
 TaskDependency[] getPredecessorLinks()
          Returns the predecessor tasks to this this task.
 Task.Priority getPriority()
          Returns the Priority of this task.
 Task.Type.PropertyCollection getProperties()
          Gets the PropertyCollection for this Task.
 int getResourceCount()
          Returns the number of resources assigned to this task.
 java.lang.String[] getResourceNames()
          Returns the names of the users assigned as resources of this task.
 User[] getResources()
          Returns the User objects assigned as resources of this task.
 User getResponsibility()
          Returns The User object who is responsible for this task.
 Content getRichDescription()
          Returns the Rich Description
 TimeSpan getScheduledCalendarTime()
          Returns the number of hours during which at least one user is working on this task.
 Task.Status getStatus()
          Returns the Status of this task.
 TaskDependency[] getSuccessorLinks()
          Returns the successor tasks to this task.
 java.lang.String getTeam()
          Returns the team for this task.
 int getUniqueID()
          Returns the MS Project UniqueID of this task.
 Task.ProcessUsage getUsage()
          Gets the usage of this task.
 java.lang.Object getValue(Property property)
          Returns the value of the property.
 java.lang.String getWBSCode()
          Returns the MS Project WBS Code of this task.
 int getWorkRecordCount()
          Returns the number of work records that have been added to this task.
 WorkRecord[] getWorkRecords()
          Returns the work records associates with this task.
 boolean isAttentionRequired()
          Returns a value that indicates whether or not this task needs attention.
 boolean isBlocked()
          Returns a value indicating whether or not this task is blocked and needs further attention to resolve.
 boolean isDirty()
          Returns true if this task has been modified and is need of updating.
 boolean isMilestone()
          Returns a value indicating whether or not this task represents a milestone.
 boolean isMyTask()
          Tell if the logged on user is responsible for this task.
 boolean isProcessTask()
          Determines whether or not this task is a process task.
 boolean isReplicated()
          Returns true if this task is replicated in MS Project.
static void populateTaskDependencies(Task[] tasks)
          Fetches the dependencies(predecessor/successors) that are associated with the given set of tasks in bulk using a single server command.
static void populateWorkRecords(Task[] tasks)
          Fetches the work records that are associated with the given set of tasks in bulk using a single server command.This command is supported only on servers from 12.0 release onwards.
 void remove()
          Removes this item from its current folder.
 void removeDependency(TaskDependency dependency)
          Removed the specified task dependency from this task.
 void removeResource(User user)
          Removes the specified User object as a resource from this task.
 void removeWorkRecord(WorkRecord record)
          Removes the work record from this task.
 void setActualFinishDate(Date ActualFinish)
          Sets the actual finish date of this task.
 void setActualStartDate(Date ActualStart)
          Sets the actual start date of this task.
 void setAttentionNotes(java.lang.String AttentionNotes)
          Sets the text in the "Needs Attention" note for this task.
 void setAttentionRequired(boolean bAttentionRequired)
          Sets the value that indicates whether or not this task needs attention.
 void setBlocked(boolean blocked)
          Sets the value indicating whether or not this task is blocked.
 void setDescription(java.lang.String Description)
          Sets the new description for this task.
 void setEstimatedFinishDate(Date EstimatedFinish)
          Sets the estimated date at which this task will be completed.
 void setEstimatedStartDate(Date EstimatedStart)
          Sets the estimated start date of this task.
 void setEstimatedTotalWork(TimeSpan ts)
          Set the estimate of the number of hours that will be spent completing this task
 void setLifeCycleType(Task.LifeCycleType lifeCycleType)
          Sets the value indicating the life cycle type (e.g.
 void setMilestone(boolean Milestone)
          Sets the value indicating whether or not this task represents a milestone.
 void setName(java.lang.String Name)
          Sets the Name of this task.
 void setNotes(java.lang.String Notes)
          Sets the text in the "Notes" for this task.
 void setOrder(double order)
          Sets the new order in which the task should be worked on.
 void setOrigin(Task.Origin origin)
          Sets the value indicating the origin (e.g., StarTeam or MS Project) of this task.
 void setPercentComplete(int PercentComplete)
          Sets the percentage indicating how much of the task has been completed.
 void setPriority(Task.Priority priority)
          Sets the Priority of this task.
 void setReplicated(boolean replicated)
          Sets whether or not this task is replicated in MS Project.
 void setResponsibility(User user)
          Sets the User who is responsible for this task.
 void setRichDescription(Content cntnt)
          Sets the the Rich Description for the task This property was introduced in 13.0 release of the server.
 void setScheduledCalendarTime(TimeSpan Duration)
          Sets the number of hours during which at least one user is working on this task.
 void setStatus(Task.Status status)
          Sets the Status of this task.
 void setTeam(java.lang.String team)
          Sets the new team for this task.
 void setUsage(Task.ProcessUsage usage)
          Sets the task usage.
 java.lang.Object setValue(Property property, java.lang.Object value)
          Sets the value of the specified property and return the old value.
 java.lang.String toString()
          Returns the name of this task.
 void update()
          Either stores this task in the server repository if the task is new or modifies an existing task.
 
Methods inherited from class com.starteam.TreeItem
createChild, getChildren, getParent, getParentID, hasChildren, isEqualTo, moveTo, moveTo, setAfter, setBefore, setBetween, setFirst, setLast, shareTo, smartShareTo
 
Methods inherited from class com.starteam.Item
copy, deleteMergePoint, getCommonAncestor, getDebugString, getDisplayableProperties, getItemID, getMergeHistory, getNewRevisionComment, getParentContainer, getParentFolder, getParentFolderHierarchy, getParentFolderName, getParentFolderPath, getParentFolderQualifiedName, getSharedChangePackages, getSharedTraces, isEqualTo, isReverseShareRecommended, recordMergePoint, resolve, resolveMergePoint, resolveMergePointEx, reverseShareTo, reverseShareTo
 
Methods inherited from class com.starteam.ViewMember
equals, findLinks, getAllLabels, getAllShares, getAttachedLabels, getAttachments, getBehavior, getCache, getComment, getDeletedBy, getDeletedTime, getDisplayValue, getDotNotation, getExclusiveLocker, getExternalID, getExternalURL, getFromHistory, getFromHistory, getFromHistory, getFromHistory, getHistory, getID, getIntegerArrayValue, getLocker, getMyLockType, getParentRevision, getPresentationID, getRights, getRootObjectID, getShare, getShare, getTraces, getView, getViewMemberRevisions, getViewVersion, getVMID, hashCode, hasPermissions, isBookmarked, isBranchable, isDeleted, isDisembodied, isEqualTo, isReadOnly, isRootShare, isUnread, lockExclusive, lockExclusive, lockNonExclusive, modifyBookmark, modifyReadStatus, putLock, setAttachments, setBehavior, setBranchOnChange, setComment, setExternalID, setExternalURL, setFixedConfiguration, setFloatingConfiguration, setRights, unlock, updateRevisionComment
 
Methods inherited from class com.starteam.VersionedObject
getBranchRevision, getRevisionNumber, getViewVersion, isFromHistory
 
Methods inherited from class com.starteam.TrackedObject
getModifiedBy, getModifiedTime
 
Methods inherited from class com.starteam.LiveObject
getCreatedBy, getCreatedTime, toStarTeamURL
 
Methods inherited from class com.starteam.TypedResource
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, hasCachedProperties, hasValue, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.starteam.ISecurable
getServer, getType
 

Constructor Detail

Task

public Task(Task parentTask)
Creates a new task that is a subtask of an existing task.

Parameters:
parentTask - The parent task.
Method Detail

create

public static Task create(Folder prnt)
Create a Task in the specified parent folder.

Parameters:
prnt - the parent folder
Returns:
a new Task Object.

getValue

public java.lang.Object getValue(Property property)
                          throws NoSuchPropertyException
Returns the value of the property. Retrieves value from persistent store if not already cached.

Overrides:
getValue in class ViewMember
Parameters:
property - the desired property
Returns:
the value of this property as a java.lang.Object
Throws:
com.starteam.NoSuchPropertyException - if the specified property is not valid for this item
NoSuchPropertyException

setValue

public java.lang.Object setValue(Property property,
                                 java.lang.Object value)
                          throws NoSuchPropertyException,
                                 java.lang.ClassCastException
Sets the value of the specified property and return the old value.

Overrides:
setValue in class ViewMember
Parameters:
property - the property to set
value - the new value to set for the specified property
Returns:
the old property value
Throws:
NoSuchPropertyException - if the named property does not exist
java.lang.ClassCastException - if the value is of the wrong type for the specified property

getProperties

public Task.Type.PropertyCollection getProperties()
Gets the PropertyCollection for this Task.


getEstimatedHoursVariance

public TimeSpan getEstimatedHoursVariance()
Returns the Estimated Hours Variance of this task.

Returns:
The Estimated Hours Variance of this task.
See Also:
Task.Type.PropertyCollection.ESTIMATED_HOURS_VARIANCE

getEstimatedStartVariance

public int getEstimatedStartVariance()
Returns the Estimated Start Variance of this task.

Returns:
The Estimated Start Variance of this task.
See Also:
Task.Type.PropertyCollection.ESTIMATED_START_VARIANCE

getEstimatedFinishVariance

public int getEstimatedFinishVariance()
Returns the Estimated Finish Variance of this task.

Returns:
The Estimated Finish Variance of this task.
See Also:
Task.Type.PropertyCollection.ESTIMATED_FINISH_VARIANCE

getScheduledCalendarTime

public TimeSpan getScheduledCalendarTime()
Returns the number of hours during which at least one user is working on this task.

Returns:
The TimeSpan during which at least one user is working on this task.
See Also:
Task.Type.PropertyCollection.DURATION

setScheduledCalendarTime

public void setScheduledCalendarTime(TimeSpan Duration)
Sets the number of hours during which at least one user is working on this task.

Parameters:
Duration - The number of hours during which at least one user is working on this task.

getNumber

public int getNumber()
Returns the number assigned to this task.

Returns:
The number assigned to this task.
See Also:
Task.Type.PropertyCollection.NUMBER

isAttentionRequired

public boolean isAttentionRequired()
Returns a value that indicates whether or not this task needs attention.

Returns:
A value that indicates whether or not this task needs attention.
See Also:
Task.Type.PropertyCollection.NEEDS_ATTENTION

setAttentionRequired

public void setAttentionRequired(boolean bAttentionRequired)
Sets the value that indicates whether or not this task needs attention.

Parameters:
bAttentionRequired - The new value that indicates whether or not this task needs attention.
See Also:
Task.Type.NeedsAttentionProperty.NAME

getName

public java.lang.String getName()
Returns the Name of this task.

Returns:
The Name of this task.
See Also:
Task.Type.PropertyCollection.NAME

setName

public void setName(java.lang.String Name)
Sets the Name of this task.

Parameters:
Name - The new Name for this task.
See Also:
Task.Type.PropertyCollection.NAME

getAttentionNotes

public java.lang.String getAttentionNotes()
Returns the text in the "Needs Attention" note for this task.

Returns:
The text in the "Needs Attention" note for this task.
See Also:
Task.Type.PropertyCollection.ATTENTION_NOTES

setAttentionNotes

public void setAttentionNotes(java.lang.String AttentionNotes)
Sets the text in the "Needs Attention" note for this task.

Parameters:
AttentionNotes - The text in the "Needs Attention" note for this task.
See Also:
Task.Type.PropertyCollection.ATTENTION_NOTES

getNotes

public java.lang.String getNotes()
Returns the text in the "Notes" for this task.

Returns:
The text in the "Notes" for this task.
See Also:
Task.Type.PropertyCollection.NOTES

setDescription

public void setDescription(java.lang.String Description)
Sets the new description for this task. This property was introduced in 12.0 release of the server.

Parameters:
Description - The new description for this task.
See Also:
Task.Type.PropertyCollection.DESCRIPTION

getDescription

public java.lang.String getDescription()
Returns the description for this task. This property was introduced in 12.0 release of the server.

Returns:
The description for this task.
See Also:
Task.Type.PropertyCollection.DESCRIPTION

setTeam

public void setTeam(java.lang.String team)
Sets the new team for this task. This property was introduced in 14.0 release of the server.

Parameters:
team - The new team for this task.
See Also:
Task.Type.PropertyCollection.TEAM

getTeam

public java.lang.String getTeam()
Returns the team for this task. This property was introduced in 14.0 release of the server.

Returns:
The team for this task.
See Also:
Task.Type.PropertyCollection.TEAM

getRichDescription

public Content getRichDescription()
Returns the Rich Description

Returns:
Rich Description used for this task
See Also:
TreeItem.Type.RichDescriptionProperty.NAME

setRichDescription

public void setRichDescription(Content cntnt)
Sets the the Rich Description for the task This property was introduced in 13.0 release of the server.

Parameters:
cntnt - the Content
See Also:
TreeItem.Type.RichDescriptionProperty.NAME

setOrder

public void setOrder(double order)
Sets the new order in which the task should be worked on. This property was introduced in 12.0 release of the server.

Parameters:
order - The new order for this task.
See Also:
Task.Type.PropertyCollection.ORDER

getOrder

public double getOrder()
Returns the order in which the task should be worked on.

Returns:
The order in which the task should be worked on.
See Also:
Task.Type.PropertyCollection.ORDER

getOrderProperty

public DoubleProperty getOrderProperty()
Returns a DoubleProperty used for ordering tree item instances Any TreeItem Type that intends to have the children of a particular parent ordered using a default numeric scheme must provide a double property to store the implicit order. Order is computed by aggregating and dividing the order of the precedent and antecedent tree items w.r.t. the one being ordered

Overrides:
getOrderProperty in class TreeItem
Returns:
a DoubleProperty used for ordering tree item instances

setNotes

public void setNotes(java.lang.String Notes)
Sets the text in the "Notes" for this task.

Parameters:
Notes - The new Notes text for this task.
See Also:
Task.Type.PropertyCollection.NOTES

getPercentComplete

public int getPercentComplete()
Returns a percentage indicating how much of the task has been completed.

Returns:
A percentage indicating how much of the task has been completed.
See Also:
Task.Type.PropertyCollection.PERCENT_COMPLETE

setPercentComplete

public void setPercentComplete(int PercentComplete)
Sets the percentage indicating how much of the task has been completed.

Parameters:
PercentComplete - The new percentage indicating how much of the task has been completed.

isBlocked

public boolean isBlocked()
Returns a value indicating whether or not this task is blocked and needs further attention to resolve. This property was introduced in 12.0 release of the server.

Returns:
A value indicating whether or not this task is blocked
See Also:
Task.Type.PropertyCollection.BLOCKED

setBlocked

public void setBlocked(boolean blocked)
Sets the value indicating whether or not this task is blocked. This property was introduced in 12.0 release of the server.

Parameters:
blocked - The new value indicating whether or not this task is blocked

isMilestone

public boolean isMilestone()
Returns a value indicating whether or not this task represents a milestone.

Returns:
A value indicating whether or not this task represents a milestone.
See Also:
Task.Type.PropertyCollection.MILESTONE

setMilestone

public void setMilestone(boolean Milestone)
Sets the value indicating whether or not this task represents a milestone.

Parameters:
Milestone - The new value indicating whether or not this task represents a milestone.

getMSProjectTaskType

public Task.TaskType getMSProjectTaskType()
Returns the task's type in MS Project.

Returns:
The task's type in MS Project.
See Also:
Task.Type.TaskTypeProperty.NAME

getPriority

public Task.Priority getPriority()
Returns the Priority of this task.

Returns:
The Priority of this task.
See Also:
Task.Type.PriorityProperty.NAME

setPriority

public void setPriority(Task.Priority priority)
Sets the Priority of this task.

Parameters:
priority - The new Priority for this task.

getConstraint

public Task.Constraint getConstraint()
Returns the MS Project Constraint Type of this task.

Returns:
The MS Project Constraint Type of this task.
See Also:
Task.Type.ConstraintProperty.NAME

getConstraintDate

public DateTime getConstraintDate()
Returns the task's Constraint Date from MS Project.

Returns:
The task's Constraint Date from MS Project.
See Also:
Task.Type.ConstraintDateProperty.NAME

getResponsibility

public User getResponsibility()
Returns The User object who is responsible for this task.

Returns:
The User object who is responsible for this task.
See Also:
Task.Type.ResponsibilityProperty.NAME

setResponsibility

public void setResponsibility(User user)
Sets the User who is responsible for this task.

Parameters:
user - The User who is responsible for this task.

getGUID

public GUID getGUID()
Returns the MS Project GUID of this task.

Returns:
The MS Project GUID of this task.
See Also:
Task.Type.GUIDProperty.NAME

getEstimatedTotalWork

public TimeSpan getEstimatedTotalWork()
Returns an estimate of the number of hours that will be spent completing this task.

Returns:
An estimate of the number of hours that will be spent completing this task.
See Also:
Task.Type.PropertyCollection.ESTIMATED_HOURS

setEstimatedTotalWork

public void setEstimatedTotalWork(TimeSpan ts)
Set the estimate of the number of hours that will be spent completing this task

Parameters:
ts - an estimate of the number of hours

getUniqueID

public int getUniqueID()
Returns the MS Project UniqueID of this task.

Returns:
The MS Project UniqueID of this task.
See Also:
Task.Type.UniqueIDProperty.NAME

getEstimatedStartDate

public Date getEstimatedStartDate()
Returns the estimated start date of this task.

Returns:
The estimated start date of this task.
See Also:
Task.Type.EstimatedStartProperty.NAME

setEstimatedStartDate

public void setEstimatedStartDate(Date EstimatedStart)
Sets the estimated start date of this task.

Parameters:
EstimatedStart - The new estimated start date of this task.

getWBSCode

public java.lang.String getWBSCode()
Returns the MS Project WBS Code of this task.

Returns:
The MS Project WBS Code of this task.
See Also:
Task.Type.WBSCodeProperty.NAME

getEstimatedFinishDate

public Date getEstimatedFinishDate()
Returns the estimated date at which this task will be completed.

Returns:
The estimated date at which this task will be completed.
See Also:
Task.Type.EstimatedFinishProperty.NAME

setEstimatedFinishDate

public void setEstimatedFinishDate(Date EstimatedFinish)
Sets the estimated date at which this task will be completed.

Parameters:
EstimatedFinish - The new estimated date at which this task will be completed.

getMSProjectFileName

public java.lang.String getMSProjectFileName()
Returns the MS Project FileName of this task.

Returns:
The MS Project FileName of this task.
See Also:
Task.Type.MSProjectFileNameProperty.NAME

getActualWorkToDate

public TimeSpan getActualWorkToDate()
Returns the actual number of hours spent on this task.

Returns:
The actual number of hours spent on this task.
See Also:
Task.Type.ActualHoursProperty.NAME

getMSProjectLastUpdate

public DateTime getMSProjectLastUpdate()
Returns the date that this task was last updated from MS Project.

Returns:
The date that this task was last updated from MS Project.
See Also:
Task.Type.MSProjectLastUpdateProperty.NAME

getActualStartDate

public Date getActualStartDate()
Returns the actual start date of this task.

Returns:
The actual start date of this task.
See Also:
Task.Type.ActualStartProperty.NAME

setActualStartDate

public void setActualStartDate(Date ActualStart)
Sets the actual start date of this task.

Parameters:
ActualStart - The actual start date of this task.

getActualFinishDate

public Date getActualFinishDate()
Returns the actual finish date of this task.

Returns:
The actual finish date of this task.
See Also:
Task.Type.ActualFinishProperty.NAME

setActualFinishDate

public void setActualFinishDate(Date ActualFinish)
Sets the actual finish date of this task.

Parameters:
ActualFinish - The actual start date of this task.

getResourceCount

public int getResourceCount()
Returns the number of resources assigned to this task.

Returns:
The number of resources assigned to this task.
See Also:
Task.Type.ResourceCountProperty.NAME

getResources

public User[] getResources()
Returns the User objects assigned as resources of this task.

Returns:
The User assigned as resources of this task.
See Also:
Task.Type.ResourcesProperty.NAME

getWorkRecordCount

public int getWorkRecordCount()
Returns the number of work records that have been added to this task.

Returns:
The number of work records that have been added to this task.
See Also:
Task.Type.WorkRecordCountProperty.NAME

getResourceNames

public java.lang.String[] getResourceNames()
Returns the names of the users assigned as resources of this task.

Returns:
The names of the users assigned as resources of this task.
See Also:
Task.Type.ResourceNamesProperty.NAME

isMyTask

public boolean isMyTask()
Tell if the logged on user is responsible for this task.

Returns:
A value indicating whether the logged on user is responsible for this task.
See Also:
Task.Type.IsMyTaskProperty.NAME

getLifeCycleType

public Task.LifeCycleType getLifeCycleType()
Returns a value indicating the life cycle type (e.g. Development, QA, Documentation or unknown) of this task. This property was introduced in 12.0 release of the server.

Returns:
A value indicating the lifecycle type (e.g., Development, QA, Documentation or unknown) of this task.

setLifeCycleType

public void setLifeCycleType(Task.LifeCycleType lifeCycleType)
Sets the value indicating the life cycle type (e.g. Development, QA, Documentation or unknown) of this task. This property was introduced in 12.0 release of the server.

Parameters:
lifeCycleType - the LifecycleType of this task
See Also:
Task.getLifeCycleType()

getOrigin

public Task.Origin getOrigin()
Returns a value indicating the origin (e.g., StarTeam or MS Project) of this task.

Returns:
A value indicating the origin (e.g., StarTeam or MS Project) of this task.
See Also:
Task.Type.OriginProperty.NAME

setOrigin

public void setOrigin(Task.Origin origin)
Sets the value indicating the origin (e.g., StarTeam or MS Project) of this task.

Parameters:
origin - the origin of this task
See Also:
Task.getOrigin(), Task.Type.OriginProperty.NAME

populateTaskDependencies

public static void populateTaskDependencies(Task[] tasks)
Fetches the dependencies(predecessor/successors) that are associated with the given set of tasks in bulk using a single server command. This command is supported only on servers from 12.0 release onwards.

Parameters:
tasks - list of tasks whose work records are required
Throws:
java.lang.IllegalArgumentException - if the given list of tasks do not belong to the same view and view configuration

populateWorkRecords

public static void populateWorkRecords(Task[] tasks)
Fetches the work records that are associated with the given set of tasks in bulk using a single server command.This command is supported only on servers from 12.0 release onwards.

Parameters:
tasks - list of tasks whose work records are required
Throws:
java.lang.IllegalArgumentException - if the given list of tasks do not belong to the same view and view configuration

getStatus

public Task.Status getStatus()
Returns the Status of this task.

Returns:
The Status of this task.
See Also:
Task.Type.StatusProperty.NAME

getParentStory

public Story getParentStory()
Return the Story containing this Task or null

Returns:
the Story containing this Task

setStatus

public void setStatus(Task.Status status)
Sets the Status of this task.

Parameters:
status - the new Status for this task.
See Also:
Task.Type.StatusProperty.NAME

getDependencyLastUpdate

public DateTime getDependencyLastUpdate()
Returns the date that a work record or task dependency (predecessor or successor) was last added to this task.

Returns:
The date that a work record or task dependency (predecessor or successor) was last added to this task.
See Also:
Task.Type.WorkDependencyLastUpdateProperty.NAME

getWorkRecords

public WorkRecord[] getWorkRecords()
Returns the work records associates with this task.

Returns:
The work records associates with this task.

removeWorkRecord

public void removeWorkRecord(WorkRecord record)
Removes the work record from this task. The work record must already be associated with this task or an exception will be thrown.

Parameters:
record - the work record to be removed.

getPredecessorLinks

public TaskDependency[] getPredecessorLinks()
Returns the predecessor tasks to this this task. The predecessors are represented by a TaskDependency object.

Returns:
The predecessor tasks to this this task.

addPredecessorLink

public void addPredecessorLink(int predecessorID,
                               int lagTime,
                               int depType)
Adds a new predecessor to this task.

Parameters:
predecessorID - the task id of the predecessor task
lagTime - the lag time for this dependency
depType - the dependency type.

removeDependency

public void removeDependency(TaskDependency dependency)
Removed the specified task dependency from this task. The dependency must be either a successor or predecessor to this task or an exception will be thrown.

Parameters:
dependency - the task dependency to remove

getSuccessorLinks

public TaskDependency[] getSuccessorLinks()
Returns the successor tasks to this task. The successors are represented by a TaskDependency object.

Returns:
The successor tasks to this this task.

addResource

public void addResource(User user)
Adds the specified User object as a resource for this Task.

Parameters:
user - the User object to add as a resource for this task,

removeResource

public void removeResource(User user)
Removes the specified User object as a resource from this task.

Parameters:
user - the User object resource to remove from this task.

update

public void update()
Either stores this task in the server repository if the task is new or modifies an existing task.

Overrides:
update in class TreeItem
See Also:
TypedResource.isNew()

remove

public void remove()
Removes this item from its current folder. Child items, if any, are also removed.

Overrides:
remove in class TreeItem

discard

public void discard()
This will discard all cached data associated with this task including changes made but not yet saved.

See Also:
CacheService.discard()

isDirty

public boolean isDirty()
Returns true if this task has been modified and is need of updating.

Overrides:
isDirty in class TypedResource
Returns:
true if this task has been modified and is need of updating.
See Also:
Task.update()

isReplicated

public boolean isReplicated()
Returns true if this task is replicated in MS Project.

Returns:
true if this task is replicated in MS Project.
See Also:
Task.getOrigin(), Task.Type.PropertyCollection.IS_REPLICATED

setReplicated

public void setReplicated(boolean replicated)
Sets whether or not this task is replicated in MS Project.

Parameters:
replicated - true if the task should be marked as replicated in MS project
See Also:
Task.getOrigin(), Task.setOrigin(com.starteam.Task.Origin), Task.Type.PropertyCollection.IS_REPLICATED

createWorkRecord

public WorkRecord createWorkRecord(User user)
Creates a new WorkRecord for the specified Task and user.

Parameters:
user - the the user that performs the work

setUsage

public void setUsage(Task.ProcessUsage usage)
Sets the task usage. The usage determines whether or not this is a process task and, if so, the type of operation that created the task and its process links.

Internally, how the usage is stored depends on the StarTeam server version number. StarTeam server versions 9.5 and later have a system-defined TASK_USAGE property. Earlier servers may have a functionally equivalent TASK_USAGE_90 custom property. For earlier servers that have not been customized, setUsage() will trigger a NoSuchPropertyException.

Parameters:
usage - The usage of this task.
See Also:
Task.Type.ProcessUsageProperty.NAME

getUsage

public Task.ProcessUsage getUsage()
Gets the usage of this task.

Returns:
The task usage. The usage determines whether or not this is a process task and, if so, the type of operation that created the task and its process links.

isProcessTask

public boolean isProcessTask()
Determines whether or not this task is a process task.

Returns:
true if this task is a process task; false otherwise.
See Also:
Task.getUsage(), ProcessItem

toString

public java.lang.String toString()
Returns the name of this task.

Overrides:
toString in class Item
Returns:
the name of this task.


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.