|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ProjExecService
class contains the definition of remotely
accessible wt.projmgmt.execution API. The access is made through the
ProjExecHelper class
Supported API: true
Extendable: false
ProjExecHelper
Method Summary | |
Milestone |
addMilestone(ProjectPlan plan,
Milestone milestone)
Persists and adds milestone to execution object. |
QueryResult |
addNodesToSummary(SummaryActivity summary,
Vector nodes)
Adds a set of project nodes to the summary activity passed as argument. |
ProjectNode |
addPredecessors(ProjectNode node,
Vector predecessors,
Vector link_types)
Adds predecessors to the ProjectNode
passed as argument. |
ProjectActivity |
addProjectActivity(ProjectPlan plan,
ProjectActivity activity)
Adds a project activity to a project plan. |
ProjectNode |
addProjectNode(WfContainer container,
ProjectNode node,
Vector predecessors,
Vector link_types)
Adds a node to a WfContainer (project plan
or summary). |
ProjectProxy |
addProjectProxy(ProjectPlan plan,
ProjectProxy proxy,
ProjectPlan sub_project)
Adds a project proxy to a project plan. |
SummaryActivity |
addSummaryActivity(ProjectPlan plan,
SummaryActivity summary)
Adds a summary activity to a project plan. |
Milestone |
changeToMilestone(ProjectNode node)
Returns a milestone constructed from the project node passed as argument. |
ProjectActivity |
changeToProjectActivity(ProjectNode node)
Returns a project activity constructed from the project node passed as argument. |
ProjectProxy |
changeToProjectProxy(ProjectNode node)
Returns a project proxy constructed from the project node passed as argument. |
SummaryActivity |
changeToSummaryActivity(ProjectNode node)
Returns a summary activity constructed from the project node passed as argument. |
ProjectPlan |
createPlan(String name,
WTContainerRef context_ref)
Creates a stand-alone ProjectPlan given
its name in the given container. |
ProjectPlan |
createProjectPlan(Project2 project)
Creates a project plan that is associated to the project passed as argument. |
ProjectPlan |
createProjectPlan(ProjectPlanTemplate template,
RoleHolder role_holder)
Creates a stand-alone plan. |
void |
deleteExecutionObject(ExecutionObject exec_obj)
Deletes execution object if there is no event associated with it. |
void |
deleteObjectList(List obj_list)
Deletes all execution objects passed as arguments and their linked counterparts in case the "link deliverables" option is true. |
ProjectPlan |
disableProjectPlan(ProjectPlan plan)
Disables the ProjectPlan passed as argument. |
QueryResult |
getContainedNodes(WfContainer container)
Returns all enabled project nodes contained in the workflow container passed as argument. |
TimeToElapse |
getDuration(ExecutionObject exec_obj)
Returns the duration of an wt.projmgmt.executionExecutionObject . |
QueryResult |
getParentPlans(ProjectPlan plan)
Returns a list of references to plans that host the plan passed as argument. |
TimeToElapse |
getPlannedDuration(ExecutionObject exec_obj)
Returns the planned duration of an wt.projmgmt.executionExecutionObject . |
QueryResult |
getPredecessors(ProjectNode node)
Returns all workflow nodes ( WfNode ) for
which the node passed as argument is a successor. |
ProjectNode |
getProjectNode(ProjectPlan plan,
int node_id)
Returns project node in the given plan that has the node id passed as argument. |
ProjectNode |
getProjectNode(ProjectPlan plan,
String node_name)
Returns project node in the given plan that has the name passed as argument. |
QueryResult |
getProjectNodes(ProjectPlan plan,
Class node_class,
WTUser user)
Returns all enabled ProjectNode contained
in project plan passed as argument of the given class, belonging to
a given user. |
QueryResult |
getProjectNodes(ProjectPlan plan,
Class node_class,
WTUser user,
Integer queryLimit,
String orderByStr)
Returns all enabled ProjectNode contained
in project plan passed as argument of the given class, belonging to
a given user. |
QueryResult |
getProjectPlans()
Returns all existing project plans. |
QueryResult |
getRequesters(ProjectPlan plan)
Returns all objects requesting execution from the project plan passed as argument. |
QueryResult |
getSubPlans(ProjectPlan plan)
Returns a list of references to sub-plans contained in the plan passed as argument. |
QueryResult |
getSuccessors(ProjectNode node)
Returns all workflow nodes ( WfNode ) for
which the node passed as argument is a predecessor. |
TimeToElapse |
getToDateDuration(ExecutionObject exec_obj)
Returns the duration of an wt.projmgmt.executionExecutionObject
from its start up to the present moment or to the end time in case
the object is closed. |
QueryResult |
getWorkItems(ProjectActivity activity,
WTUser user)
Returns all project work items contained in the project activity passed as argument that are assigned to the given user. |
QueryResult |
getWorkItems(ProjectPlan plan,
WTUser user)
Returns all workitems assigned to the user passed as argument in a given project plan. |
QueryResult |
getWorkItems(SummaryActivity summary,
WTUser user)
Returns all workitems in the summary activity passed as argument that are owned by the given user. |
ProjectNode |
insertAfter(ProjectNode node1,
ProjectNode node2)
Inserts node1 immediately after node2 as a peer of node2. |
ProjectNode |
insertBefore(ProjectNode node1,
ProjectNode node2)
Inserts node1 immediately before node2 as a peer of node2. |
ProjectActivity |
linkDeliverable(ProjectActivity activity,
Deliverable deliverable)
Links a Deliverable to a ProjectActivity . |
ProjectActivity |
linkDeliverable(ProjectActivity activity,
Persistable target_obj,
boolean latest)
Creates a Deliverable with the given
target object and associates it to the ProjectActivity
passed as argument. |
QueryResult |
removeNodesFromSummary(SummaryActivity summary,
Vector nodes)
Removes a set of project nodes from the summary activity passed as argument. |
ProjectNode |
removePredecessors(ProjectNode node,
Vector predecessors)
Remove predecessors from the ProjectNode
passed as argument. |
void |
replaceUser(WTContainer container,
WTUser replacedUser,
WTUser newUser)
Changes the ownership of ExecutionObject s
in the container passed as argument. |
ProjectPlan |
setConfigFlags(ProjectPlan plan,
boolean allow_change,
boolean create_tasks,
boolean compute_work)
Sets the 'allowStateChange', 'createTask', and 'updateWorkComputePerComp' flags in the ProjectPlan passed as argument. |
void |
setContainedNodes(SummaryActivity summary,
Vector nodes)
Set the nodes contained in a SummaryActivity
to be ones contained in the list passed as argument. |
ExecutionObject |
setDuration(ExecutionObject exec_obj,
TimeToElapse duration)
Sets the duration of an execution object. |
ProjectProxy |
setPerformerPlan(ProjectProxy proxy,
ProjectPlan plan)
Sets the performer ProjectPlan for the
ProjectProxy passed as argument. |
ProjectNode |
setPredecessors(ProjectNode node,
Vector predecessors,
Vector link_types)
Sets the predecessors of the ProjectNode
passed argument. |
ProjectActivity |
unlinkDeliverable(ProjectActivity activity)
Unlinks the Deliverable currently linked
to given the ProjectActivity . |
Method Detail |
public Milestone addMilestone(ProjectPlan plan, Milestone milestone) throws WTException
Milesone passed as argument must have not been persisted before.
Supported API: false
plan
- milestone
-
WTException
public QueryResult addNodesToSummary(SummaryActivity summary, Vector nodes) throws WTException
ProjectNode
can be a
project activity, a milestone, a project proxy or another summary
activity. If a containment cycle is caused by the operation an exception
is thrown.
summary
- nodes
-
WTException
SummaryActivity
,
ProjectNode
public ProjectNode addPredecessors(ProjectNode node, Vector predecessors, Vector link_types) throws WTException
ProjectNode
passed as argument.
The new predecessors and the type of dependency are also passed as
arguments as two lists (Vector objects).
The number of elements of both lists must be the same and the predecessor
at position 'i'
corresponds to dependency at the same position in the dependency type
list.
Returns the node passed as argument, possibly updated.
If the node in the predecessor list already is a predecessor then its dependency type is changed if the dependency is different; otherwise nothing happens.
As a result of setting the predecessors, the time to start of the
node passed as argument may change.
The updated node is returned in this case.
Supported API: false
node
- predecessors
- link_types
-
WTException
wt.projmgmt.definer.ProjectTypeLink
,
ProjectNode
public ProjectActivity addProjectActivity(ProjectPlan plan, ProjectActivity activity) throws WTException
plan
- activity
-
WTException
ProjectActivity
,
ProjectPlan
public ProjectNode addProjectNode(WfContainer container, ProjectNode node, Vector predecessors, Vector link_types) throws WTException
WfContainer
(project plan
or summary). The node is also connected to the predecessors passed
as argument according to the dependencies also passed as argument.
A node can may be a Milestone
,
a ProjectActivity
, a SummaryActivity
,
or a ProjectProxy
.
A node template object and input connectors are created as well.
The pre-conditions are the following:
container
- node
- predecessors
- link_types
-
WTException
ProjectNode
,
ProjectNodeTemplate
,
ProjectPlan
public ProjectProxy addProjectProxy(ProjectPlan plan, ProjectProxy proxy, ProjectPlan sub_project) throws WTException
plan
- proxy
- sub_project
-
WTException
ProjectProxy
,
ProjectPlan
public SummaryActivity addSummaryActivity(ProjectPlan plan, SummaryActivity summary) throws WTException
plan
- summary
-
WTException
SummaryActivity
,
ProjectPlan
public Milestone changeToMilestone(ProjectNode node) throws WTException
Milestone
, the argument
is simply returned back to the caller. Otherwise the following is
true.
node
-
WTException
public ProjectActivity changeToProjectActivity(ProjectNode node) throws WTException
ProjectActivity
,
the argument is simply returned back to the caller. Otherwise the
following is true.
node
-
WTException
public ProjectProxy changeToProjectProxy(ProjectNode node) throws WTException
ProjectProxy
,
the argument is simply returned back to the caller. Otherwise the
following is true.
node
-
WTException
public SummaryActivity changeToSummaryActivity(ProjectNode node) throws WTException
SummaryActivity
,
the argument is simply returned back to the caller. Otherwise the
following is true.
node
-
WTException
public ProjectPlan createPlan(String name, WTContainerRef context_ref) throws WTException
ProjectPlan
given
its name in the given container. A "stand-alone" plan is one that
is not associated with a Project2
object.
name
- context_ref
-
WTException
public ProjectPlan createProjectPlan(ProjectPlanTemplate template, RoleHolder role_holder) throws WTException
template
- role_holder
-
WTException
ProjectPlan
,
WfRequesterActivity
public ProjectPlan createProjectPlan(Project2 project) throws WTException
project
-
WTException
wt.workflow.admin.Project2
,
ProjectPlan
public void deleteExecutionObject(ExecutionObject exec_obj) throws WTException
exec_obj
-
WTException
ExecutionObject
,
ProjMgmtEvent
public void deleteObjectList(List obj_list) throws WTException
obj_list
-
WTException
public ProjectPlan disableProjectPlan(ProjectPlan plan) throws WTException
ProjectPlan
passed as argument.
Propagates the disabling to all contained objects. Existing project
work items are deleted.
This operation is called after a project is logically (but not
physically) deleted from the database.
Supported API: false
plan
-
WTException
public QueryResult getContainedNodes(WfContainer container) throws WTException
container
-
WTException
WfContainer
public TimeToElapse getDuration(ExecutionObject exec_obj) throws WTException
wt.projmgmt.executionExecutionObject
.
The duration is computed by counting the number of working days between
the computed finish and the computed start dates. The object has completed
or cancelled, the computed finish is the actual end time. Otherwise
is the estimated finish date. If the object has started, the start
time is used. Otherwise, the time to start is used for ProjectNode
s
and ProjectPlan
, the creation time for
wt.resource.Deliverable
s and ProjectWorkItem
.
exec_obj
-
WTException
public QueryResult getParentPlans(ProjectPlan plan) throws WTException
ProjectProxy
that references the plan
plan
-
WTException
public TimeToElapse getPlannedDuration(ExecutionObject exec_obj) throws WTException
wt.projmgmt.executionExecutionObject
.
The duration is computed by counting the number of working days between
the estimated finish and the computed start dates. If the object has
started, the start time is used. Otherwise, the time to start is
used for ProjectNode
s and ProjectPlan
,
the creation time for wt.resource.Deliverable
s and ProjectWorkItem
.
exec_obj
-
WTException
public QueryResult getPredecessors(ProjectNode node) throws WTException
WfNode
) for
which the node passed as argument is a successor. Normally a project
node (ProjectNode
) is preceded by another
project nodes or a single connector ((@link wt.workflow.engine.WfConnector})
if it has no predecessor. Filtering the result of this query is necessary
in order to obtain only the project nodes.
node
-
WTException
ProjectNode
public ProjectNode getProjectNode(ProjectPlan plan, String node_name) throws WTException
plan
- node_name
-
WTException
public ProjectNode getProjectNode(ProjectPlan plan, int node_id) throws WTException
plan
- node_id
-
WTException
public QueryResult getProjectNodes(ProjectPlan plan, Class node_class, WTUser user) throws WTException
ProjectNode
contained
in project plan passed as argument of the given class, belonging to
a given user. If the given class is 'null' all enabled project nodes
are returned. If a user is null, nodes belonging to all users are
returned. A ProjectNode may be one of the following: a project activity
(ProjectActivity) a summary activity (SummaryActivity), a sub-project
(ProjectProxy) or a milestone (Milestone).
plan
- node_class
- user
-
WTException
ProjectActivity
,
SummaryActivity
,
Milestone
public QueryResult getProjectPlans() throws WTException
WTException
ProjectPlan
public QueryResult getRequesters(ProjectPlan plan) throws WTException
WfRequester
.
Normally the requester is a ProjectProxy
.
plan
-
WTException
public QueryResult getSubPlans(ProjectPlan plan) throws WTException
ProjectProxy
that is contained in the plan.
plan
-
WTException
public QueryResult getSuccessors(ProjectNode node) throws WTException
WfNode
) for
which the node passed as argument is a predecessor. Normally a project
node (ProjectNode
) is preceded by another
project nodes or a single connector ((@link wt.workflow.engine.WfConnector})
if it has no successor. Filtering the result of this query is necessary
in order to obtain only the project nodes.
node
-
WTException
ProjectNode
public TimeToElapse getToDateDuration(ExecutionObject exec_obj) throws WTException
wt.projmgmt.executionExecutionObject
from its start up to the present moment or to the end time in case
the object is closed. The duration is computed by counting the number
of working days between the closed time or the present moment and
the computed start dates. If the object has started, the start time
is used. Otherwise, the time to start is used for ProjectNode
s
and ProjectPlan
, the creation time for
wt.resource.Deliverable
s and ProjectWorkItem
.
exec_obj
-
WTException
public QueryResult getWorkItems(ProjectActivity activity, WTUser user) throws WTException
activity
- user
-
WTException
ProjectWorkItem
public QueryResult getWorkItems(SummaryActivity summary, WTUser user) throws WTException
summary
- user
-
WTException
public QueryResult getWorkItems(ProjectPlan plan, WTUser user) throws WTException
plan
- user
-
WTException
public ProjectNode insertAfter(ProjectNode node1, ProjectNode node2) throws WTException
node1
- node2
-
WTException
public ProjectNode insertBefore(ProjectNode node1, ProjectNode node2) throws WTException
node1
- node2
-
WTException
public ProjectActivity linkDeliverable(ProjectActivity activity, Persistable target_obj, boolean latest) throws WTException
Deliverable
with the given
target object and associates it to the ProjectActivity
passed as argument. The created deliverable inherits all attributes
from the activity to which it becomes associated.
activity
- target_obj
- latest
-
WTException
public ProjectActivity linkDeliverable(ProjectActivity activity, Deliverable deliverable) throws WTException
Deliverable
to a ProjectActivity
.
Operation assumes that the "link deliverables" option is in force.
The deliverable may be persistent or not. In the latter case it
is persisted in the database. All activity values (with the exception
of name and description if they are not null) are inherited by the
deliverable. The operation fails (a ProjectManagementException
is thrown) in the following cases:
activity
- deliverable
-
WTException
public QueryResult removeNodesFromSummary(SummaryActivity summary, Vector nodes) throws WTException
ProjectNode
can be a project activity, a milestone, a project proxy or another
summary activity. The node is ignored if it doesn't belong to the
summary.
summary
- nodes
-
WTException
SummaryActivity
,
ProjectNode
public ProjectNode removePredecessors(ProjectNode node, Vector predecessors) throws WTException
ProjectNode
passed as argument.
The predecessors to be removed are passed as arguments as a Vector
object.
Returns the nodes actually removed, possibly updated.
If the node in the predecessor list is not a predecessor then nothing happens.
Returns the node passed as argument, possibly updated.
As a result of setting the predecessors, the time to start of the
node passed as argument
may change.
Supported API: false
node
- predecessors
-
WTException
wt.projmgmt.definer.ProjectTypeLink
,
ProjectNode
public void replaceUser(WTContainer container, WTUser replacedUser, WTUser newUser) throws WTException
ExecutionObject
s
in the container passed as argument. Both the old user and the new
user are passed as argument.
container
- replacedUser
- newUser
-
WTException
public ProjectPlan setConfigFlags(ProjectPlan plan, boolean allow_change, boolean create_tasks, boolean compute_work) throws WTException
ProjectPlan
passed as argument.
The flags that are set are ExecutionConfiguration
flags. The new values for these flags are also passed as arguments.
The flags are propagated to all ProjectNode
objects contained in the ProjectPlan
.
plan
- allow_change
- create_tasks
- compute_work
-
WTException
public void setContainedNodes(SummaryActivity summary, Vector nodes) throws WTException
SummaryActivity
to be ones contained in the list passed as argument.
summary
- nodes
-
WTException
ProjectNode
public ExecutionObject setDuration(ExecutionObject exec_obj, TimeToElapse duration) throws WTException
exec_obj
- duration
-
WTException
public ProjectProxy setPerformerPlan(ProjectProxy proxy, ProjectPlan plan) throws WTException
ProjectPlan
for the
ProjectProxy
passed as argument. If
the performer plan is null, all proxy values are reset. Otherwise
the performer values are read and propagated in the proxy's plan.
Throws exceptions in the following cases (inclusive):
proxy
- plan
-
WTException
public ProjectNode setPredecessors(ProjectNode node, Vector predecessors, Vector link_types) throws WTException
ProjectNode
passed argument. The new predecessors and the type of dependency
are also passed as arguments as two lists (Vector objects). The number
of elements of both lists must be the same and the predecessor at
position 'i' corresponds to dependency at the same position in the
dependency type list. Returns the node passed as argument, possibly
updated.
If the node in the predecessor list already is a predecessor then its dependency type is changed if the dependency is different; otherwise nothing happens. All current predecessor nodes that are not in the list of predecessors passed as argument are removed as predecessors.
As a result of setting the predecessors, the time to start of the
node passed as argument may change. The updated node is returned
in this case.
Supported API: false
node
- predecessors
- link_types
-
WTException
wt.projmgmt.definer.ProjectTypeLink
,
ProjectNode
public ProjectActivity unlinkDeliverable(ProjectActivity activity) throws WTException
Deliverable
currently linked
to given the ProjectActivity
. If there
is no deliverable associated with the activity nothing happens. Operation
assumes that the "link deliverables" option has been selected. The
activity and deliverable maintain all its curernt values, so that
no propagation takes place.
activity
-
WTException
public QueryResult getProjectNodes(ProjectPlan plan, Class node_class, WTUser user, Integer queryLimit, String orderByStr) throws WTException
ProjectNode
contained
in project plan passed as argument of the given class, belonging to
a given user. If the given class is 'null' all enabled project nodes
are returned. If a user is null, nodes belonging to all users are
returned. A ProjectNode may be one of the following: a project activity
(ProjectActivity) a summary activity (SummaryActivity), a sub-project
(ProjectProxy) or a milestone (Milestone).
plan
- node_class
- user
- queryLimit
- orderByStr
-
WTException
ProjectActivity
,
SummaryActivity
,
Milestone
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |