net.sf.mpxj
Class ResourceAssignment

java.lang.Object
  extended by net.sf.mpxj.ResourceAssignment
All Implemented Interfaces:
FieldContainer

public final class ResourceAssignment
extends Object
implements FieldContainer

This class represents a resource assignment record from an MPX file.


Field Summary
static Double DEFAULT_UNITS
          Default units value: 100%.
 
Constructor Summary
ResourceAssignment(ProjectFile file)
          Constructor.
 
Method Summary
 void addFieldListener(FieldListener listener)
          Add a listener to receive field events.
 ResourceAssignmentWorkgroupFields addWorkgroupAssignment()
          This method allows a resource assignment workgroup fields record to be added to the current resource assignment.
 void disableEvents()
          Disable events firing when fields are updated.
 void enableEvents()
          Enable events firing when fields are updated.
 Number getActualCost()
          Returns the actual cost for this resource assignment.
 Date getActualFinish()
          Retrieve the actual finish date.
 Number getActualOvertimeCost()
          Returns the actual overtime cost of this resource assignment.
 Duration getActualOvertimeWork()
          Returns the actual overtime work of this resource assignment.
 Date getActualStart()
          Retrieve the actual start date.
 Duration getActualWork()
          Returns the actual completed work of this resource assignment.
 Number getACWP()
          Retrieve the ACWP value.
 Number getBaselineBudgetCost()
          Retrieves the baseline budget cost.
 Number getBaselineBudgetCost(int baselineNumber)
          Retrieve a baseline value.
 Duration getBaselineBudgetWork()
          Retrieves the baseline budget work value.
 Duration getBaselineBudgetWork(int baselineNumber)
          Retrieve a baseline value.
 Number getBaselineCost()
          Returns the planned cost for this resource assignment.
 Number getBaselineCost(int baselineNumber)
          Retrieve a baseline value.
 Date getBaselineFinish()
          Retrieve the baseline finish date.
 Date getBaselineFinish(int baselineNumber)
          Retrieve a baseline value.
 Date getBaselineStart()
          Retrieve the baseline start date.
 Date getBaselineStart(int baselineNumber)
          Retrieve a baseline value.
 Duration getBaselineWork()
          Returns the baseline work of this resource assignment.
 Duration getBaselineWork(int baselineNumber)
          Retrieve a baseline value.
 Number getBCWP()
          The BCWP (budgeted cost of work performed) field contains the cumulative value of the assignment's timephased percent complete multiplied by the assignment's timephased baseline cost.
 Number getBCWS()
          The BCWS (budgeted cost of work scheduled) field contains the cumulative timephased baseline costs up to the status date or today's date.
 Number getBudgetCost()
          Retrieves the budget cost.
 Duration getBudgetWork()
          Retrieves the budget work value.
 Object getCachedValue(FieldType field)
          Retrieve a field value.
 ProjectCalendar getCalendar()
          Retrieves the calendar used for this resource assignment.
 boolean getConfirmed()
          The Confirmed field indicates whether all resources assigned to a task have accepted or rejected the task assignment in response to a TeamAssign message regarding their assignments.
 Number getCost()
          Returns the cost of this resource assignment.
 Number getCost(int index)
          Retrieve a cost value.
 CostRateTable getCostRateTable()
          Returns the cost rate table for this assignment.
 int getCostRateTableIndex()
          Returns the cost rate table index for this assignment.
 Number getCostVariance()
          The Cost Variance field shows the difference between the baseline cost and total cost for a task.
 Date getCreateDate()
          The Created field contains the date and time when a task was added to the project.
 Object getCurrentValue(FieldType field)
          Retrieve a field value.
 Number getCV()
          The CV (earned value cost variance) field shows the difference between how much it should have cost to achieve the current level of completion on the task, and how much it has actually cost to achieve the current level of completion up to the status date or today's date.
 Date getDate(int index)
          Retrieve a date value.
 Duration getDelay()
          Returns the delay for this resource assignment.
 Duration getDuration(int index)
          Retrieve a duration value.
 Number getEnterpriseCost(int index)
          Retrieve an enterprise cost value.
 Date getEnterpriseDate(int index)
          Retrieve an enterprise date value.
 Duration getEnterpriseDuration(int index)
          Retrieve an enterprise duration value.
 boolean getEnterpriseFlag(int index)
          Retrieve an enterprise flag value.
 Number getEnterpriseNumber(int index)
          Retrieve an enterprise number value.
 String getEnterpriseText(int index)
          Retrieve an enterprise text value.
 Date getFinish()
          Returns the finish date for this resource assignment.
 Date getFinish(int index)
          Retrieve a finish value.
 Duration getFinishVariance()
          Calculate the finish variance.
 boolean getFlag(int index)
          Retrieve a flag value.
 UUID getGUID()
          Retrieve the task GUID.
 boolean getHasTimephasedData()
          Retrieve a flag indicating if this resource assignment has timephased data associated with it.
 String getHyperlink()
          Retrieves the task hyperlink attribute.
 String getHyperlinkAddress()
          Retrieves the task hyperlink address attribute.
 String getHyperlinkScreenTip()
          Retrieves the hyperlink screen tip attribute.
 String getHyperlinkSubAddress()
          Retrieves the task hyperlink sub-address attribute.
 Duration getLevelingDelay()
          Retrieves the leveling delay for this resource assignment.
 boolean getLinkedFields()
          The Linked Fields field indicates whether there are OLE links to the task, either from elsewhere in the active project, another Microsoft Project file, or from another program.
 String getNotes()
          The Notes field contains notes that you can enter about a task.
 Number getNumber(int index)
          Retrieve a number value.
 Number getOvertimeCost()
          Returns the overtime cost of this resource assignment.
 Duration getOvertimeWork()
          Returns the overtime work done of this resource assignment.
 ProjectFile getParentFile()
          Accessor method allowing retrieval of ProjectFile reference.
 Number getPercentageWorkComplete()
          The % Work Complete field contains the current status of a task, expressed as the percentage of the task's work that has been completed.
 Duration getRegularWork()
          Returns the regular work of this resource assignment.
 Number getRemainingCost()
          Returns the remaining cost of this resource assignment.
 Number getRemainingOvertimeCost()
          Returns the remaining overtime cost of this resource assignment.
 Duration getRemainingOvertimeWork()
          Returns the remaining overtime work of this resource assignment.
 Duration getRemainingWork()
          Returns the remaining work for this resource assignment.
 Resource getResource()
          This method retrieves a reference to the resource with which this assignment is associated.
 Integer getResourceUniqueID()
          Returns the resources unique id for this resource assignment.
 boolean getResponsePending()
          Retrieves a flag to indicate if a response has been received from a resource assigned to a task.
 Date getStart()
          Returns the start of this resource assignment.
 Date getStart(int index)
          Retrieve a start value.
 Duration getStartVariance()
          Calculate the start variance.
 Number getSV()
          The SV (earned value schedule variance) field shows the difference in cost terms between the current progress and the baseline plan of the task up to the status date or today's date.
 Task getTask()
          This method retrieves a reference to the task with which this assignment is associated.
 Integer getTaskUniqueID()
          Retrieve the parent task unique ID.
 boolean getTeamStatusPending()
          Retrieves a flag to indicate if a response has been received from a resource assigned to a task.
 String getText(int index)
          Retrieve a text value.
 List<TimephasedCost> getTimephasedActualCost()
          Retrieves the timephased breakdown of actual cost.
 List<TimephasedWork> getTimephasedActualOvertimeWork()
          Retrieves the timephased breakdown of the actual overtime work for this resource assignment.
 List<TimephasedWork> getTimephasedActualWork()
          Retrieves the timephased breakdown of the completed work for this resource assignment.
 List<TimephasedCost> getTimephasedBaselineCost(int index)
          Retrieve timephased baseline cost.
 List<TimephasedWork> getTimephasedBaselineWork(int index)
          Retrieve timephased baseline work.
 List<TimephasedCost> getTimephasedCost()
          Retrieves the timephased breakdown of cost.
 List<TimephasedWork> getTimephasedOvertimeWork()
          Retrieves the timephased breakdown of the planned overtime work for this resource assignment.
 List<TimephasedWork> getTimephasedWork()
          Retrieves the timephased breakdown of the planned work for this resource assignment.
 Integer getUniqueID()
          Retrieve the unique ID of this resource assignment.
 Number getUnits()
          Returns the units of this resource assignment.
 boolean getUpdateNeeded()
          The Update Needed field indicates whether a TeamUpdate message should be sent to the assigned resources because of changes to the start date, finish date, or resource reassignments of the task.
 Number getVAC()
          Returns the VAC for this resource assignment.
 TimeUnit getVariableRateUnits()
          Retrieve the variable rate time units, null if fixed rate.
 Duration getWork()
          Returns the work of this resource assignment.
 WorkContour getWorkContour()
          This method returns the Work Contour type of this Assignment.
 ResourceAssignmentWorkgroupFields getWorkgroupAssignment()
          Gets the Resource Assignment Workgroup Fields if one exists.
 Duration getWorkVariance()
          The Work Variance field contains the difference between a task's baseline work and the currently scheduled work.
 void remove()
          Removes this resource assignment from the project.
 void removeFieldListener(FieldListener listener)
          Remove a listener.
 void set(FieldType field, Object value)
          Set a field value.
 void setActualCost(Number actualCost)
          Sets the actual cost so far incurred for this resource assignment.
 void setActualFinish(Date finish)
          Set the actual finish date.
 void setActualOvertimeCost(Number cost)
          Sets the actual overtime cost for this resource assignment.
 void setActualOvertimeWork(Duration dur)
          Sets the actual overtime work for this resource assignment.
 void setActualStart(Date start)
          Set the actual start date.
 void setActualWork(Duration val)
          Sets the actual completed work for this resource assignment.
 void setACWP(Number acwp)
          Set the ACWP value.
 void setBaselineBudgetCost(int baselineNumber, Number value)
          Set a baseline value.
 void setBaselineBudgetCost(Number cost)
          Sets the baseline budget cost.
 void setBaselineBudgetWork(Duration work)
          Sets the baseline budget work value.
 void setBaselineBudgetWork(int baselineNumber, Duration value)
          Set a baseline value.
 void setBaselineCost(int baselineNumber, Number value)
          Set a baseline value.
 void setBaselineCost(Number val)
          Sets the planned cost for this resource assignment.
 void setBaselineFinish(Date finish)
          Set the baseline finish date.
 void setBaselineFinish(int baselineNumber, Date value)
          Set a baseline value.
 void setBaselineStart(Date start)
          Set the baseline start date.
 void setBaselineStart(int baselineNumber, Date value)
          Set a baseline value.
 void setBaselineWork(Duration val)
          Sets the baseline work for this resource assignment.
 void setBaselineWork(int baselineNumber, Duration value)
          Set a baseline value.
 void setBCWP(Number val)
          The BCWP (budgeted cost of work performed) field contains the cumulative value of the assignment's timephased percent complete multiplied by the assignments timephased baseline cost.
 void setBCWS(Number val)
          The BCWS (budgeted cost of work scheduled) field contains the cumulative timephased baseline costs up to the status date or today's date.
 void setBudgetCost(Number cost)
          Sets the budget cost.
 void setBudgetWork(Duration work)
          Sets the budget work value.
 void setConfirmed(boolean val)
          The Confirmed field indicates whether all resources assigned to a task have accepted or rejected the task assignment in response to a TeamAssign message regarding their assignments.
 void setCost(int index, Number value)
          Set a cost value.
 void setCost(Number cost)
          Sets the cost for this resource assignment.
 void setCostRateTableIndex(int index)
          Sets the index of the cost rate table for this assignment.
 void setCostVariance(Number val)
          The Cost Variance field shows the difference between the baseline cost and total cost for a task.
 void setCreateDate(Date val)
          The Created field contains the date and time when a task was added to the project.
 void setCV(Number val)
          The CV (earned value cost variance) field shows the difference between how much it should have cost to achieve the current level of completion on the task, and how much it has actually cost to achieve the current level of completion up to the status date or today's date.
 void setDate(int index, Date value)
          Set a date value.
 void setDelay(Duration dur)
          Sets the delay for this resource assignment.
 void setDuration(int index, Duration value)
          Set a duration value.
 void setEnterpriseCost(int index, Number value)
          Set an enterprise cost value.
 void setEnterpriseDate(int index, Date value)
          Set an enterprise date value.
 void setEnterpriseDuration(int index, Duration value)
          Set an enterprise duration value.
 void setEnterpriseFlag(int index, boolean value)
          Set an enterprise flag value.
 void setEnterpriseNumber(int index, Number value)
          Set an enterprise number value.
 void setEnterpriseText(int index, String value)
          Set an enterprise text value.
 void setFinish(Date val)
          Sets the finish date for this resource assignment.
 void setFinish(int index, Date value)
          Set a finish value.
 void setFinishVariance(Duration duration)
          The Finish Variance field contains the amount of time that represents the difference between a task's baseline finish date and its forecast or actual finish date.
 void setFlag(int index, boolean value)
          Set a flag value.
 void setGUID(UUID value)
          Set the task GUID.
 void setHyperlink(String text)
          Sets the task hyperlink attribute.
 void setHyperlinkAddress(String text)
          Sets the task hyperlink address attribute.
 void setHyperlinkScreenTip(String text)
          Sets the hyperlink screen tip attribute.
 void setHyperlinkSubAddress(String text)
          Sets the task hyperlink sub address attribute.
 void setLevelingDelay(Duration levelingDelay)
          Sets the leveling delay for this resource assignment.
 void setLinkedFields(boolean flag)
          The Linked Fields field indicates whether there are OLE links to the task, either from elsewhere in the active project, another Microsoft Project file, or from another program.
 void setNotes(String notes)
          This method is used to add notes to the current task.
 void setNumber(int index, Number value)
          Set a number value.
 void setOvertimeCost(Number cost)
          Sets the overtime cost for this resource assignment.
 void setOvertimeWork(Duration overtimeWork)
          Sets the overtime work for this resource assignment.
 void setPercentageWorkComplete(Number val)
          The % Work Complete field contains the current status of a task, expressed as the percentage of the task's work that has been completed.
 void setRegularWork(Duration dur)
          Sets the regular work for this resource assignment.
 void setRemainingCost(Number cost)
          Sets the remaining cost for this resource assignment.
 void setRemainingOvertimeCost(Number cost)
          Sets the remaining overtime cost for this resource assignment.
 void setRemainingOvertimeWork(Duration dur)
          Sets the remaining overtime work for this resource assignment.
 void setRemainingWork(Duration remainingWork)
          Sets the remaining work for this resource assignment.
 void setResourceUniqueID(Integer val)
          Sets the resources unique id for this resource assignment.
 void setResponsePending(boolean val)
          Sets a flag to indicate if a response has been received from a resource assigned to a task.
 void setStart(Date val)
          Sets the start date for this resource assignment.
 void setStart(int index, Date value)
          Set a start value.
 void setStartVariance(Duration val)
          The Start Variance field contains the amount of time that represents the difference between a task's baseline start date and its currently scheduled start date.
 void setSV(Number val)
          The SV (earned value schedule variance) field shows the difference in cost terms between the current progress and the baseline plan of the task up to the status date or today's date.
 void setTaskUniqueID(Integer id)
          Set the parent task unique ID.
 void setTeamStatusPending(boolean val)
          Sets a flag to indicate if a response has been received from a resource assigned to a task.
 void setText(int index, String value)
          Set a text value.
 void setTimephasedActualOvertimeWork(TimephasedWorkData data)
          Sets the timephased breakdown of the actual overtime work for this assignment.
 void setTimephasedActualWork(TimephasedWorkData data)
          Sets the timephased breakdown of the completed work for this resource assignment.
 void setTimephasedBaselineCost(int index, TimephasedCostData data)
          Set timephased baseline cost.
 void setTimephasedBaselineWork(int index, TimephasedWorkData data)
          Set timephased baseline work.
 void setTimephasedWork(TimephasedWorkData data)
          Sets the timephased breakdown of the planned work for this resource assignment.
 void setUniqueID(Integer uniqueID)
          Set the unique ID of this resource assignment.
 void setUnits(Number val)
          Sets the units for this resource assignment.
 void setUpdateNeeded(boolean val)
          The Update Needed field indicates whether a TeamUpdate message should be sent to the assigned resources because of changes to the start date, finish date, or resource reassignments of the task.
 void setVAC(Number value)
          Sets VAC for this resource assignment.
 void setVariableRateUnits(TimeUnit variableRateUnits)
          Set the variable rate time units, null if fixed rate.
 void setWork(Duration dur)
          Sets the work for this resource assignment.
 void setWorkContour(WorkContour workContour)
          This method sets the Work Contour type of this Assignment.
 void setWorkVariance(Duration val)
          The Work Variance field contains the difference between a task's baseline work and the currently scheduled work.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_UNITS

public static final Double DEFAULT_UNITS
Default units value: 100%.

Constructor Detail

ResourceAssignment

public ResourceAssignment(ProjectFile file)
Constructor.

Parameters:
file - The parent file to which this record belongs.
Method Detail

addWorkgroupAssignment

public ResourceAssignmentWorkgroupFields addWorkgroupAssignment()
                                                         throws MPXJException
This method allows a resource assignment workgroup fields record to be added to the current resource assignment. A maximum of one of these records can be added to a resource assignment record.

Returns:
ResourceAssignmentWorkgroupFields object
Throws:
MPXJException - if MSP defined limit of 1 is exceeded

getUniqueID

public Integer getUniqueID()
Retrieve the unique ID of this resource assignment.

Returns:
resource assignment unique ID

setUniqueID

public void setUniqueID(Integer uniqueID)
Set the unique ID of this resource assignment.

Parameters:
uniqueID - resource assignment unique ID

getUnits

public Number getUnits()
Returns the units of this resource assignment.

Returns:
units

setUnits

public void setUnits(Number val)
Sets the units for this resource assignment.

Parameters:
val - units

getWork

public Duration getWork()
Returns the work of this resource assignment.

Returns:
work

setWork

public void setWork(Duration dur)
Sets the work for this resource assignment.

Parameters:
dur - work

getBaselineStart

public Date getBaselineStart()
Retrieve the baseline start date.

Returns:
baseline start date

setBaselineStart

public void setBaselineStart(Date start)
Set the baseline start date.

Parameters:
start - baseline start date

getActualStart

public Date getActualStart()
Retrieve the actual start date.

Returns:
actual start date

setActualStart

public void setActualStart(Date start)
Set the actual start date.

Parameters:
start - actual start date

getBaselineFinish

public Date getBaselineFinish()
Retrieve the baseline finish date.

Returns:
baseline finish date

setBaselineFinish

public void setBaselineFinish(Date finish)
Set the baseline finish date.

Parameters:
finish - baseline finish

getActualFinish

public Date getActualFinish()
Retrieve the actual finish date.

Returns:
actual finish date

setActualFinish

public void setActualFinish(Date finish)
Set the actual finish date.

Parameters:
finish - actual finish

getBaselineWork

public Duration getBaselineWork()
Returns the baseline work of this resource assignment.

Returns:
planned work

setBaselineWork

public void setBaselineWork(Duration val)
Sets the baseline work for this resource assignment.

Parameters:
val - planned work

getActualWork

public Duration getActualWork()
Returns the actual completed work of this resource assignment.

Returns:
completed work

setActualWork

public void setActualWork(Duration val)
Sets the actual completed work for this resource assignment.

Parameters:
val - actual completed work

getOvertimeWork

public Duration getOvertimeWork()
Returns the overtime work done of this resource assignment.

Returns:
overtime work

setOvertimeWork

public void setOvertimeWork(Duration overtimeWork)
Sets the overtime work for this resource assignment.

Parameters:
overtimeWork - overtime work

getCost

public Number getCost()
Returns the cost of this resource assignment.

Returns:
cost

setCost

public void setCost(Number cost)
Sets the cost for this resource assignment.

Parameters:
cost - cost

getBaselineCost

public Number getBaselineCost()
Returns the planned cost for this resource assignment.

Returns:
planned cost

setBaselineCost

public void setBaselineCost(Number val)
Sets the planned cost for this resource assignment.

Parameters:
val - planned cost

getActualCost

public Number getActualCost()
Returns the actual cost for this resource assignment.

Returns:
actual cost

setActualCost

public void setActualCost(Number actualCost)
Sets the actual cost so far incurred for this resource assignment.

Parameters:
actualCost - actual cost

getStart

public Date getStart()
Returns the start of this resource assignment.

Returns:
start date

setStart

public void setStart(Date val)
Sets the start date for this resource assignment.

Parameters:
val - start date

getFinish

public Date getFinish()
Returns the finish date for this resource assignment.

Returns:
finish date

setFinish

public void setFinish(Date val)
Sets the finish date for this resource assignment.

Parameters:
val - finish date

getDelay

public Duration getDelay()
Returns the delay for this resource assignment.

Returns:
delay

setDelay

public void setDelay(Duration dur)
Sets the delay for this resource assignment.

Parameters:
dur - delay

getResourceUniqueID

public Integer getResourceUniqueID()
Returns the resources unique id for this resource assignment.

Returns:
resources unique id

setResourceUniqueID

public void setResourceUniqueID(Integer val)
Sets the resources unique id for this resource assignment.

Parameters:
val - resources unique id

getWorkgroupAssignment

public ResourceAssignmentWorkgroupFields getWorkgroupAssignment()
Gets the Resource Assignment Workgroup Fields if one exists.

Returns:
workgroup assignment object

getTask

public Task getTask()
This method retrieves a reference to the task with which this assignment is associated.

Returns:
task

getResource

public Resource getResource()
This method retrieves a reference to the resource with which this assignment is associated.

Returns:
resource

getWorkContour

public WorkContour getWorkContour()
This method returns the Work Contour type of this Assignment.

Returns:
the Work Contour type

setWorkContour

public void setWorkContour(WorkContour workContour)
This method sets the Work Contour type of this Assignment.

Parameters:
workContour - the Work Contour type

remove

public void remove()
Removes this resource assignment from the project.


getRemainingWork

public Duration getRemainingWork()
Returns the remaining work for this resource assignment.

Returns:
remaining work

setRemainingWork

public void setRemainingWork(Duration remainingWork)
Sets the remaining work for this resource assignment.

Parameters:
remainingWork - remaining work

getLevelingDelay

public Duration getLevelingDelay()
Retrieves the leveling delay for this resource assignment.

Returns:
leveling delay

setLevelingDelay

public void setLevelingDelay(Duration levelingDelay)
Sets the leveling delay for this resource assignment.

Parameters:
levelingDelay - leveling delay

getTimephasedActualWork

public List<TimephasedWork> getTimephasedActualWork()
Retrieves the timephased breakdown of the completed work for this resource assignment.

Returns:
timephased completed work

setTimephasedActualWork

public void setTimephasedActualWork(TimephasedWorkData data)
Sets the timephased breakdown of the completed work for this resource assignment.

Parameters:
data - timephased data

getTimephasedWork

public List<TimephasedWork> getTimephasedWork()
Retrieves the timephased breakdown of the planned work for this resource assignment.

Returns:
timephased planned work

setTimephasedWork

public void setTimephasedWork(TimephasedWorkData data)
Sets the timephased breakdown of the planned work for this resource assignment.

Parameters:
data - timephased data

getTimephasedOvertimeWork

public List<TimephasedWork> getTimephasedOvertimeWork()
Retrieves the timephased breakdown of the planned overtime work for this resource assignment.

Returns:
timephased planned work

setTimephasedActualOvertimeWork

public void setTimephasedActualOvertimeWork(TimephasedWorkData data)
Sets the timephased breakdown of the actual overtime work for this assignment.

Parameters:
data - timephased work

getTimephasedActualOvertimeWork

public List<TimephasedWork> getTimephasedActualOvertimeWork()
Retrieves the timephased breakdown of the actual overtime work for this resource assignment.

Returns:
timephased planned work

getTimephasedCost

public List<TimephasedCost> getTimephasedCost()
Retrieves the timephased breakdown of cost.

Returns:
timephased cost

getTimephasedActualCost

public List<TimephasedCost> getTimephasedActualCost()
Retrieves the timephased breakdown of actual cost.

Returns:
timephased actual cost

getHasTimephasedData

public boolean getHasTimephasedData()
Retrieve a flag indicating if this resource assignment has timephased data associated with it.

Returns:
true if this resource assignment has timephased data

setTimephasedBaselineWork

public void setTimephasedBaselineWork(int index,
                                      TimephasedWorkData data)
Set timephased baseline work. Note that index 0 represents "Baseline", index 1 represents "Baseline1" and so on.

Parameters:
index - baseline index
data - timephased data

setTimephasedBaselineCost

public void setTimephasedBaselineCost(int index,
                                      TimephasedCostData data)
Set timephased baseline cost. Note that index 0 represents "Baseline", index 1 represents "Baseline1" and so on.

Parameters:
index - baseline index
data - timephased data

getTimephasedBaselineWork

public List<TimephasedWork> getTimephasedBaselineWork(int index)
Retrieve timephased baseline work. Note that index 0 represents "Baseline", index 1 represents "Baseline1" and so on.

Parameters:
index - baseline index
Returns:
timephased work, or null if no baseline is present

getTimephasedBaselineCost

public List<TimephasedCost> getTimephasedBaselineCost(int index)
Retrieve timephased baseline cost. Note that index 0 represents "Baseline", index 1 represents "Baseline1" and so on.

Parameters:
index - baseline index
Returns:
timephased work, or null if no baseline is present

getCalendar

public ProjectCalendar getCalendar()
Retrieves the calendar used for this resource assignment.

Returns:
ProjectCalendar instance

getVariableRateUnits

public TimeUnit getVariableRateUnits()
Retrieve the variable rate time units, null if fixed rate.

Returns:
variable rate time units

setVariableRateUnits

public void setVariableRateUnits(TimeUnit variableRateUnits)
Set the variable rate time units, null if fixed rate.

Parameters:
variableRateUnits - variable rate units

setTaskUniqueID

public void setTaskUniqueID(Integer id)
Set the parent task unique ID.

Parameters:
id - task unique ID

getTaskUniqueID

public Integer getTaskUniqueID()
Retrieve the parent task unique ID.

Returns:
task unique ID

getBudgetCost

public Number getBudgetCost()
Retrieves the budget cost.

Returns:
budget cost

setBudgetCost

public void setBudgetCost(Number cost)
Sets the budget cost.

Parameters:
cost - budget cost

getBudgetWork

public Duration getBudgetWork()
Retrieves the budget work value.

Returns:
budget work

setBudgetWork

public void setBudgetWork(Duration work)
Sets the budget work value.

Parameters:
work - budget work

getBaselineBudgetCost

public Number getBaselineBudgetCost()
Retrieves the baseline budget cost.

Returns:
baseline budget cost

setBaselineBudgetCost

public void setBaselineBudgetCost(Number cost)
Sets the baseline budget cost.

Parameters:
cost - baseline budget cost

getBaselineBudgetWork

public Duration getBaselineBudgetWork()
Retrieves the baseline budget work value.

Returns:
baseline budget work

setBaselineBudgetWork

public void setBaselineBudgetWork(Duration work)
Sets the baseline budget work value.

Parameters:
work - baseline budget work

setBaselineCost

public void setBaselineCost(int baselineNumber,
                            Number value)
Set a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
value - baseline value

setBaselineWork

public void setBaselineWork(int baselineNumber,
                            Duration value)
Set a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
value - baseline value

getBaselineWork

public Duration getBaselineWork(int baselineNumber)
Retrieve a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
Returns:
baseline value

getBaselineCost

public Number getBaselineCost(int baselineNumber)
Retrieve a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
Returns:
baseline value

setBaselineStart

public void setBaselineStart(int baselineNumber,
                             Date value)
Set a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
value - baseline value

getBaselineStart

public Date getBaselineStart(int baselineNumber)
Retrieve a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
Returns:
baseline value

setBaselineFinish

public void setBaselineFinish(int baselineNumber,
                              Date value)
Set a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
value - baseline value

getBaselineFinish

public Date getBaselineFinish(int baselineNumber)
Retrieve a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
Returns:
baseline value

setBaselineBudgetCost

public void setBaselineBudgetCost(int baselineNumber,
                                  Number value)
Set a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
value - baseline value

setBaselineBudgetWork

public void setBaselineBudgetWork(int baselineNumber,
                                  Duration value)
Set a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
value - baseline value

getBaselineBudgetWork

public Duration getBaselineBudgetWork(int baselineNumber)
Retrieve a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
Returns:
baseline value

getBaselineBudgetCost

public Number getBaselineBudgetCost(int baselineNumber)
Retrieve a baseline value.

Parameters:
baselineNumber - baseline index (1-10)
Returns:
baseline value

setText

public void setText(int index,
                    String value)
Set a text value.

Parameters:
index - text index (1-30)
value - text value

getText

public String getText(int index)
Retrieve a text value.

Parameters:
index - text index (1-30)
Returns:
text value

setStart

public void setStart(int index,
                     Date value)
Set a start value.

Parameters:
index - start index (1-30)
value - start value

getStart

public Date getStart(int index)
Retrieve a start value.

Parameters:
index - start index (1-30)
Returns:
start value

setFinish

public void setFinish(int index,
                      Date value)
Set a finish value.

Parameters:
index - finish index (1-30)
value - finish value

getFinish

public Date getFinish(int index)
Retrieve a finish value.

Parameters:
index - finish index (1-30)
Returns:
finish value

setDate

public void setDate(int index,
                    Date value)
Set a date value.

Parameters:
index - date index (1-30)
value - date value

getDate

public Date getDate(int index)
Retrieve a date value.

Parameters:
index - date index (1-30)
Returns:
date value

setNumber

public void setNumber(int index,
                      Number value)
Set a number value.

Parameters:
index - number index (1-30)
value - number value

getNumber

public Number getNumber(int index)
Retrieve a number value.

Parameters:
index - number index (1-30)
Returns:
number value

setDuration

public void setDuration(int index,
                        Duration value)
Set a duration value.

Parameters:
index - duration index (1-30)
value - duration value

getDuration

public Duration getDuration(int index)
Retrieve a duration value.

Parameters:
index - duration index (1-30)
Returns:
duration value

setCost

public void setCost(int index,
                    Number value)
Set a cost value.

Parameters:
index - cost index (1-30)
value - cost value

getCost

public Number getCost(int index)
Retrieve a cost value.

Parameters:
index - cost index (1-30)
Returns:
cost value

setFlag

public void setFlag(int index,
                    boolean value)
Set a flag value.

Parameters:
index - flag index (1-30)
value - flag value

getFlag

public boolean getFlag(int index)
Retrieve a flag value.

Parameters:
index - flag index (1-30)
Returns:
flag value

setEnterpriseCost

public void setEnterpriseCost(int index,
                              Number value)
Set an enterprise cost value.

Parameters:
index - cost index (1-30)
value - cost value

getEnterpriseCost

public Number getEnterpriseCost(int index)
Retrieve an enterprise cost value.

Parameters:
index - cost index (1-30)
Returns:
cost value

setEnterpriseDate

public void setEnterpriseDate(int index,
                              Date value)
Set an enterprise date value.

Parameters:
index - date index (1-30)
value - date value

getEnterpriseDate

public Date getEnterpriseDate(int index)
Retrieve an enterprise date value.

Parameters:
index - date index (1-30)
Returns:
date value

setEnterpriseDuration

public void setEnterpriseDuration(int index,
                                  Duration value)
Set an enterprise duration value.

Parameters:
index - duration index (1-30)
value - duration value

getEnterpriseDuration

public Duration getEnterpriseDuration(int index)
Retrieve an enterprise duration value.

Parameters:
index - duration index (1-30)
Returns:
duration value

setEnterpriseFlag

public void setEnterpriseFlag(int index,
                              boolean value)
Set an enterprise flag value.

Parameters:
index - flag index (1-20)
value - flag value

getEnterpriseFlag

public boolean getEnterpriseFlag(int index)
Retrieve an enterprise flag value.

Parameters:
index - flag index (1-20)
Returns:
flag value

setEnterpriseNumber

public void setEnterpriseNumber(int index,
                                Number value)
Set an enterprise number value.

Parameters:
index - number index (1-40)
value - number value

getEnterpriseNumber

public Number getEnterpriseNumber(int index)
Retrieve an enterprise number value.

Parameters:
index - number index (1-40)
Returns:
number value

setEnterpriseText

public void setEnterpriseText(int index,
                              String value)
Set an enterprise text value.

Parameters:
index - text index (1-40)
value - text value

getEnterpriseText

public String getEnterpriseText(int index)
Retrieve an enterprise text value.

Parameters:
index - text index (1-40)
Returns:
text value

getRegularWork

public Duration getRegularWork()
Returns the regular work of this resource assignment.

Returns:
work

setRegularWork

public void setRegularWork(Duration dur)
Sets the regular work for this resource assignment.

Parameters:
dur - work

getActualOvertimeWork

public Duration getActualOvertimeWork()
Returns the actual overtime work of this resource assignment.

Returns:
work

setActualOvertimeWork

public void setActualOvertimeWork(Duration dur)
Sets the actual overtime work for this resource assignment.

Parameters:
dur - work

getRemainingOvertimeWork

public Duration getRemainingOvertimeWork()
Returns the remaining overtime work of this resource assignment.

Returns:
work

setRemainingOvertimeWork

public void setRemainingOvertimeWork(Duration dur)
Sets the remaining overtime work for this resource assignment.

Parameters:
dur - work

getOvertimeCost

public Number getOvertimeCost()
Returns the overtime cost of this resource assignment.

Returns:
cost

setOvertimeCost

public void setOvertimeCost(Number cost)
Sets the overtime cost for this resource assignment.

Parameters:
cost - cost

getRemainingCost

public Number getRemainingCost()
Returns the remaining cost of this resource assignment.

Returns:
cost

setRemainingCost

public void setRemainingCost(Number cost)
Sets the remaining cost for this resource assignment.

Parameters:
cost - cost

getActualOvertimeCost

public Number getActualOvertimeCost()
Returns the actual overtime cost of this resource assignment.

Returns:
cost

setActualOvertimeCost

public void setActualOvertimeCost(Number cost)
Sets the actual overtime cost for this resource assignment.

Parameters:
cost - cost

getRemainingOvertimeCost

public Number getRemainingOvertimeCost()
Returns the remaining overtime cost of this resource assignment.

Returns:
cost

setRemainingOvertimeCost

public void setRemainingOvertimeCost(Number cost)
Sets the remaining overtime cost for this resource assignment.

Parameters:
cost - cost

setBCWP

public void setBCWP(Number val)
The BCWP (budgeted cost of work performed) field contains the cumulative value of the assignment's timephased percent complete multiplied by the assignments timephased baseline cost. BCWP is calculated up to the status date or todays date. This information is also known as earned value.

Parameters:
val - the amount to be set

getBCWP

public Number getBCWP()
The BCWP (budgeted cost of work performed) field contains the cumulative value of the assignment's timephased percent complete multiplied by the assignment's timephased baseline cost. BCWP is calculated up to the status date or today's date. This information is also known as earned value.

Returns:
currency amount as float

setBCWS

public void setBCWS(Number val)
The BCWS (budgeted cost of work scheduled) field contains the cumulative timephased baseline costs up to the status date or today's date.

Parameters:
val - the amount to set

getBCWS

public Number getBCWS()
The BCWS (budgeted cost of work scheduled) field contains the cumulative timephased baseline costs up to the status date or today's date.

Returns:
currency amount as float

getACWP

public Number getACWP()
Retrieve the ACWP value.

Returns:
ACWP value

setACWP

public void setACWP(Number acwp)
Set the ACWP value.

Parameters:
acwp - ACWP value

setSV

public void setSV(Number val)
The SV (earned value schedule variance) field shows the difference in cost terms between the current progress and the baseline plan of the task up to the status date or today's date. You can use SV to check costs to determine whether tasks are on schedule.

Parameters:
val - - currency amount

getSV

public Number getSV()
The SV (earned value schedule variance) field shows the difference in cost terms between the current progress and the baseline plan of the task up to the status date or today's date. You can use SV to check costs to determine whether tasks are on schedule.

Returns:
-earned value schedule variance

setCV

public void setCV(Number val)
The CV (earned value cost variance) field shows the difference between how much it should have cost to achieve the current level of completion on the task, and how much it has actually cost to achieve the current level of completion up to the status date or today's date.

Parameters:
val - value to set

getCV

public Number getCV()
The CV (earned value cost variance) field shows the difference between how much it should have cost to achieve the current level of completion on the task, and how much it has actually cost to achieve the current level of completion up to the status date or today's date. How Calculated CV is the difference between BCWP (budgeted cost of work performed) and ACWP (actual cost of work performed). Microsoft Project calculates the CV as follows: CV = BCWP - ACWP

Returns:
sum of earned value cost variance

setCostVariance

public void setCostVariance(Number val)
The Cost Variance field shows the difference between the baseline cost and total cost for a task. The total cost is the current estimate of costs based on actual costs and remaining costs. This is also referred to as variance at completion (VAC).

Parameters:
val - amount

getCostVariance

public Number getCostVariance()
The Cost Variance field shows the difference between the baseline cost and total cost for a task. The total cost is the current estimate of costs based on actual costs and remaining costs. This is also referred to as variance at completion (VAC).

Returns:
amount

setPercentageWorkComplete

public void setPercentageWorkComplete(Number val)
The % Work Complete field contains the current status of a task, expressed as the percentage of the task's work that has been completed. You can enter percent work complete, or you can have Microsoft Project calculate it for you based on actual work on the task.

Parameters:
val - value to be set

getPercentageWorkComplete

public Number getPercentageWorkComplete()
The % Work Complete field contains the current status of a task, expressed as the percentage of the task's work that has been completed. You can enter percent work complete, or you can have Microsoft Project calculate it for you based on actual work on the task.

Returns:
percentage as float

setNotes

public void setNotes(String notes)
This method is used to add notes to the current task.

Parameters:
notes - notes to be added

getNotes

public String getNotes()
The Notes field contains notes that you can enter about a task. You can use task notes to help maintain a history for a task.

Returns:
notes

setConfirmed

public void setConfirmed(boolean val)
The Confirmed field indicates whether all resources assigned to a task have accepted or rejected the task assignment in response to a TeamAssign message regarding their assignments.

Parameters:
val - boolean value

getConfirmed

public boolean getConfirmed()
The Confirmed field indicates whether all resources assigned to a task have accepted or rejected the task assignment in response to a TeamAssign message regarding their assignments.

Returns:
boolean

setUpdateNeeded

public void setUpdateNeeded(boolean val)
The Update Needed field indicates whether a TeamUpdate message should be sent to the assigned resources because of changes to the start date, finish date, or resource reassignments of the task.

Parameters:
val - - boolean

getUpdateNeeded

public boolean getUpdateNeeded()
The Update Needed field indicates whether a TeamUpdate message should be sent to the assigned resources because of changes to the start date, finish date, or resource reassignments of the task.

Returns:
true if needed.

setLinkedFields

public void setLinkedFields(boolean flag)
The Linked Fields field indicates whether there are OLE links to the task, either from elsewhere in the active project, another Microsoft Project file, or from another program.

Parameters:
flag - boolean value

getLinkedFields

public boolean getLinkedFields()
The Linked Fields field indicates whether there are OLE links to the task, either from elsewhere in the active project, another Microsoft Project file, or from another program.

Returns:
boolean

getHyperlink

public String getHyperlink()
Retrieves the task hyperlink attribute.

Returns:
hyperlink attribute

getHyperlinkAddress

public String getHyperlinkAddress()
Retrieves the task hyperlink address attribute.

Returns:
hyperlink address attribute

getHyperlinkSubAddress

public String getHyperlinkSubAddress()
Retrieves the task hyperlink sub-address attribute.

Returns:
hyperlink sub address attribute

setHyperlink

public void setHyperlink(String text)
Sets the task hyperlink attribute.

Parameters:
text - hyperlink attribute

setHyperlinkAddress

public void setHyperlinkAddress(String text)
Sets the task hyperlink address attribute.

Parameters:
text - hyperlink address attribute

setHyperlinkSubAddress

public void setHyperlinkSubAddress(String text)
Sets the task hyperlink sub address attribute.

Parameters:
text - hyperlink sub address attribute

setWorkVariance

public void setWorkVariance(Duration val)
The Work Variance field contains the difference between a task's baseline work and the currently scheduled work.

Parameters:
val - - duration

getWorkVariance

public Duration getWorkVariance()
The Work Variance field contains the difference between a task's baseline work and the currently scheduled work.

Returns:
Duration representing duration.

setStartVariance

public void setStartVariance(Duration val)
The Start Variance field contains the amount of time that represents the difference between a task's baseline start date and its currently scheduled start date.

Parameters:
val - - duration

getStartVariance

public Duration getStartVariance()
Calculate the start variance.

Returns:
start variance

setFinishVariance

public void setFinishVariance(Duration duration)
The Finish Variance field contains the amount of time that represents the difference between a task's baseline finish date and its forecast or actual finish date.

Parameters:
duration - duration value

getFinishVariance

public Duration getFinishVariance()
Calculate the finish variance.

Returns:
finish variance

getCreateDate

public Date getCreateDate()
The Created field contains the date and time when a task was added to the project.

Returns:
Date

setCreateDate

public void setCreateDate(Date val)
The Created field contains the date and time when a task was added to the project.

Parameters:
val - date

getGUID

public UUID getGUID()
Retrieve the task GUID.

Returns:
task GUID

setGUID

public void setGUID(UUID value)
Set the task GUID.

Parameters:
value - task GUID

setResponsePending

public void setResponsePending(boolean val)
Sets a flag to indicate if a response has been received from a resource assigned to a task.

Parameters:
val - boolean value

getResponsePending

public boolean getResponsePending()
Retrieves a flag to indicate if a response has been received from a resource assigned to a task.

Returns:
boolean value

setTeamStatusPending

public void setTeamStatusPending(boolean val)
Sets a flag to indicate if a response has been received from a resource assigned to a task.

Parameters:
val - boolean value

getTeamStatusPending

public boolean getTeamStatusPending()
Retrieves a flag to indicate if a response has been received from a resource assigned to a task.

Returns:
boolean value

setVAC

public void setVAC(Number value)
Sets VAC for this resource assignment.

Parameters:
value - VAC value

getVAC

public Number getVAC()
Returns the VAC for this resource assignment.

Returns:
VAC value

setCostRateTableIndex

public void setCostRateTableIndex(int index)
Sets the index of the cost rate table for this assignment.

Parameters:
index - cost rate table index

getCostRateTableIndex

public int getCostRateTableIndex()
Returns the cost rate table index for this assignment.

Returns:
cost rate table index

getCostRateTable

public CostRateTable getCostRateTable()
Returns the cost rate table for this assignment.

Returns:
cost rate table index

getHyperlinkScreenTip

public String getHyperlinkScreenTip()
Retrieves the hyperlink screen tip attribute.

Returns:
hyperlink screen tip attribute

setHyperlinkScreenTip

public void setHyperlinkScreenTip(String text)
Sets the hyperlink screen tip attribute.

Parameters:
text - hyperlink screen tip attribute

toString

public String toString()

Overrides:
toString in class Object

set

public void set(FieldType field,
                Object value)
Set a field value.

Specified by:
set in interface FieldContainer
Parameters:
field - field identifier
value - field value

addFieldListener

public void addFieldListener(FieldListener listener)
Add a listener to receive field events.

Specified by:
addFieldListener in interface FieldContainer
Parameters:
listener - target listener

removeFieldListener

public void removeFieldListener(FieldListener listener)
Remove a listener.

Specified by:
removeFieldListener in interface FieldContainer
Parameters:
listener - target listener

getCachedValue

public Object getCachedValue(FieldType field)
Retrieve a field value. Use the cached value. Do not attempt to calculate a value if the cached value is null.

Specified by:
getCachedValue in interface FieldContainer
Parameters:
field - field identifier
Returns:
field value

getCurrentValue

public Object getCurrentValue(FieldType field)
Retrieve a field value. If the cached value is null, attempt to calculate the current value.

Specified by:
getCurrentValue in interface FieldContainer
Parameters:
field - field identifier
Returns:
field value

disableEvents

public void disableEvents()
Disable events firing when fields are updated.


enableEvents

public void enableEvents()
Enable events firing when fields are updated. This is the default state.


getParentFile

public final ProjectFile getParentFile()
Accessor method allowing retrieval of ProjectFile reference.

Returns:
reference to this the parent ProjectFile instance


Copyright © 2012. All Rights Reserved.