|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.projmgmt.execution.StandardProjExecService
The StandardProjExecService
class contains the standard
implementation of both remotely and server accessible API.
This service is a light-weight service and depends on the wt.projmgmt.StandardProjMgmtService for dispatching and capturing events.
Use the newStandardProjExecService
static factory method(s),
not the StandardProjExecService
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
ProjExecService
,
ProjExecServiceSvr
,
ProjMgmtService
,
Serialized FormField Summary | |
private static int |
BACKWARD
|
private static String |
CLASSNAME
|
private static String |
DEFAULT_PLAN_NAME
|
private static int |
FORWARD
|
private static String |
MONITOR_RESOURCE
|
private static String |
RESOURCE
|
private static String |
TEMPLATE_ID
|
private static boolean |
USE_QUEUE
|
private static boolean |
VERBOSE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardProjExecService()
|
Method Summary | |
private void |
addDescendents(SummaryActivity summary,
HashSet family)
Adds the descendents of the sumamry activity passed as argument to the set also passed as argument. |
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. |
private void |
addToContainer(WfContainer container,
ProjectNode node)
Adds node to container. |
QueryResult |
addToSummary(SummaryActivity summary,
Vector nodes,
boolean reorder)
|
private void |
adjustSuccessorConnectors(ProjectNode node)
Updates the number of predecessors in a connector when a predecessor node is deleted. |
private void |
adoptDeliverables(ExecutionObject holder)
|
private ProjectNode |
changePredecessors(ProjectNode node,
Vector predecessors,
Vector link_types,
boolean remove)
Add or remove predecessors. |
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. |
private void |
checkDependencyCycle(ProjectNode node1,
ProjectNode node2)
Throws exception if there is a dependency between an ancestor/descendent of n1 on an ancestor/descendent of n2. |
private void |
checkEnabledNotClosed(ExecutionObject exec_obj)
Throws an exception if object is not enaled or it's state is closed (COMPLETED or CANCELLED). |
private void |
checkForDependency(SummaryActivity summary,
ProjectNode node)
Throws exception if a dependency prevents the node to be added to the summary. |
private void |
checkLinkDeliverables(ExecutionObject exec_obj)
Throws an exception if "link deliverables" option is not selected. |
private void |
completeSummaryAfterDeletion(ProjectNode node)
Completes containing summary when node is deleted if all remaining nodes are in the COMPLETED state. |
TimeToElapse |
computeDuration(ExecutionObject exec_obj)
Computes the duration of an execution object. |
Timestamp |
computeFinishTime(ProjectNode node,
TimeToElapse duration)
Computes and returns the finish time for a given given the duration. |
private boolean |
contains(SummaryActivity summary,
ProjectNode node)
Returns true if summary is equal to or contains node; false otherwise. |
private void |
copyNodeAttributes(ProjectNode from,
ProjectNode to)
|
private ExecutionObject |
copySubscriptions(ExecutionObject from,
ExecutionObject to)
|
private void |
copyWfAttributes(WfExecutionObject from,
WfExecutionObject to)
|
private void |
copyWfTemplateAttributes(WfTemplateObject fromTemplate,
WfTemplateObject toTemplate)
|
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. |
private void |
delete(ExecutionObject exec_obj)
|
private void |
deleteConnectors(SummaryActivity summary)
|
void |
deleteContainedObjects(ProjectPlan plan)
Deletes all objects contained in the project plan passed as argument. |
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. |
private void |
deleteObjects(ProjectPlan plan,
Class obj_class,
String ref_attr)
|
private static void |
deleteWorkItems(ProjectActivity activity)
|
private void |
deleteWorkItems(ProjectPlan plan)
Deletes plan's work items and assignments.. |
private void |
disableDeliverables(ProjectPlan plan)
Disables the nodes contained in the plan. |
private void |
disableNodes(ProjectPlan plan)
Disables the nodes contained in the plan. |
ProjectPlan |
disableProjectPlan(ProjectPlan plan)
Disables the ProjectPlan passed as argument. |
private Vector |
getAncestors(ProjectNode node)
Returns all ancestor nodes of a project node, including itself. |
ProjectNode |
getAssociatedNode(WfConnector conn)
Returns the project node associated with a given connector. |
String |
getConceptualClassname()
Deprecated. |
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 . |
WfNode |
getExecutionNode(WfNodeTemplate node_template)
Returns the execution node that corresponds to a given template. |
protected QueryResult |
getIntervalNodes(ProjectPlan plan,
int min,
int max)
Returns all nodes such that id >= min and id <= max. |
protected ProjectNode |
getLastNode(SummaryActivity summary)
Gets the last node (of highest id) that belongs to the given container. |
private NodeTemplateLink |
getLink(ObjectIdentifier source_id,
ObjectIdentifier destination_id)
|
private WfContainer |
getNewContainer(ProjectNode node1,
ProjectNode node2)
Returns the new container to which node1 should be added. |
private int |
getNextId(ProjectPlan plan)
|
private HashSet |
getNodeFamily(ProjectNode node)
Retrieves all ancestors and descendents of the node (containment hierarchy). |
private int |
getNodeId(Object object)
Gets node id. |
private void |
getNodeTree(ProjectPlan plan)
|
private static ObjectIdentifier |
getOid(Object obj)
|
private static String |
getOidString(Object obj)
|
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. |
private QuerySpec |
getPredQS(ObjectIdentifier conn_oid,
Class template_class,
Class exec_class)
|
private QueryResult |
getPreds(ProjectNode node)
Internal version of getPredecessors: no caching. |
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. |
private ObjectReference |
getRef(Object obj)
|
QueryResult |
getRequesters(ProjectPlan plan)
Returns all objects requesting execution from the project plan passed as argument. |
QueryResult |
getResourceActivities(ProjectPlan plan,
ProjectResource resource)
Retrieves activities which resource is assigned. |
QueryResult |
getSubPlans(ProjectPlan plan)
Returns a list of references to sub-plans contained in the plan passed as argument. |
private QuerySpec |
getSuccConnQS(ProjectNode node)
|
private QueryResult |
getSuccConns(ProjectNode node)
|
QueryResult |
getSuccessors(ProjectNode node)
Returns all workflow nodes ( WfNode ) for
which the node passed as argument is a predecessor. |
private QuerySpec |
getSuccQS(ProjectNode node,
Class exec_class)
|
private QueryResult |
getSuccs(ProjectNode node)
Internal version of getSuccessors: no caching. |
private Class |
getTemplateClass(ProjectNode node)
|
private Timestamp |
getTimeToStart(Object object)
Returns time to start. |
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. |
private WfConnector |
getWfConnector(WfConnectorTemplate conn_template)
|
WfNode |
getWfNode(WfTemplateObject node_template)
|
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. |
private boolean |
hasDependency(ProjectNode node,
Vector nodes,
int direction)
Return true if there is a dependency between the node passed as argument and any node in the Vector, in the given direction (FORWARD or BACKWARD); false otherwise. |
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. |
private boolean |
isInVector(Vector vec,
Object obj)
Checks membership. |
private boolean |
isStartComputed(Object object)
Returns start computed flag. |
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. |
private int |
moveAfter(WfContainer container,
ProjectNode node1,
ProjectNode node2,
List changed_nodes)
Moves node1 to after node2. |
private int |
moveBefore(WfContainer container,
ProjectNode node1,
ProjectNode node2,
List changed_nodes)
Moves node1 to before node2. |
static StandardProjExecService |
newStandardProjExecService()
Default factory for the class. |
void |
reassignWorkitems(ContainerTeamManaged container,
WTUser user)
This method reassings all the work items for the user passed in to the responsible role. |
private void |
reassignWorkitems(Project2 project,
WTUser replacedUser,
WTUser newUser)
|
protected QueryResult |
removeFromSummary(SummaryActivity summary,
Vector nodes,
boolean reorder)
|
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. |
private int |
renumber(SummaryActivity summary,
List changed_nodes)
Renumbers nodes contained in given summary. |
private void |
reorderNodeIds(ProjectPlan plan,
int removed_id)
|
private void |
reparentNodes(SummaryActivity summary)
|
void |
replaceUser(WTContainer container,
WTUser replacedUser,
WTUser newUser)
Changes the ownership of ExecutionObject s
in the container passed as argument. |
private void |
resetDynamicAttributes(ProjectNode node)
|
private void |
rewirePredecessors(ProjectNode node,
boolean propagate)
Links the predecessors of the node to its successors. |
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. |
private void |
setDeliverableAttributes(ProjectActivity activity,
Deliverable deliverable)
|
ExecutionObject |
setDuration(ExecutionObject exec_obj,
TimeToElapse duration)
Sets the duration of an execution object. |
private int |
setId(ProjectNode node,
int new_id,
List changed_nodes)
Sets node id. |
protected ProjectNode |
setInstanceAttributes(ProjectNode node,
WfContainer container,
Vector predecessors,
Vector link_types)
Initializes attributes that depends on the plan to which the node is being added. |
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. |
private boolean |
shouldConnect(WfNodeTemplate pred_temp,
WfNodeTemplate succ_temp)
|
private boolean |
shouldStart(ExecutionObject exec_obj,
ProjectNode node,
Vector predecessors,
Vector link_types)
|
private static String |
showObjs(List objs)
Returns a String contained the list of objects in the Vector. |
private WfTemplateObject |
transferContainment(WfTemplateObject from,
WfTemplateObject to)
|
private void |
transferDependencies(ProjectNodeTemplate from,
ProjectNodeTemplate to)
|
ProjectActivity |
unlinkDeliverable(ProjectActivity activity)
Unlinks the Deliverable currently linked
to given the ProjectActivity . |
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 final String CLASSNAME
private static final String MONITOR_RESOURCE
private static final boolean VERBOSE
private static final boolean USE_QUEUE
private static final int FORWARD
private static final int BACKWARD
private static final String DEFAULT_PLAN_NAME
private static final String TEMPLATE_ID
Constructor Detail |
public StandardProjExecService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
public static StandardProjExecService newStandardProjExecService() throws WTException
WTException
public Milestone addMilestone(ProjectPlan plan, Milestone milestone) throws WTException
Milesone passed as argument must have not been persisted before.
Supported API: false
addMilestone
in interface ProjExecService
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.
addNodesToSummary
in interface ProjExecService
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
addPredecessors
in interface ProjExecService
node
- predecessors
- link_types
-
WTException
wt.projmgmt.definer.ProjectTypeLink
,
ProjectNode
public ProjectActivity addProjectActivity(ProjectPlan plan, ProjectActivity activity) throws WTException
addProjectActivity
in interface ProjExecService
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:
addProjectNode
in interface ProjExecService
container
- node
- predecessors
- link_types
-
WTException
ProjectNode
,
ProjectNodeTemplate
,
ProjectPlan
public ProjectProxy addProjectProxy(ProjectPlan plan, ProjectProxy proxy, ProjectPlan sub_project) throws WTException
addProjectProxy
in interface ProjExecService
plan
- proxy
- sub_project
-
WTException
ProjectProxy
,
ProjectPlan
public SummaryActivity addSummaryActivity(ProjectPlan plan, SummaryActivity summary) throws WTException
addSummaryActivity
in interface ProjExecService
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.
changeToMilestone
in interface ProjExecService
node
-
WTException
public ProjectActivity changeToProjectActivity(ProjectNode node) throws WTException
ProjectActivity
,
the argument is simply returned back to the caller. Otherwise the
following is true.
changeToProjectActivity
in interface ProjExecService
node
-
WTException
public ProjectProxy changeToProjectProxy(ProjectNode node) throws WTException
ProjectProxy
,
the argument is simply returned back to the caller. Otherwise the
following is true.
changeToProjectProxy
in interface ProjExecService
node
-
WTException
public SummaryActivity changeToSummaryActivity(ProjectNode node) throws WTException
SummaryActivity
,
the argument is simply returned back to the caller. Otherwise the
following is true.
changeToSummaryActivity
in interface ProjExecService
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.
createPlan
in interface ProjExecService
name
- context_ref
-
WTException
public ProjectPlan createProjectPlan(ProjectPlanTemplate template, RoleHolder role_holder) throws WTException
createProjectPlan
in interface ProjExecService
template
- role_holder
-
WTException
ProjectPlan
,
WfRequesterActivity
public ProjectPlan createProjectPlan(Project2 project) throws WTException
createProjectPlan
in interface ProjExecService
project
-
WTException
wt.workflow.admin.Project2
,
ProjectPlan
public void deleteExecutionObject(ExecutionObject exec_obj) throws WTException
deleteExecutionObject
in interface ProjExecService
exec_obj
-
WTException
ExecutionObject
,
ProjMgmtEvent
public void deleteObjectList(List obj_list) throws WTException
deleteObjectList
in interface ProjExecService
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
disableProjectPlan
in interface ProjExecService
plan
-
WTException
public QueryResult getContainedNodes(WfContainer container) throws WTException
getContainedNodes
in interface ProjExecService
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
.
getDuration
in interface ProjExecService
exec_obj
-
WTException
public QueryResult getParentPlans(ProjectPlan plan) throws WTException
ProjectProxy
that references the plan
getParentPlans
in interface ProjExecService
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
.
getPlannedDuration
in interface ProjExecService
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.
getPredecessors
in interface ProjExecService
node
-
WTException
ProjectNode
public ProjectNode getProjectNode(ProjectPlan plan, String node_name) throws WTException
getProjectNode
in interface ProjExecService
plan
- node_name
-
WTException
public ProjectNode getProjectNode(ProjectPlan plan, int node_id) throws WTException
getProjectNode
in interface ProjExecService
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).
getProjectNodes
in interface ProjExecService
plan
- node_class
- user
-
WTException
ProjectActivity
,
SummaryActivity
,
Milestone
public QueryResult getProjectPlans() throws WTException
getProjectPlans
in interface ProjExecService
WTException
ProjectPlan
public QueryResult getRequesters(ProjectPlan plan) throws WTException
WfRequester
.
Normally the requester is a ProjectProxy
.
getRequesters
in interface ProjExecService
plan
-
WTException
public QueryResult getSubPlans(ProjectPlan plan) throws WTException
ProjectProxy
that is contained in the plan.
getSubPlans
in interface ProjExecService
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.
getSuccessors
in interface ProjExecService
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
.
getToDateDuration
in interface ProjExecService
exec_obj
-
WTException
public QueryResult getWorkItems(ProjectActivity activity, WTUser user) throws WTException
getWorkItems
in interface ProjExecService
activity
- user
-
WTException
ProjectWorkItem
public QueryResult getWorkItems(SummaryActivity summary, WTUser user) throws WTException
getWorkItems
in interface ProjExecService
summary
- user
-
WTException
public QueryResult getWorkItems(ProjectPlan plan, WTUser user) throws WTException
getWorkItems
in interface ProjExecService
plan
- user
-
WTException
public ProjectNode insertAfter(ProjectNode node1, ProjectNode node2) throws WTException
insertAfter
in interface ProjExecService
node1
- node2
-
WTException
public ProjectNode insertBefore(ProjectNode node1, ProjectNode node2) throws WTException
insertBefore
in interface ProjExecService
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.
linkDeliverable
in interface ProjExecService
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:
linkDeliverable
in interface ProjExecService
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.
removeNodesFromSummary
in interface ProjExecService
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
removePredecessors
in interface ProjExecService
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.
replaceUser
in interface ProjExecService
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
.
setConfigFlags
in interface ProjExecService
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.
setContainedNodes
in interface ProjExecService
summary
- nodes
-
WTException
ProjectNode
public ExecutionObject setDuration(ExecutionObject exec_obj, TimeToElapse duration) throws WTException
setDuration
in interface ProjExecService
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):
setPerformerPlan
in interface ProjExecService
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
setPredecessors
in interface ProjExecService
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.
unlinkDeliverable
in interface ProjExecService
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).
getProjectNodes
in interface ProjExecService
plan
- node_class
- user
- queryLimit
- orderByStr
-
WTException
ProjectActivity
,
SummaryActivity
,
Milestone
public void deleteContainedObjects(ProjectPlan plan) throws WTException
deleteContainedObjects
in interface ProjExecServiceSvr
plan
-
WTException
ProjectPlan
public WfNode getExecutionNode(WfNodeTemplate node_template) throws WTException
getExecutionNode
in interface ProjExecServiceSvr
node_template
-
WTException
public ProjectNode getAssociatedNode(WfConnector conn) throws WTException
getAssociatedNode
in interface ProjExecServiceSvr
conn
-
WTException
public Timestamp computeFinishTime(ProjectNode node, TimeToElapse duration) throws WTException
computeFinishTime
in interface ProjExecServiceSvr
node
- duration
-
WTException
public void reassignWorkitems(ContainerTeamManaged container, WTUser user) throws WTException
reassignWorkitems
in interface ProjExecServiceSvr
container
- user
-
WTException
public TimeToElapse computeDuration(ExecutionObject exec_obj) throws WTException
computeDuration
in interface ProjExecServiceSvr
exec_obj
-
WTException
private void rewirePredecessors(ProjectNode node, boolean propagate) throws WTException
WTException
private boolean shouldConnect(WfNodeTemplate pred_temp, WfNodeTemplate succ_temp) throws WTException
WTException
private NodeTemplateLink getLink(ObjectIdentifier source_id, ObjectIdentifier destination_id) throws WTException
WTException
private void adjustSuccessorConnectors(ProjectNode node) throws WTException
WTException
private QueryResult getSuccConns(ProjectNode node) throws WTException
WTException
private QuerySpec getSuccConnQS(ProjectNode node) throws WTException
WTException
private Class getTemplateClass(ProjectNode node) throws WTException
WTException
private boolean isInVector(Vector vec, Object obj) throws WTException
WTException
private int moveAfter(WfContainer container, ProjectNode node1, ProjectNode node2, List changed_nodes) throws WTException
WTException
private int moveBefore(WfContainer container, ProjectNode node1, ProjectNode node2, List changed_nodes) throws WTException
WTException
private WfContainer getNewContainer(ProjectNode node1, ProjectNode node2) throws WTException
WTException
private void addToContainer(WfContainer container, ProjectNode node) throws WTException
WTException
private int getNodeId(Object object)
private int setId(ProjectNode node, int new_id, List changed_nodes) throws WTException
WTException
private int renumber(SummaryActivity summary, List changed_nodes) throws WTException
WTException
private void disableNodes(ProjectPlan plan) throws WTException
WTException
private void disableDeliverables(ProjectPlan plan) throws WTException
WTException
private void deleteWorkItems(ProjectPlan plan) throws WTException
WTException
private ProjectNode changePredecessors(ProjectNode node, Vector predecessors, Vector link_types, boolean remove) throws WTException
WTException
public WfNode getWfNode(WfTemplateObject node_template) throws WTException
WTException
private WfConnector getWfConnector(WfConnectorTemplate conn_template) throws WTException
WTException
private void reparentNodes(SummaryActivity summary) throws WTException
WTException
private void adoptDeliverables(ExecutionObject holder) throws WTException
WTException
private void deleteConnectors(SummaryActivity summary) throws WTException
WTException
private int getNextId(ProjectPlan plan) throws WTException
WTException
private void reorderNodeIds(ProjectPlan plan, int removed_id) throws WTException
WTException
private void setDeliverableAttributes(ProjectActivity activity, Deliverable deliverable) throws WTException
WTException
private void copyNodeAttributes(ProjectNode from, ProjectNode to)
private void resetDynamicAttributes(ProjectNode node)
private ExecutionObject copySubscriptions(ExecutionObject from, ExecutionObject to) throws WTException
WTException
private void copyWfAttributes(WfExecutionObject from, WfExecutionObject to)
private void copyWfTemplateAttributes(WfTemplateObject fromTemplate, WfTemplateObject toTemplate)
private void transferDependencies(ProjectNodeTemplate from, ProjectNodeTemplate to) throws WTException
WTException
private WfTemplateObject transferContainment(WfTemplateObject from, WfTemplateObject to) throws WTException
WTException
private void delete(ExecutionObject exec_obj) throws WTException
WTException
private static void deleteWorkItems(ProjectActivity activity) throws WTException
WTException
private void deleteObjects(ProjectPlan plan, Class obj_class, String ref_attr) throws WTException
WTException
private boolean contains(SummaryActivity summary, ProjectNode node) throws WTException
WTException
private void checkForDependency(SummaryActivity summary, ProjectNode node) throws WTException
Note: we don't have to worry about the node's ancestors because the node is reparented.
WTException
private Vector getAncestors(ProjectNode node) throws WTException
WTException
private boolean hasDependency(ProjectNode node, Vector nodes, int direction) throws WTException
WTException
private void checkDependencyCycle(ProjectNode node1, ProjectNode node2) throws WTException
WTException
private HashSet getNodeFamily(ProjectNode node) throws WTException
WTException
private void addDescendents(SummaryActivity summary, HashSet family) throws WTException
WTException
private boolean shouldStart(ExecutionObject exec_obj, ProjectNode node, Vector predecessors, Vector link_types) throws WTException
WTException
private static String showObjs(List objs)
private static String getOidString(Object obj)
private static ObjectIdentifier getOid(Object obj)
private ObjectReference getRef(Object obj) throws WTException
WTException
private void reassignWorkitems(Project2 project, WTUser replacedUser, WTUser newUser) throws WTException
WTException
protected QueryResult getIntervalNodes(ProjectPlan plan, int min, int max) throws WTException
WTException
protected ProjectNode setInstanceAttributes(ProjectNode node, WfContainer container, Vector predecessors, Vector link_types) throws WTException
WTException
protected ProjectNode getLastNode(SummaryActivity summary) throws WTException
WTException
public QueryResult addToSummary(SummaryActivity summary, Vector nodes, boolean reorder) throws WTException
WTException
protected QueryResult removeFromSummary(SummaryActivity summary, Vector nodes, boolean reorder) throws WTException
WTException
private QueryResult getPreds(ProjectNode node) throws WTException
WTException
private QuerySpec getPredQS(ObjectIdentifier conn_oid, Class template_class, Class exec_class) throws WTException
WTException
private QueryResult getSuccs(ProjectNode node) throws WTException
WTException
private QuerySpec getSuccQS(ProjectNode node, Class exec_class) throws WTException
WTException
private void checkEnabledNotClosed(ExecutionObject exec_obj) throws WTException
WTException
private void checkLinkDeliverables(ExecutionObject exec_obj) throws WTException
WTException
private boolean isStartComputed(Object object)
private Timestamp getTimeToStart(Object object)
private void getNodeTree(ProjectPlan plan) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
public QueryResult getResourceActivities(ProjectPlan plan, ProjectResource resource) throws WTException
plan
- resource
-
WTException
private void completeSummaryAfterDeletion(ProjectNode node) throws WTException
node
-
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |