|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.projmgmt.msproject.mppobject.MPPObject
wt.projmgmt.msproject.mppobject.MPPExecutionObject
wt.projmgmt.msproject.mppobject.MPPTask
An object that represents data from a Microsoft Project
Plan Task
.
Field Summary | |
private TimeToElapse |
afterDeadline
|
private TimeToElapse |
beforeDeadline
|
private Collection |
deliverables
|
private ExecutionConfiguration |
executionConfiguration
|
private static Vector |
managers
|
private Collection |
Notebooks
|
private MPPExecutionObject |
parent
|
private Map |
preds
|
private static String |
RESOURCE
|
private Collection |
resources
|
private Currency |
rolledUpCurrentCost
|
private Timestamp |
rolledUpEstFinish
|
private Work |
rolledUpPerformedWork
|
private Currency |
rolledUpTotalCost
|
private Work |
rolledUpTotalWork
|
Fields inherited from class wt.projmgmt.msproject.mppobject.MPPExecutionObject |
|
Fields inherited from class wt.projmgmt.msproject.mppobject.MPPObject |
|
Constructor Summary | |
MPPTask()
|
Method Summary | |
void |
addAllPredecessors(Map preds)
Add all the precedence relationships that are defined in the specified map. |
ExecutionObject |
addDeliverable(ExecutionObject exec_obj,
Deliverable deliverable)
Add a Deliverable to the
ExecutionObject |
private ProjectActivity |
addOwnerResource(ProjectActivity act)
|
private static ProjectNode |
addPred(ProjectNode node,
ProjectNode predecessor,
ProjectLinkType linkType)
Add a predecessor to the specified node . |
void |
addPredecessor(Long uid,
ProjectLinkType type)
Add a new precedence relationship to this task. |
private static ProjectNode |
addToSummary(SummaryActivity summary,
ProjectNode node)
Add the specified node to the specified summary . |
void |
assignResource(MPPResource resource)
Assign a new resource to this task. |
void |
clearPredecessors()
Remove all precedence relationships from this task. |
private Milestone |
createMilestone(ProjectPlan plan)
Create a new Milestone in the
specified ProjectPlan . |
protected Persistable |
createPersistable()
Create a new Persistable that is of the correct
type for this object. |
private ProjectActivity |
createProjectActivity(ProjectPlan plan)
Create a new ProjectActivity in the
specified ProjectPlan . |
private ProjectProxy |
createProjectProxy(ProjectPlan plan)
Create a new ProjectProxy in the
specified ProjectPlan . |
private SummaryActivity |
createSummaryActivity(ProjectPlan plan)
Create a new SummaryActivity in the
specified ProjectPlan . |
protected void |
doDataRollUp()
Roll up data from this object's contained objects. |
TimeToElapse |
getAfterDeadline()
Get the afterDeadline value that is associated with this task. |
TimeToElapse |
getBeforeDeadline()
Get the beforeDeadline value that is associated with this task. |
ProjectCategory |
getCategory()
Get the category for this execution object that is specified in the XML . |
Collection |
getDeliverables()
Get the deliverables that are associated with this task. |
ExecutionConfiguration |
getExecutionConfiguration()
Get the ExecutionConfiguration that is associated with this task. |
protected String |
getGenericName()
Return a generic name fo the this object. |
ProjectHealthStatus |
getHealthStatus()
Get the ProjectHealthStatus for this
object that is specified in the XML . |
private Vector |
getManagers(ExecutionObject exObj)
|
protected String |
getNameElement()
Return the name of the XML element that should
be used to obtain the value of this object's name. |
Collection |
getNotebooks()
Get the Notebooks that are associated with this task. |
private PersonResource |
getOnlyPersonResource()
If this task has a single person resource assigned to it then return that person resource. |
int |
getOutlineLevel()
Get the OutlineLevel of this task. |
WTPrincipal |
getOwner()
Get the owner of this execution object that is specified in the XML . |
MPPExecutionObject |
getParent()
Get the parent of this task. |
private PersonResource |
getPersonResource(String name)
Get the PersonResource that is
defined in the XML and has the specified name. |
private MPPTask |
getPredecessor(long uid)
Get the predecessor MPPTask
that has the specified UID . |
Map |
getPredecessors()
Return the predecessors for this task. |
ProjectNode |
getProjectNode()
Get the persistable ProjectNode that
this object corresponds to. |
Collection |
getResources()
Return a collection of the resources assigned to this task. |
Currency |
getRolledUpCurrentCost()
If this task is a milestone, return the current cost that is rolled up from this task's deliverables. |
Timestamp |
getRolledUpEstFinish()
Return the latest estimated finish date for this task's deliverables. |
int |
getRolledUpPercentComplete()
If this task is a milestone, return the percent complete that is rolled up from this task's deliverables. |
Work |
getRolledUpPerformedWork()
If this task is a milestone, return the performed work that is rolled up from this task's deliverables. |
Currency |
getRolledUpTotalCost()
If this task is a milestone, return the total cost that is rolled up from this task's deliverables. |
Work |
getRolledUpTotalWork()
If this task is a milestone, return the total work that is rolled up from this task's deliverables. |
boolean |
hasDeliverables()
Return true if the task has deliverables. |
boolean |
isActivity()
Return true if this task is not a summary,
milestone or sub-project. |
boolean |
isContainer()
Return true if this object is a container for other
project plan nodes. |
boolean |
isHasAssignments()
Return true if this task has resources assigned
to it. |
boolean |
isMilestone()
Return true if this task is a milestone. |
boolean |
isOwnable()
Return true if the ownership of this object should
be assigned to the owner specified in the XML . |
boolean |
isPredecessor(long uid)
Returns true if the specified
MPPTask is a predecessor
of this task. |
boolean |
isRollUpCost()
Return true if the total cost and actual cost of this task are rolled-up. |
boolean |
isRollUpFinishDate()
Roll up the finish date if one of the following is true: this is a summary this is a sub-project this is an activity this is a milestone and it doesn't have any deliverables associated with it this is a milestone that has at least one associated deliverable and the rolled-up estimated finish date is the same as the estimated finish date that is specified in the XML data |
boolean |
isRollUpPercentComplete()
Return true if the percent complete of this task is rolled-up. |
boolean |
isRollUpStatus()
Return true if the health status of this task is rolled-up. |
boolean |
isRollUpWork()
Return true if the total work and actual work of this task are rolled-up. |
boolean |
isStartAtEndOfDay()
A task starts at the end of the day when the following are true: timeToStart is computed duration is zero one of the following is true: the node starts at the same time as its parent and its parent starts at the end of the day the node has predecessors and its start time is equal to the finish time of one of those predecessors, or |
boolean |
isSubProject()
Return true if this task is a sub-project. |
boolean |
isSummary()
Return true if this task is a summary task. |
protected boolean |
isValidPersistable(Persistable p)
Make sure that the specified Persistable is
of the right type for this object. |
private void |
parseDelis()
Parse the deliverable string that is stored on this task and add the referenced deliverables to the deliverable collection. |
private void |
parseMiscFields()
Parse the combined string (Notebook-Executionconfiguration) that is stored on this task and set the appropriate member variables for later use . |
private void |
parseNotebooks(String NotebookStr)
Parse the Notebook string that is stored on this task and add the referenced Notebooks to the Notebook collection. |
protected void |
printImpl()
|
protected Persistable |
refreshPersistable()
Retrieve the Persistable that corresponds to this
object from the database. |
void |
setParent(MPPExecutionObject parent)
Set the parent of this task. |
ExecutionObject |
updateBeforeAfterDeadline(ExecutionObject exObj)
Update/Add the values for TimeToDeadline and TimePastDeadline These are stored in the PTC.MISC field (if not existing, then the defaults from the Constants are used -- see parseMiscFields) |
ProjectNode |
updateContainmentLinks(ProjectNode node)
Update the containment links of the specified ProjectNode based on the data in this task. |
ExecutionObject |
updateDeliverables(ExecutionObject exObj)
Update the Deliverable s that are
associated with this object's persistable. |
ExecutionObject |
updateExecutionConfiguration(ExecutionObject exObj)
Update selected attributes of this object's {@link wt.projmgmt.execution.ExecutionConfiguration that are associated with this object's persistable. |
ExecutionObject |
updateNotebooks(ExecutionObject exObj)
Update the Notebook s that are
associated with this object's persistable. |
Persistable |
updatePersistable(Persistable p)
Update values on the ExecutionObject based on the data in this
MPPExecutionObject . |
ProjectNode |
updatePredecessors(ProjectNode node)
Update the predecessors of the specified ProjectNode based on the data in this task. |
protected ProjectNode |
updateProjectNode(ProjectNode node)
Update the values that are specific to ProjectNode s. |
Methods inherited from class wt.projmgmt.msproject.mppobject.MPPObject |
compareTo, containsKey, entrySet, get, getCurrentDate, getID, getImportInfo, getName, getObjectIdentifier, getPersistable, getPersistableClass, getPersistableID, getPlan, getProjectPlan, getUID, keySet, print, printMsg, printNoUpdate, printNoUpdate, printRollUp, printUpdate, printUpdate, put, savePersistable, setID, setPersistable, setPlan, toString, updatePersistableCache |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static Vector managers
private final Collection resources
private Collection Notebooks
private ExecutionConfiguration executionConfiguration
private TimeToElapse beforeDeadline
private TimeToElapse afterDeadline
private Collection deliverables
private Timestamp rolledUpEstFinish
private Work rolledUpTotalWork
private Work rolledUpPerformedWork
private Currency rolledUpTotalCost
private Currency rolledUpCurrentCost
private MPPExecutionObject parent
private final Map preds
Constructor Detail |
public MPPTask()
Method Detail |
protected final String getGenericName()
MPPObject
getGenericName
in class MPPObject
protected final String getNameElement()
MPPObject
XML
element that should
be used to obtain the value of this object's name.
getNameElement
in class MPPObject
public final boolean isContainer()
MPPObject
true
if this object is a container for other
project plan nodes. Plans, summary activities and subprojects are
considered to be containers.
isContainer
in class MPPObject
public final boolean isSummary()
true
if this task is a summary task.
If this task is marked as a summary and a subproject, then it is considered a subproject by ProjectLink and this method will return false.
public final boolean isMilestone()
true
if this task is a milestone.
If this task is marked as a milestone and as a summary
task, then it is considered a summary task by ProjectLink
and this method will return false
.
If this task is marked as a milestone and has resources
assigned to it, then it is considered an activity by
ProjectLink and this method will return false
.
public final boolean isSubProject()
true
if this task is a sub-project.
public final boolean isActivity()
true
if this task is not a summary,
milestone or sub-project.
private Vector getManagers(ExecutionObject exObj) throws WTException
WTException
public void assignResource(MPPResource resource)
resource
- the resource being assigned to this taskpublic final boolean isHasAssignments()
true
if this task has resources assigned
to it.
public final Collection getResources()
public final Collection getNotebooks()
If necessary, this method parses the list of Notebooks that is stored on the task. It looks for Notebooks that exist in ProjectLink with the specified IDs. If a matching Notebook cannot be found then it is not added to the list. This method never creates new Notebooks.
private final void parseNotebooks(String NotebookStr)
This is a provate helper method that is used by
parseMiscFields
.
public final ExecutionConfiguration getExecutionConfiguration()
If necessary, this method parses the combined string (Notebook-Executionconfiguration) stored on the task. It looks for the ExecutionConfiguration object of this task as it was exported
private final void parseMiscFields()
Since M010, the Notebook textfield was renamed to MISC.
the MISC textfield contains NoteBookReference-ExecutionConfiguration|BeforeDeadline|AfterDeadline There are 4 possible scenarios:
public final TimeToElapse getBeforeDeadline()
If necessary, this method parses the MISC textfield that is stored on the task.
public final TimeToElapse getAfterDeadline()
If necessary, this method parses the MISC textfield that is stored on the task.
public final Collection getDeliverables()
If necessary, this method parses the list of deliverables that is stored on the task. It looks for deliverables that exist in ProjectLink with the specified IDs. If a matching deliverable cannot be found then it is not added to the list. This method never creates new deliverables.
private final void parseDelis()
This is a provate helper method that is used by
getDeliverables
.
public final boolean hasDeliverables()
true
if the task has deliverables. Otherwise,
return false
.
public final Timestamp getRolledUpEstFinish()
new Timestamp(0)
).
public final Work getRolledUpTotalWork()
public final Work getRolledUpPerformedWork()
public final int getRolledUpPercentComplete()
public final Currency getRolledUpTotalCost()
public final Currency getRolledUpCurrentCost()
protected final void doDataRollUp() throws WTException
MPPExecutionObject
This default implementation rolls up status information from this object's children.
doDataRollUp
in class MPPExecutionObject
WTException
public final boolean isStartAtEndOfDay()
isStartAtEndOfDay
in class MPPExecutionObject
public final boolean isRollUpFinishDate()
isRollUpFinishDate
in class MPPExecutionObject
public final boolean isRollUpStatus()
MPPExecutionObject
isRollUpStatus
in class MPPExecutionObject
public final boolean isRollUpPercentComplete()
MPPExecutionObject
isRollUpPercentComplete
in class MPPExecutionObject
public final boolean isRollUpWork()
MPPExecutionObject
isRollUpWork
in class MPPExecutionObject
public final boolean isRollUpCost()
MPPExecutionObject
isRollUpCost
in class MPPExecutionObject
public final ProjectCategory getCategory()
MPPExecutionObject
XML
.
getCategory
in class MPPExecutionObject
public WTPrincipal getOwner() throws WTException
MPPExecutionObject
XML
.
getOwner
in class MPPExecutionObject
WTException
public final boolean isOwnable()
MPPExecutionObject
true
if the ownership of this object should
be assigned to the owner specified in the XML
.
isOwnable
in class MPPExecutionObject
public final ProjectHealthStatus getHealthStatus()
ProjectHealthStatus
for this
object that is specified in the XML
.
getHealthStatus
in class MPPExecutionObject
public final MPPExecutionObject getParent()
public final void setParent(MPPExecutionObject parent)
NullPointerException
- if parent is nullpublic final int getOutlineLevel()
OutlineLevel
of this task.
public Map getPredecessors()
Map
whose keys are the MS Project
UID
for the predecessor and whose values are the
ProjectLinkType
of precedence relation
that exists between the predecessor and this task.
public boolean isPredecessor(long uid)
true
if the specified
MPPTask
is a predecessor
of this task. Returns false
otherwise.
uid
- the uid of the predecessor task
public void addPredecessor(Long uid, ProjectLinkType type)
MS Project UID
of the predecessor and the
ProjectLinkType
of the
relationship are supplied.
uid
- the MS Project UID of the predecessortype
- the type of the precedence relationshippublic void addAllPredecessors(Map preds)
MS Project UID
s of the
predecessors and the values are the
ProjectLinkType
of the relationship.
preds
- a map of predecessors and relation typespublic void clearPredecessors()
private MPPTask getPredecessor(long uid)
MPPTask
that has the specified UID
.
uid
- the uid of the predecessor task
public final ProjectNode getProjectNode() throws WTException
ProjectNode
that
this object corresponds to.
WTException
wt.projmgmt.msproject.mppobject.MPPThing#getPersistable
protected Persistable createPersistable() throws WTException
MPPObject
Persistable
that is of the correct
type for this object.
createPersistable
in class MPPObject
WTException
public Persistable updatePersistable(Persistable p) throws WTException, WTPropertyVetoException
MPPExecutionObject
ExecutionObject
based on the data in this
MPPExecutionObject
.
Subclass should call super.updatePersistable
if they override
this method so that the ExecutionObject
and
WfExecutionObject
attributes are updated.
updatePersistable
in class MPPExecutionObject
WTException
WTPropertyVetoException
protected boolean isValidPersistable(Persistable p) throws WTException
MPPObject
Persistable
is
of the right type for this object. Return false
if null
is passed to the method.
This class's implementation of this method ensures that the
perisitable is in the right ProjectPlan
. Subclasses
that override this method should be sure to make a call to
super
so that this code is executed.
isValidPersistable
in class MPPExecutionObject
WTException
protected Persistable refreshPersistable() throws WTException
MPPObject
Persistable
that corresponds to this
object from the database. Return null
if no such
persistable exists.
refreshPersistable
in class MPPObject
WTException
private final ProjectActivity createProjectActivity(ProjectPlan plan) throws WTException
ProjectActivity
in the
specified ProjectPlan
. A template
for the activity is created and both are persisted in the database.
plan
- the plan that the activity should be created in
WTException
private final SummaryActivity createSummaryActivity(ProjectPlan plan) throws WTException
SummaryActivity
in the
specified ProjectPlan
. A template
for the summary is created and both are persisted in the database.
plan
- the plan that the summary should be created in
WTException
private final Milestone createMilestone(ProjectPlan plan) throws WTException
Milestone
in the
specified ProjectPlan
. A template
for the milestone is created and both are persisted in the database.
plan
- the plan that the milestone should be created in
WTException
private final ProjectProxy createProjectProxy(ProjectPlan plan) throws WTException
ProjectProxy
in the
specified ProjectPlan
. A template
for the proxy is created and both are persisted in the database.
If this proxy has an associated sub plan (as specified by PROJECT_ALIAS,
then the proxy is re-associated with the sub plan
plan
- the plan that the proxy should be created in
WTException
protected final ProjectNode updateProjectNode(ProjectNode node) throws WTException
ProjectNode
s. These include the
following values:
WTException
public final ProjectNode updateContainmentLinks(ProjectNode node) throws WTException
ProjectNode
based on the data in this task.
WTException
public final ProjectNode updatePredecessors(ProjectNode node) throws WTException
ProjectNode
based on the data in this task.
WTException
public final ExecutionObject updateNotebooks(ExecutionObject exObj) throws WTException
Notebook
s that are
associated with this object's persistable.
WTException
public final ExecutionObject updateBeforeAfterDeadline(ExecutionObject exObj) throws WTException
WTException
public final ExecutionObject updateExecutionConfiguration(ExecutionObject exObj) throws WTException
WTException
public final ExecutionObject updateDeliverables(ExecutionObject exObj) throws WTException
Deliverable
s that are
associated with this object's persistable.
WTException
public ExecutionObject addDeliverable(ExecutionObject exec_obj, Deliverable deliverable) throws WTException
Deliverable
to the
ExecutionObject
exec_obj
- the ExecutionObject the Deliverable is to be added todeliverable
- the Deliverable to be added to the ExecutionObject
WTException
private static ProjectNode addPred(ProjectNode node, ProjectNode predecessor, ProjectLinkType linkType) throws WTException
predecessor
to the specified node
.
The type of precedence relationship created is specified by the
linkType
.
node
- the sucessor nodepredecessor
- the predecessorlinkType
- the kind of precedence relation to create
WTException
private static ProjectNode addToSummary(SummaryActivity summary, ProjectNode node) throws WTException
node
to the specified summary
.
summary
- the parent nodenode
- the child node
WTException
private final ProjectActivity addOwnerResource(ProjectActivity act) throws WTException
WTException
private final PersonResource getPersonResource(String name) throws WTException
PersonResource
that is
defined in the XML
and has the specified name.
WTException
private final PersonResource getOnlyPersonResource() throws WTException
null
.
WTException
protected void printImpl()
printImpl
in class MPPObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |