wt.projmgmt.execution
Class StandardProjExecService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.projmgmt.execution.StandardProjExecService
All Implemented Interfaces:
Manager, NetFactor, ProjExecService, ProjExecServiceSvr, Serializable

public class StandardProjExecService
extends StandardManager
implements ProjExecService, ProjExecServiceSvr, Serializable

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

See Also:
ProjExecService, ProjExecServiceSvr, ProjMgmtService, Serialized Form

Field 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 ExecutionObjects 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 wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, performStartupProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

MONITOR_RESOURCE

private static final String MONITOR_RESOURCE

VERBOSE

private static final boolean VERBOSE

USE_QUEUE

private static final boolean USE_QUEUE

FORWARD

private static final int FORWARD
See Also:
Constant Field Values

BACKWARD

private static final int BACKWARD
See Also:
Constant Field Values

DEFAULT_PLAN_NAME

private static final String DEFAULT_PLAN_NAME
See Also:
Constant Field Values

TEMPLATE_ID

private static final String TEMPLATE_ID
See Also:
Constant Field Values
Constructor Detail

StandardProjExecService

public StandardProjExecService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

newStandardProjExecService

public static StandardProjExecService newStandardProjExecService()
                                                          throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardProjExecService
Throws:
WTException

addMilestone

public Milestone addMilestone(ProjectPlan plan,
                              Milestone milestone)
                       throws WTException
Persists and adds milestone to execution object. Returns persisted milestone.

Milesone passed as argument must have not been persisted before.

Supported API: false

Specified by:
addMilestone in interface ProjExecService
Parameters:
plan -
milestone -
Returns:
Milestone
Throws:
WTException

addNodesToSummary

public QueryResult addNodesToSummary(SummaryActivity summary,
                                     Vector nodes)
                              throws WTException
Adds a set of project nodes to the summary activity passed as argument. A project node (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.

Supported API: false

Specified by:
addNodesToSummary in interface ProjExecService
Parameters:
summary -
nodes -
Returns:
QueryResult
Throws:
WTException
See Also:
SummaryActivity, ProjectNode

addPredecessors

public ProjectNode addPredecessors(ProjectNode node,
                                   Vector predecessors,
                                   Vector link_types)
                            throws WTException
Adds predecessors to the 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

Specified by:
addPredecessors in interface ProjExecService
Parameters:
node -
predecessors -
link_types -
Returns:
ProjectNode
Throws:
WTException
See Also:
wt.projmgmt.definer.ProjectTypeLink, ProjectNode

addProjectActivity

public ProjectActivity addProjectActivity(ProjectPlan plan,
                                          ProjectActivity activity)
                                   throws WTException
Adds a project activity to a project plan. A list of assignees is passed as argument besides a yets to be persisted activity. Several objects are created and persisted, included templates and input connectors.

Supported API: false

Specified by:
addProjectActivity in interface ProjExecService
Parameters:
plan -
activity -
Returns:
ProjectActivity
Throws:
WTException
See Also:
ProjectActivity, ProjectPlan

addProjectNode

public ProjectNode addProjectNode(WfContainer container,
                                  ProjectNode node,
                                  Vector predecessors,
                                  Vector link_types)
                           throws WTException
Adds a node to a 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:



Supported API: true

Specified by:
addProjectNode in interface ProjExecService
Parameters:
container -
node -
predecessors -
link_types -
Returns:
ProjectNode
Throws:
WTException
See Also:
ProjectNode, ProjectNodeTemplate, ProjectPlan

addProjectProxy

public ProjectProxy addProjectProxy(ProjectPlan plan,
                                    ProjectProxy proxy,
                                    ProjectPlan sub_project)
                             throws WTException
Adds a project proxy to a project plan. Several objects are created and persisted, included templates and input connectors.

Supported API: false

Specified by:
addProjectProxy in interface ProjExecService
Parameters:
plan -
proxy -
sub_project -
Returns:
ProjectProxy
Throws:
WTException
See Also:
ProjectProxy, ProjectPlan

addSummaryActivity

public SummaryActivity addSummaryActivity(ProjectPlan plan,
                                          SummaryActivity summary)
                                   throws WTException
Adds a summary activity to a project plan. Several objects are created and persisted, included templates, requester activity and input connectors. Adding a summary activity has no effect on dynamic values of the project. Assumes summary activity has not been persisted yet.

Supported API: false

Specified by:
addSummaryActivity in interface ProjExecService
Parameters:
plan -
summary -
Returns:
SummaryActivity
Throws:
WTException
See Also:
SummaryActivity, ProjectPlan

changeToMilestone

public Milestone changeToMilestone(ProjectNode node)
                            throws WTException
Returns a milestone constructed from the project node passed as argument. If the node is a Milestone, the argument is simply returned back to the caller. Otherwise the following is true.

Supported API: true

Specified by:
changeToMilestone in interface ProjExecService
Parameters:
node -
Returns:
Milestone
Throws:
WTException

changeToProjectActivity

public ProjectActivity changeToProjectActivity(ProjectNode node)
                                        throws WTException
Returns a project activity constructed from the project node passed as argument. If the node is a ProjectActivity, the argument is simply returned back to the caller. Otherwise the following is true.

Supported API: true

Specified by:
changeToProjectActivity in interface ProjExecService
Parameters:
node -
Returns:
ProjectActivity
Throws:
WTException

changeToProjectProxy

public ProjectProxy changeToProjectProxy(ProjectNode node)
                                  throws WTException
Returns a project proxy constructed from the project node passed as argument. If the node is a ProjectProxy, the argument is simply returned back to the caller. Otherwise the following is true.

Supported API: true

Specified by:
changeToProjectProxy in interface ProjExecService
Parameters:
node -
Returns:
ProjectProxy
Throws:
WTException

changeToSummaryActivity

public SummaryActivity changeToSummaryActivity(ProjectNode node)
                                        throws WTException
Returns a summary activity constructed from the project node passed as argument. If the node is a SummaryActivity, the argument is simply returned back to the caller. Otherwise the following is true.

Supported API: true

Specified by:
changeToSummaryActivity in interface ProjExecService
Parameters:
node -
Returns:
SummaryActivity
Throws:
WTException

createPlan

public ProjectPlan createPlan(String name,
                              WTContainerRef context_ref)
                       throws WTException
Creates a stand-alone ProjectPlan given its name in the given container. A "stand-alone" plan is one that is not associated with a Project2 object.

Supported API: true

Specified by:
createPlan in interface ProjExecService
Parameters:
name -
context_ref -
Returns:
ProjectPlan
Throws:
WTException

createProjectPlan

public ProjectPlan createProjectPlan(ProjectPlanTemplate template,
                                     RoleHolder role_holder)
                              throws WTException
Creates a stand-alone plan. The plan's template is passed as argument as is the role holder to be used. Returns the created project plan.

Supported API: false

Specified by:
createProjectPlan in interface ProjExecService
Parameters:
template -
role_holder -
Returns:
ProjectPlan
Throws:
WTException
See Also:
ProjectPlan, WfRequesterActivity

createProjectPlan

public ProjectPlan createProjectPlan(Project2 project)
                              throws WTException
Creates a project plan that is associated to the project passed as argument. The plan's template is passed as argument. Returns the created project plan.

Supported API: false

Specified by:
createProjectPlan in interface ProjExecService
Parameters:
project -
Returns:
ProjectPlan
Throws:
WTException
See Also:
wt.workflow.admin.Project2, ProjectPlan

deleteExecutionObject

public void deleteExecutionObject(ExecutionObject exec_obj)
                           throws WTException
Deletes execution object if there is no event associated with it. Otherwise simply disables the object.

Supported API: true

Specified by:
deleteExecutionObject in interface ProjExecService
Parameters:
exec_obj -
Throws:
WTException
See Also:
ExecutionObject, ProjMgmtEvent

deleteObjectList

public void deleteObjectList(List obj_list)
                      throws WTException
Deletes all execution objects passed as arguments and their linked counterparts in case the "link deliverables" option is true. If however the object is associated with a project management event, the object is disabled, not actually removed. All changes to the plan are propagated to containing and successor nodes (status, effort and schedule). Delete events are emitted corresponding to the affected execution objects.

Supported API: false

Specified by:
deleteObjectList in interface ProjExecService
Parameters:
obj_list -
Throws:
WTException

disableProjectPlan

public ProjectPlan disableProjectPlan(ProjectPlan plan)
                               throws WTException
Disables the 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

Specified by:
disableProjectPlan in interface ProjExecService
Parameters:
plan -
Returns:
ProjectPlan
Throws:
WTException

getContainedNodes

public QueryResult getContainedNodes(WfContainer container)
                              throws WTException
Returns all enabled project nodes contained in the workflow container passed as argument. The association queried in this case is the workflow container to containee association.

Supported API: true

Specified by:
getContainedNodes in interface ProjExecService
Parameters:
container -
Returns:
QueryResult
Throws:
WTException
See Also:
WfContainer

getDuration

public TimeToElapse getDuration(ExecutionObject exec_obj)
                         throws WTException
Returns the duration of an 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 ProjectNodes and ProjectPlan, the creation time for wt.resource.Deliverables and ProjectWorkItem.

Supported API: true

Specified by:
getDuration in interface ProjExecService
Parameters:
exec_obj -
Returns:
TimeToElapse
Throws:
WTException

getParentPlans

public QueryResult getParentPlans(ProjectPlan plan)
                           throws WTException
Returns a list of references to plans that host the plan passed as argument. A "host" is a plan that contains a ProjectProxy that references the plan

Supported API: true

Specified by:
getParentPlans in interface ProjExecService
Parameters:
plan -
Returns:
QueryResult
Throws:
WTException

getPlannedDuration

public TimeToElapse getPlannedDuration(ExecutionObject exec_obj)
                                throws WTException
Returns the planned duration of an 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 ProjectNodes and ProjectPlan, the creation time for wt.resource.Deliverables and ProjectWorkItem.

Supported API: false

Specified by:
getPlannedDuration in interface ProjExecService
Parameters:
exec_obj -
Returns:
TimeToElapse
Throws:
WTException

getPredecessors

public QueryResult getPredecessors(ProjectNode node)
                            throws WTException
Returns all workflow nodes (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.

Supported API: true

Specified by:
getPredecessors in interface ProjExecService
Parameters:
node -
Returns:
QueryResult
Throws:
WTException
See Also:
ProjectNode

getProjectNode

public ProjectNode getProjectNode(ProjectPlan plan,
                                  String node_name)
                           throws WTException
Returns project node in the given plan that has the name passed as argument. Returns 'null' if there is no node with such a name.

Supported API: true

Specified by:
getProjectNode in interface ProjExecService
Parameters:
plan -
node_name -
Returns:
ProjectNode
Throws:
WTException

getProjectNode

public ProjectNode getProjectNode(ProjectPlan plan,
                                  int node_id)
                           throws WTException
Returns project node in the given plan that has the node id passed as argument. Returns 'null' if there is no node with such id.

Supported API: true

Specified by:
getProjectNode in interface ProjExecService
Parameters:
plan -
node_id -
Returns:
ProjectNode
Throws:
WTException

getProjectNodes

public QueryResult getProjectNodes(ProjectPlan plan,
                                   Class node_class,
                                   WTUser user)
                            throws WTException
Returns all enabled 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).

Supported API: true

Specified by:
getProjectNodes in interface ProjExecService
Parameters:
plan -
node_class -
user -
Returns:
QueryResult
Throws:
WTException
See Also:
ProjectActivity, SummaryActivity, Milestone

getProjectPlans

public QueryResult getProjectPlans()
                            throws WTException
Returns all existing project plans.

Supported API: false

Specified by:
getProjectPlans in interface ProjExecService
Returns:
QueryResult
Throws:
WTException
See Also:
ProjectPlan

getRequesters

public QueryResult getRequesters(ProjectPlan plan)
                          throws WTException
Returns all objects requesting execution from the project plan passed as argument. These objects are of type WfRequester. Normally the requester is a ProjectProxy.

Supported API: true

Specified by:
getRequesters in interface ProjExecService
Parameters:
plan -
Returns:
QueryResult
Throws:
WTException

getSubPlans

public QueryResult getSubPlans(ProjectPlan plan)
                        throws WTException
Returns a list of references to sub-plans contained in the plan passed as argument. A "sub-plan" is a plan that is referenced by a ProjectProxy that is contained in the plan.

Supported API: true

Specified by:
getSubPlans in interface ProjExecService
Parameters:
plan -
Returns:
QueryResult
Throws:
WTException

getSuccessors

public QueryResult getSuccessors(ProjectNode node)
                          throws WTException
Returns all workflow nodes (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.

Supported API: true

Specified by:
getSuccessors in interface ProjExecService
Parameters:
node -
Returns:
QueryResult
Throws:
WTException
See Also:
ProjectNode

getToDateDuration

public TimeToElapse getToDateDuration(ExecutionObject exec_obj)
                               throws WTException
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. 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 ProjectNodes and ProjectPlan, the creation time for wt.resource.Deliverables and ProjectWorkItem.

Supported API: false

Specified by:
getToDateDuration in interface ProjExecService
Parameters:
exec_obj -
Returns:
TimeToElapse
Throws:
WTException

getWorkItems

public QueryResult getWorkItems(ProjectActivity activity,
                                WTUser user)
                         throws WTException
Returns all project work items contained in the project activity passed as argument that are assigned to the given user. If the user passed as argument is 'null' then all project work items of the activity are returned.

Supported API: true

Specified by:
getWorkItems in interface ProjExecService
Parameters:
activity -
user -
Returns:
QueryResult
Throws:
WTException
See Also:
ProjectWorkItem

getWorkItems

public QueryResult getWorkItems(SummaryActivity summary,
                                WTUser user)
                         throws WTException
Returns all workitems in the summary activity passed as argument that are owned by the given user. If user is 'null' all workitems are returned. The method recursively retrieves workitems down the containment hierarchy.

Supported API: true

Specified by:
getWorkItems in interface ProjExecService
Parameters:
summary -
user -
Returns:
QueryResult
Throws:
WTException

getWorkItems

public QueryResult getWorkItems(ProjectPlan plan,
                                WTUser user)
                         throws WTException
Returns all workitems assigned to the user passed as argument in a given project plan.

Supported API: true

Specified by:
getWorkItems in interface ProjExecService
Parameters:
plan -
user -
Returns:
QueryResult
Throws:
WTException

insertAfter

public ProjectNode insertAfter(ProjectNode node1,
                               ProjectNode node2)
                        throws WTException
Inserts node1 immediately after node2 as a peer of node2. If node2 is 'null' node1 is inserted in the first position.

Supported API: true

Specified by:
insertAfter in interface ProjExecService
Parameters:
node1 -
node2 -
Returns:
ProjectNode
Throws:
WTException

insertBefore

public ProjectNode insertBefore(ProjectNode node1,
                                ProjectNode node2)
                         throws WTException
Inserts node1 immediately before node2 as a peer of node2. If node2 is 'null' node1 is inserted in the last position.

Supported API: true

Specified by:
insertBefore in interface ProjExecService
Parameters:
node1 -
node2 -
Returns:
ProjectNode
Throws:
WTException

linkDeliverable

public ProjectActivity linkDeliverable(ProjectActivity activity,
                                       Persistable target_obj,
                                       boolean latest)
                                throws WTException
Creates a 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.

Supported API: true

Specified by:
linkDeliverable in interface ProjExecService
Parameters:
activity -
target_obj -
latest -
Returns:
ProjectActivity
Throws:
WTException

linkDeliverable

public ProjectActivity linkDeliverable(ProjectActivity activity,
                                       Deliverable deliverable)
                                throws WTException
Links a 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:

Supported API: true

Specified by:
linkDeliverable in interface ProjExecService
Parameters:
activity -
deliverable -
Returns:
ProjectActivity
Throws:
WTException

removeNodesFromSummary

public QueryResult removeNodesFromSummary(SummaryActivity summary,
                                          Vector nodes)
                                   throws WTException
Removes a set of project nodes from the summary activity passed as argument. A project node (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.

Supported API: false

Specified by:
removeNodesFromSummary in interface ProjExecService
Parameters:
summary -
nodes -
Returns:
QueryResult
Throws:
WTException
See Also:
SummaryActivity, ProjectNode

removePredecessors

public ProjectNode removePredecessors(ProjectNode node,
                                      Vector predecessors)
                               throws WTException
Remove predecessors from the 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

Specified by:
removePredecessors in interface ProjExecService
Parameters:
node -
predecessors -
Returns:
ProjectNode
Throws:
WTException
See Also:
wt.projmgmt.definer.ProjectTypeLink, ProjectNode

replaceUser

public void replaceUser(WTContainer container,
                        WTUser replacedUser,
                        WTUser newUser)
                 throws WTException
Changes the ownership of ExecutionObjects in the container passed as argument. Both the old user and the new user are passed as argument.

Supported API: true

Specified by:
replaceUser in interface ProjExecService
Parameters:
container -
replacedUser -
newUser -
Throws:
WTException

setConfigFlags

public ProjectPlan setConfigFlags(ProjectPlan plan,
                                  boolean allow_change,
                                  boolean create_tasks,
                                  boolean compute_work)
                           throws WTException
Sets the 'allowStateChange', 'createTask', and 'updateWorkComputePerComp' flags in the 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.

Supported API: true

Specified by:
setConfigFlags in interface ProjExecService
Parameters:
plan -
allow_change -
create_tasks -
compute_work -
Returns:
ProjectPlan
Throws:
WTException

setContainedNodes

public void setContainedNodes(SummaryActivity summary,
                              Vector nodes)
                       throws WTException
Set the nodes contained in a SummaryActivity to be ones contained in the list passed as argument.

Supported API: false

Specified by:
setContainedNodes in interface ProjExecService
Parameters:
summary -
nodes -
Throws:
WTException
See Also:
ProjectNode

setDuration

public ExecutionObject setDuration(ExecutionObject exec_obj,
                                   TimeToElapse duration)
                            throws WTException
Sets the duration of an execution object.

Supported API: false

Specified by:
setDuration in interface ProjExecService
Parameters:
exec_obj -
duration -
Returns:
ExecutionObject
Throws:
WTException

setPerformerPlan

public ProjectProxy setPerformerPlan(ProjectProxy proxy,
                                     ProjectPlan plan)
                              throws WTException
Sets the performer 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):



Supported API: true

Specified by:
setPerformerPlan in interface ProjExecService
Parameters:
proxy -
plan -
Returns:
ProjectProxy
Throws:
WTException

setPredecessors

public ProjectNode setPredecessors(ProjectNode node,
                                   Vector predecessors,
                                   Vector link_types)
                            throws WTException
Sets the predecessors of the 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

Specified by:
setPredecessors in interface ProjExecService
Parameters:
node -
predecessors -
link_types -
Returns:
ProjectNode
Throws:
WTException
See Also:
wt.projmgmt.definer.ProjectTypeLink, ProjectNode

unlinkDeliverable

public ProjectActivity unlinkDeliverable(ProjectActivity activity)
                                  throws WTException
Unlinks the 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.

Supported API: true

Specified by:
unlinkDeliverable in interface ProjExecService
Parameters:
activity -
Returns:
ProjectActivity
Throws:
WTException

getProjectNodes

public QueryResult getProjectNodes(ProjectPlan plan,
                                   Class node_class,
                                   WTUser user,
                                   Integer queryLimit,
                                   String orderByStr)
                            throws WTException
Returns all enabled 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).

Supported API: true

Specified by:
getProjectNodes in interface ProjExecService
Parameters:
plan -
node_class -
user -
queryLimit -
orderByStr -
Returns:
QueryResult
Throws:
WTException
See Also:
ProjectActivity, SummaryActivity, Milestone

deleteContainedObjects

public void deleteContainedObjects(ProjectPlan plan)
                            throws WTException
Deletes all objects contained in the project plan passed as argument.

Supported API: false

Specified by:
deleteContainedObjects in interface ProjExecServiceSvr
Parameters:
plan -
Throws:
WTException
See Also:
ProjectPlan

getExecutionNode

public WfNode getExecutionNode(WfNodeTemplate node_template)
                        throws WTException
Returns the execution node that corresponds to a given template. Assumes a 1-1 relationship between templates and execution nodes. Throws a WTRuntimeException if this assumption is violated, indicating a badly formed project plan. Note that a 1-1 relationship is only valid for project management. The same doesn't happen for workflows.

Supported API: false

Specified by:
getExecutionNode in interface ProjExecServiceSvr
Parameters:
node_template -
Returns:
WfNode
Throws:
WTException

getAssociatedNode

public ProjectNode getAssociatedNode(WfConnector conn)
                              throws WTException
Returns the project node associated with a given connector. That is, the connector passed asargument is the input connector of the node returned.

Supported API: false

Specified by:
getAssociatedNode in interface ProjExecServiceSvr
Parameters:
conn -
Returns:
ProjectNode
Throws:
WTException

computeFinishTime

public Timestamp computeFinishTime(ProjectNode node,
                                   TimeToElapse duration)
                            throws WTException
Computes and returns the finish time for a given given the duration.

Supported API: false

Specified by:
computeFinishTime in interface ProjExecServiceSvr
Parameters:
node -
duration -
Returns:
Timestamp
Throws:
WTException

reassignWorkitems

public void reassignWorkitems(ContainerTeamManaged container,
                              WTUser user)
                       throws WTException
This method reassings all the work items for the user passed in to the responsible role.

Supported API: false

Specified by:
reassignWorkitems in interface ProjExecServiceSvr
Parameters:
container -
user -
Throws:
WTException

computeDuration

public TimeToElapse computeDuration(ExecutionObject exec_obj)
                             throws WTException
Computes the duration of an execution object.

Supported API: false

Specified by:
computeDuration in interface ProjExecServiceSvr
Parameters:
exec_obj -
Returns:
TimeToElapse
Throws:
WTException

rewirePredecessors

private void rewirePredecessors(ProjectNode node,
                                boolean propagate)
                         throws WTException
Links the predecessors of the node to its successors. Updates the start time of the successor nodes. This operation is performed when the node is deleted. This method should only be called within a transaction scope.

Throws:
WTException

shouldConnect

private boolean shouldConnect(WfNodeTemplate pred_temp,
                              WfNodeTemplate succ_temp)
                       throws WTException
Throws:
WTException

getLink

private NodeTemplateLink getLink(ObjectIdentifier source_id,
                                 ObjectIdentifier destination_id)
                          throws WTException
Throws:
WTException

adjustSuccessorConnectors

private void adjustSuccessorConnectors(ProjectNode node)
                                throws WTException
Updates the number of predecessors in a connector when a predecessor node is deleted.

Throws:
WTException

getSuccConns

private QueryResult getSuccConns(ProjectNode node)
                          throws WTException
Throws:
WTException

getSuccConnQS

private QuerySpec getSuccConnQS(ProjectNode node)
                         throws WTException
Throws:
WTException

getTemplateClass

private Class getTemplateClass(ProjectNode node)
                        throws WTException
Throws:
WTException

isInVector

private boolean isInVector(Vector vec,
                           Object obj)
                    throws WTException
Checks membership.

Throws:
WTException

moveAfter

private int moveAfter(WfContainer container,
                      ProjectNode node1,
                      ProjectNode node2,
                      List changed_nodes)
               throws WTException
Moves node1 to after node2.

Throws:
WTException

moveBefore

private int moveBefore(WfContainer container,
                       ProjectNode node1,
                       ProjectNode node2,
                       List changed_nodes)
                throws WTException
Moves node1 to before node2.

Throws:
WTException

getNewContainer

private WfContainer getNewContainer(ProjectNode node1,
                                    ProjectNode node2)
                             throws WTException
Returns the new container to which node1 should be added. Returns null if there is no change of container.

Throws:
WTException

addToContainer

private void addToContainer(WfContainer container,
                            ProjectNode node)
                     throws WTException
Adds node to container.

Throws:
WTException

getNodeId

private int getNodeId(Object object)
Gets node id.


setId

private int setId(ProjectNode node,
                  int new_id,
                  List changed_nodes)
           throws WTException
Sets node id.

Throws:
WTException

renumber

private int renumber(SummaryActivity summary,
                     List changed_nodes)
              throws WTException
Renumbers nodes contained in given summary.

Throws:
WTException

disableNodes

private void disableNodes(ProjectPlan plan)
                   throws WTException
Disables the nodes contained in the plan.

Throws:
WTException

disableDeliverables

private void disableDeliverables(ProjectPlan plan)
                          throws WTException
Disables the nodes contained in the plan.

Throws:
WTException

deleteWorkItems

private void deleteWorkItems(ProjectPlan plan)
                      throws WTException
Deletes plan's work items and assignments..

Throws:
WTException

changePredecessors

private ProjectNode changePredecessors(ProjectNode node,
                                       Vector predecessors,
                                       Vector link_types,
                                       boolean remove)
                                throws WTException
Add or remove predecessors. Predecessors are added/removed according to the following rules:

Throws:
WTException

getWfNode

public WfNode getWfNode(WfTemplateObject node_template)
                 throws WTException
Throws:
WTException

getWfConnector

private WfConnector getWfConnector(WfConnectorTemplate conn_template)
                            throws WTException
Throws:
WTException

reparentNodes

private void reparentNodes(SummaryActivity summary)
                    throws WTException
Throws:
WTException

adoptDeliverables

private void adoptDeliverables(ExecutionObject holder)
                        throws WTException
Throws:
WTException

deleteConnectors

private void deleteConnectors(SummaryActivity summary)
                       throws WTException
Throws:
WTException

getNextId

private int getNextId(ProjectPlan plan)
               throws WTException
Throws:
WTException

reorderNodeIds

private void reorderNodeIds(ProjectPlan plan,
                            int removed_id)
                     throws WTException
Throws:
WTException

setDeliverableAttributes

private void setDeliverableAttributes(ProjectActivity activity,
                                      Deliverable deliverable)
                               throws WTException
Throws:
WTException

copyNodeAttributes

private void copyNodeAttributes(ProjectNode from,
                                ProjectNode to)

resetDynamicAttributes

private void resetDynamicAttributes(ProjectNode node)

copySubscriptions

private ExecutionObject copySubscriptions(ExecutionObject from,
                                          ExecutionObject to)
                                   throws WTException
Throws:
WTException

copyWfAttributes

private void copyWfAttributes(WfExecutionObject from,
                              WfExecutionObject to)

copyWfTemplateAttributes

private void copyWfTemplateAttributes(WfTemplateObject fromTemplate,
                                      WfTemplateObject toTemplate)

transferDependencies

private void transferDependencies(ProjectNodeTemplate from,
                                  ProjectNodeTemplate to)
                           throws WTException
Throws:
WTException

transferContainment

private WfTemplateObject transferContainment(WfTemplateObject from,
                                             WfTemplateObject to)
                                      throws WTException
Throws:
WTException

delete

private void delete(ExecutionObject exec_obj)
             throws WTException
Throws:
WTException

deleteWorkItems

private static void deleteWorkItems(ProjectActivity activity)
                             throws WTException
Throws:
WTException

deleteObjects

private void deleteObjects(ProjectPlan plan,
                           Class obj_class,
                           String ref_attr)
                    throws WTException
Throws:
WTException

contains

private boolean contains(SummaryActivity summary,
                         ProjectNode node)
                  throws WTException
Returns true if summary is equal to or contains node; false otherwise. The containment may be indirect.

Throws:
WTException

checkForDependency

private void checkForDependency(SummaryActivity summary,
                                ProjectNode node)
                         throws WTException
Throws exception if a dependency prevents the node to be added to the summary. This happens when the summary or one of its ancestors is a predecessor/successor of the node.

Note: we don't have to worry about the node's ancestors because the node is reparented.

Throws:
WTException

getAncestors

private Vector getAncestors(ProjectNode node)
                     throws WTException
Returns all ancestor nodes of a project node, including itself. The ids of the ancestors are returned (rather than the actual nodes).

Throws:
WTException

hasDependency

private boolean hasDependency(ProjectNode node,
                              Vector nodes,
                              int direction)
                       throws WTException
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.

Throws:
WTException

checkDependencyCycle

private void checkDependencyCycle(ProjectNode node1,
                                  ProjectNode node2)
                           throws WTException
Throws exception if there is a dependency between an ancestor/descendent of n1 on an ancestor/descendent of n2.

Throws:
WTException

getNodeFamily

private HashSet getNodeFamily(ProjectNode node)
                       throws WTException
Retrieves all ancestors and descendents of the node (containment hierarchy). The node itself is included but the host plan is not.

Throws:
WTException

addDescendents

private void addDescendents(SummaryActivity summary,
                            HashSet family)
                     throws WTException
Adds the descendents of the sumamry activity passed as argument to the set also passed as argument.

Throws:
WTException

shouldStart

private boolean shouldStart(ExecutionObject exec_obj,
                            ProjectNode node,
                            Vector predecessors,
                            Vector link_types)
                     throws WTException
Throws:
WTException

showObjs

private static String showObjs(List objs)
Returns a String contained the list of objects in the Vector.


getOidString

private static String getOidString(Object obj)

getOid

private static ObjectIdentifier getOid(Object obj)

getRef

private ObjectReference getRef(Object obj)
                        throws WTException
Throws:
WTException

reassignWorkitems

private void reassignWorkitems(Project2 project,
                               WTUser replacedUser,
                               WTUser newUser)
                        throws WTException
Throws:
WTException

getIntervalNodes

protected QueryResult getIntervalNodes(ProjectPlan plan,
                                       int min,
                                       int max)
                                throws WTException
Returns all nodes such that id >= min and id <= max. The nodes are sorted by their ids.

Throws:
WTException

setInstanceAttributes

protected ProjectNode setInstanceAttributes(ProjectNode node,
                                            WfContainer container,
                                            Vector predecessors,
                                            Vector link_types)
                                     throws WTException
Initializes attributes that depends on the plan to which the node is being added. These attributes are:

Throws:
WTException

getLastNode

protected ProjectNode getLastNode(SummaryActivity summary)
                           throws WTException
Gets the last node (of highest id) that belongs to the given container. Returns 'null' if container is empty.

Throws:
WTException

addToSummary

public QueryResult addToSummary(SummaryActivity summary,
                                Vector nodes,
                                boolean reorder)
                         throws WTException
Throws:
WTException

removeFromSummary

protected QueryResult removeFromSummary(SummaryActivity summary,
                                        Vector nodes,
                                        boolean reorder)
                                 throws WTException
Throws:
WTException

getPreds

private QueryResult getPreds(ProjectNode node)
                      throws WTException
Internal version of getPredecessors: no caching.

Throws:
WTException

getPredQS

private QuerySpec getPredQS(ObjectIdentifier conn_oid,
                            Class template_class,
                            Class exec_class)
                     throws WTException
Throws:
WTException

getSuccs

private QueryResult getSuccs(ProjectNode node)
                      throws WTException
Internal version of getSuccessors: no caching.

Throws:
WTException

getSuccQS

private QuerySpec getSuccQS(ProjectNode node,
                            Class exec_class)
                     throws WTException
Throws:
WTException

checkEnabledNotClosed

private void checkEnabledNotClosed(ExecutionObject exec_obj)
                            throws WTException
Throws an exception if object is not enaled or it's state is closed (COMPLETED or CANCELLED).

Throws:
WTException

checkLinkDeliverables

private void checkLinkDeliverables(ExecutionObject exec_obj)
                            throws WTException
Throws an exception if "link deliverables" option is not selected.

Throws:
WTException

isStartComputed

private boolean isStartComputed(Object object)
Returns start computed flag. Assumes argument is a WfExecutionObject.


getTimeToStart

private Timestamp getTimeToStart(Object object)
Returns time to start. Assumes argument is a WfExecutionObject.


getNodeTree

private void getNodeTree(ProjectPlan plan)
                  throws WTException,
                         WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getResourceActivities

public QueryResult getResourceActivities(ProjectPlan plan,
                                         ProjectResource resource)
                                  throws WTException
Retrieves activities which resource is assigned.

Supported API: false

Parameters:
plan -
resource -
Throws:
WTException

completeSummaryAfterDeletion

private void completeSummaryAfterDeletion(ProjectNode node)
                                   throws WTException
Completes containing summary when node is deleted if all remaining nodes are in the COMPLETED state.

Supported API: false

Parameters:
node -
Throws:
WTException