wt.projmgmt.monitor
Class StandardProjMonitorService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.projmgmt.monitor.StandardProjMonitorService
All Implemented Interfaces:
Manager, NetFactor, ProjMonitorService, ProjMonitorServiceSvr, Serializable

public class StandardProjMonitorService
extends StandardManager
implements ProjMonitorService, ProjMonitorServiceSvr, Serializable

The StandardProjMonitorService 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 newStandardProjMonitorService static factory method(s), not the StandardProjMonitorService 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:
ProjMonitorService, ProjMonitorServiceSvr, ProjMgmtService, Serialized Form

Field Summary
private static String CLASSNAME
           
private static String PROJECT_SCHEDULE_QUEUE_NAME
           
private  ScheduleQueue projectScheduleQueue
           
private static String PROJMGMT_PROPAGATION_QUEUE_NAME
          Project Management propagation queue.
private  ProcessingQueue projmgmtPropagationQueue
           
private static boolean PROPAGATE_STATUS_DESCRIPTION
           
private static int PROPAGATION_QUEUE_INTERVAL
           
private static String RESOURCE
           
static StandardProjMonitorService service
           
private static boolean USE_QUEUE
           
private static boolean VERBOSE
           
private static boolean VERBOSE_INFO
           
private static boolean VERBOSE_SCHEDULE
           
 
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
StandardProjMonitorService()
           
 
Method Summary
private  boolean addComponentWork(ExecutionObject container, ExecutionObject component)
          Returns 'true' is the work from a component should be added to an execution object; 'false' otherwise.
 ExecutionObject addDeliverable(ExecutionObject exec_obj, Deliverable deliverable)
          Adds Deliverable to ExecutionObject.
 ExecutionObject changeActualFinish(ExecutionObject exec_obj, Timestamp actual_finish)
          Changes the actual finish time for ExecutionObject objects to the time passed as argument.
 ExecutionObject changeActualStart(ExecutionObject exec_obj, Timestamp actual_start)
          Changes the actual start time for t.projmgmt.execution.ExecutionObject objects to the time passed as argument.
 ExecutionObject changeCompletionTime(ExecutionObject exec_obj, Timestamp new_time)
          Changes the completion time of the wt.projmgtm.execution.ExecutionObject to the time passed as argument.
 ExecutionObject changeCost(ExecutionObject exec_obj, Currency new_total_cost, Currency new_curr_cost)
          Changes the total and current costs of the execution object passed as argument.
 ExecutionObject changeDeadline(ExecutionObject exec_obj, Timestamp new_deadline)
          Changes deadline of the ExecutionObject passed as argument.
 ExecutionObject changeDuration(ExecutionObject exec_obj, TimeToElapse new_duration)
          Changes the duration of the ExecutionObject passed as argument.
 ExecutionObject changeEstimatedFinish(ExecutionObject exec_obj, Timestamp new_finish)
          Changes expected finish date for the ExecutionObject.
 ExecutionObject changeExecutionState(ExecutionObject exec_obj, ProjectState new_state)
          Changes execution state of the ExecutionObject passed as argument.
 ExecutionObject changeMonitorInfo(ExecutionObject exec_obj, MonitorInfo new_info)
          Changes dynamic information associated with the ExecutionObject passed as argument.
 ExecutionObject changeOwner(ExecutionObject exec_obj, WTPrincipal new_owner)
          Changes the owner of the ExecutionObject passed as argument.
 ExecutionObject changePercentComplete(ExecutionObject exec_obj, int new_percent, Work total_work)
          Changes the percent complete the ExecutionObject passed as argument.
 ExecutionObject changeRollUpDeliverables(ExecutionObject exec_obj, boolean roll_up)
          Changes the roll up deliverables flag in the ExecutionObject passed as argument.
 ExecutionObject changeStatus(ExecutionObject exec_obj, ProjectHealthStatus new_status, String desc)
          Changes health status (ProjectHealthStatus of execution object passed as argument.
 ExecutionObject changeTimePastDeadline(ExecutionObject exec_obj, TimeToElapse new_time)
          Changes the time interval past deadline of the ExecutionObject passed as argument.
 ExecutionObject changeTimeToDeadline(ExecutionObject exec_obj, TimeToElapse new_time)
          Changes the time interval to deadline of the ExecutionObject passed as argument.
 ExecutionObject changeTimeToStart(ExecutionObject exec_obj, Timestamp new_start)
          Changes the time to start of an ExecutionObject to the time passed as argument.
private  void checkClosedAccess(ExecutionObject exec_obj)
          Throws an exception user can't change object in the closed state.
private  void checkEnabledManual(ExecutionObject exec_obj)
          Throws an exception if object is not enabled or mode is not manual.
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 checkEnabledRunning(ExecutionObject exec_obj)
          Throws an exception if the object is not running.
private  void checkManualOrRunning(ExecutionObject exec_obj)
          Throws an exception if change isn't valid given the object's state.
private  ProjectState checkState(Deliverable deliverable, ProjectState new_state)
           
private  ExecutionObject completeExecObject(ExecutionObject exec_obj)
          Completes execution object.
 void completeWorkItem(ProjectWorkItem work_item, WTPrincipalReference p_ref, Vector events)
          Completes the ProjectWorkItem passed as argument.
private  MonitorInfo computeInfo(ExecutionObject exec_obj, ExecutionObject skip_object, boolean recurse)
          Compute status of execution object based on its aggregates.
private  Timestamp computeInheritedDeadline(ExecutionObject exec_obj)
          Computes inherited deadline.
private  boolean containsSubscriber(Vector subscribers, ObjectReference subs_ref)
          Returns whether a Vector of subscribers contains a specific subscriber whose reference is passed as argument.
private  ProcessingQueue createQueue(String queue_name, int queue_interval)
          Creates, sets and starts processing queues.
 void deleteContainedObjects(ProjectPlan plan)
          

Supported API: false
private  QueryResult deleteHolderLinks(ExecutionObject exec_obj)
          Deletes holder links and returns an enumeration with the holders of the execution object (deliverable or node);
private  void deletePreviousEntries(String method_name, ExecutionObject exec_obj)
          Deletes a previous schedule entry for the method and target object specified.
private  void deleteSubscriptions(ExecutionObject exec_obj)
          Deletes all subscriptions of the object passed as argument.
private  boolean equals(Object obj1, Object obj2)
          Checks for equality when one or both of the objects might be null.
 String getConceptualClassname()
          Deprecated.  
private  Vector getContainedLinkTemplates(WfContainer container)
           
private  ObjectIdentifier getOid(Object obj)
           
private  String getOidString(Object obj)
           
 QueryResult getProjectHistory(ProjectPlan plan, Vector source_objects, Vector event_types)
          Deprecated.  
 QueryResult getProjectSubscriptions(ProjectPlan plan, WTUser user)
          Returns all ObjectSubscription associated with the project and user passed as arguments.
 ProcessingQueue getPropagationQueue()
          Returns project management propagation queue.
 MonitorInfo getRolledUpValues(ExecutionObject exec_obj)
          Returns dynamic values from contained objects.
private  ScheduleQueue getScheduleQueue()
          Returns project schedule queue.
private  Timestamp getStartTime(Object object)
          Returns time to start.
protected  ProjectState getStateToPropagate(Deliverable deliverable, ProjectState new_state, ProjectState old_state)
          Propagates state to deliverables.
 Enumeration getSubscribers(ExecutionObject exec_obj, ProjectEventType event)
          Get all subscribers for an event for the ExecutionObject passed as argument.
private  String getSubscriberString(Vector subscribers)
          Debugging method that returns a string containing subscribers' names.
private  QuerySpec getSubscriptionQS(ProjectPlan plan, WTUser user, Class target_class, String plan_ref_attr_name)
          Returns all subscriptions associated with objects of the target class that are contained in the project plan.
 QueryResult getSubscriptions(ExecutionObject exec_obj, WTUser user)
          Returns all ObjectSubscription directly associated with the ExecutionObject and the WTUser passed as arguments.
private  Timestamp getTimeToStart(Object object)
          Returns time to start.
 boolean hasHistory(ExecutionObject exec_obj)
          Determines whether the object has events associated with it.
private  boolean inThePast(Timestamp time)
          Determines if a given time has already past.
private  boolean isHeld(Deliverable deliverable)
          Returns whether the deliverable is held by a holder.
 boolean isManager(ProjectPlan plan, WTUser user)
          Returns 'true' if a wt.or.WTUser is a manager of the project that owns the ProjectPlan passed as argument.
private static boolean isManualOrRunning(ExecutionObject exec_obj)
          Returns whether the object's plan is in manual mode or the object is RUNNING.
private  boolean isPropagateInfo(ExecutionObject exec_obj, ExecutionObject from_obj, MonitorInfo old_info, boolean is_removal)
          Determines whether an object change or removal causes propagation.
private  boolean isStartComputed(Object object)
          Returns start computed flag.
private  boolean isUnoverride(ExecutionObject exec_obj)
          Determines whether there is a need to possibly un-override attribute roll up flags.
private  void markWorkItemsComplete(ProjectActivity activity)
          Marks project work items associated with the activity passed as argument as "completed".
static StandardProjMonitorService newStandardProjMonitorService()
          Default factory for the class.
static void processDeadline(ObjectIdentifier exec_obj_id, Timestamp time)
          Executes code associated with arrival of a deadline on an execution object.
static void processTimePastDeadline(ObjectIdentifier exec_obj_id, Timestamp time)
          Executes code associated with missing a deadline on an execution object by some time.
static void processTimeToDeadline(ObjectIdentifier exec_obj_id, Timestamp time)
          Executes code associated with arrival the nearing of a deadline on an execution object.
 void propagateChange(ExecutionObject exec_obj, MonitorInfo old_info)
          Propagates to containing objects a change in an execution object.
private  void propagateDeadline(ExecutionObject exec_obj, Timestamp deadline)
          Propagates deadline to dependent objects.
static void propagateDeadline(ObjectIdentifier exec_obj_id, Timestamp deadline)
          Propagates deadline to dependent objects.
 void propagateDeletion(ExecutionObject exec_obj)
          

Supported API: false
private  void propagateInfo(ExecutionObject exec_obj, MonitorInfo old_info)
          Propagates information up.
static void propagateInfo(ObjectIdentifier exec_obj_id, MonitorInfo old_info)
          Propagates information up
private  void propagateNewDeadline(ExecutionObject exec_obj, Timestamp deadline)
          Propagates deadline to dependent objects.
 void propagateNewState(ExecutionObject exec_obj, ProjectState old_state)
          

Supported API: false
 void propagateRemoval(ProjectNode node)
          Propagates dynamic information changed when a node is removed from a container as a result of a container change operation.
private  void propagateState(ExecutionObject exec_obj, ProjectState old_state)
          Propagates state change to dependent objects.
static void propagateState(ObjectIdentifier exec_obj_id, ProjectState old_state)
          Propagates state change to dependent objects.
 ProjectNode propagateStateChange(ProjectNode node, WfTransition transition, ProjectState old_state)
          Performs propagation tasks associated with state changes.
 void propagateStatusAfterRemoval(ExecutionObject exec_obj)
          

Supported API: false
 Project2 propagateToProject2(ProjectPlan plan)
          Propagate changes from the specified ProjectPlan to its associated Project2 (if it has one).
 void queueDeadline(ExecutionObject exec_obj)
          Queues deadline so that when it arrives, the event is notified.
 void queueTimePastDeadline(ExecutionObject exec_obj)
          Queues deadline so that when the deadline is approaching, the event is notified.
 void queueTimeToDeadline(ExecutionObject exec_obj)
          Queues deadline so that when the deadline is approaching, the event is notified.
private  void queueWorkComplete(ProjectWorkItem work_item, WTPrincipalReference p_ref, Vector events)
          Queue work complete: this has to be queued so it is guaranteed to work after the propagation of the percent complete
 DeliverableHolder removeDeliverable(DeliverableHolder holder, Deliverable deliverable)
          Removes deliverable to execution object.
private  ProjectNode removeViolatedDependencies(ProjectNode node)
          Removes all dependencies that node has for which the predecessor is not in the COMPLETED state.
private  void removeWorkItems(ProjectActivity activity)
          Remove project work items associated with the activity passed as argument.
 ExecutionObject rollUpChangeEstimatedFinish(ExecutionObject exec_obj, Timestamp new_finish)
           
 WfContainer rollUpTimeToStart(WfContainer container)
          Updates the time to start of a WfContainer based on its contained objects if its "start computed" flag is true.
 ExecutionObject rollUpValues(ExecutionObject exec_obj)
          Computes and sets dynamic values of the execution object.
 ExecutionObject rollUpValues(ExecutionObject exec_obj, ExecutionConfiguration roll_up_attrs)
          Computes and sets dynamic values of the execution object.
private  boolean same(Object o1, Object o2)
          Like equals but handles null objects.
private  void setAttributes(ExecutionObject from, ExecutionObject to)
          Synchronizes associated deliverable/activity is "link deliverables' is selected.
private  String showFlags(ExecutionObject exec_obj)
          Queue work complete: this has to be queued so it is guaranteed to work after the propagation of the percent complete
private  String showVector(List objs)
          Returns a String contained the list of persistables in the Vector.
 void subscribe(ExecutionObject exec_obj, ProjectEventType event, Vector subscribers, String msg)
          Create ObjectSubscription objects for an event for a given object.
 void subscribe(ExecutionObject exec_obj, ProjectEventType event, Vector subscribers, String msg, String attr_name, String attr_value, String key)
          Create ObjectSubscription objects for an event for a given object.
(package private)  void synchDeliverable(ExecutionObject exec_obj)
          Synchronizes associated deliverable/activity is "link deliverables' is selected.
private  ExecutionObject unoverride(ExecutionObject exec_obj)
          Unoverrides status, percent complete, and estimated finish roll up flags.
 void unsubscribe(ExecutionObject exec_obj, ProjectEventType event, Vector subscribers)
          Delete ObjectSubscription for an event and a given object.
 void unsubscribe(ExecutionObject exec_obj, ProjectEventType event, Vector subscribers, String msg, String attr_name, String attr_value, String key)
          Create ObjectSubscription objects for an event for a given object.
static void workComplete(ObjectIdentifier work_item_id, WTPrincipalReference p_ref, Vector events)
           
 
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

PROJECT_SCHEDULE_QUEUE_NAME

private static final String PROJECT_SCHEDULE_QUEUE_NAME
See Also:
Constant Field Values

projectScheduleQueue

private ScheduleQueue projectScheduleQueue

PROJMGMT_PROPAGATION_QUEUE_NAME

private static final String PROJMGMT_PROPAGATION_QUEUE_NAME
Project Management propagation queue.

See Also:
Constant Field Values

projmgmtPropagationQueue

private ProcessingQueue projmgmtPropagationQueue

USE_QUEUE

private static final boolean USE_QUEUE

PROPAGATION_QUEUE_INTERVAL

private static final int PROPAGATION_QUEUE_INTERVAL

service

public static final StandardProjMonitorService service

VERBOSE

private static final boolean VERBOSE

VERBOSE_INFO

private static final boolean VERBOSE_INFO

VERBOSE_SCHEDULE

private static final boolean VERBOSE_SCHEDULE

PROPAGATE_STATUS_DESCRIPTION

private static final boolean PROPAGATE_STATUS_DESCRIPTION
Constructor Detail

StandardProjMonitorService

public StandardProjMonitorService()
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

processDeadline

public static void processDeadline(ObjectIdentifier exec_obj_id,
                                   Timestamp time)
                            throws WTException
Executes code associated with arrival of a deadline on an execution object. Typically this consists of sending notification to interested parties.

Supported API: false

Parameters:
exec_obj_id -
time -
Throws:
WTException

processTimeToDeadline

public static void processTimeToDeadline(ObjectIdentifier exec_obj_id,
                                         Timestamp time)
                                  throws WTException
Executes code associated with arrival the nearing of a deadline on an execution object. Typically this consists of sending notification to interested parties.

Supported API: false

Parameters:
exec_obj_id -
time -
Throws:
WTException

processTimePastDeadline

public static void processTimePastDeadline(ObjectIdentifier exec_obj_id,
                                           Timestamp time)
                                    throws WTException
Executes code associated with missing a deadline on an execution object by some time. Typically this consists of sending notification to interested parties.

Supported API: false

Parameters:
exec_obj_id -
time -
Throws:
WTException

newStandardProjMonitorService

public static StandardProjMonitorService newStandardProjMonitorService()
                                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardProjMonitorService
Throws:
WTException

addDeliverable

public ExecutionObject addDeliverable(ExecutionObject exec_obj,
                                      Deliverable deliverable)
                               throws WTException
Adds Deliverable to ExecutionObject. A deliverable can belong to at most one ProjectActivity, so if the execution object is an activity and the deliverable already belongs to an activity, the deliverable owner is replaced. Propagates deliverable status, if necessary.

Supported API: true

Specified by:
addDeliverable in interface ProjMonitorService
Parameters:
exec_obj -
deliverable -
Returns:
ExecutionObject
Throws:
WTException

changeActualFinish

public ExecutionObject changeActualFinish(ExecutionObject exec_obj,
                                          Timestamp actual_finish)
                                   throws WTException
Changes the actual finish time for ExecutionObject objects to the time passed as argument. The new actual time is aligned before it is set. The ability to set actual finish is supported only for the manual execution mode. If the mode is not manual, then an exception is thrown. This operation is restricted to the owner of the object or the project manager. An authorization exception is thrown if this is nt the case. Changing the finish time of an object is propagated to all objects whose schedule depend on the modified object and have not started yet. If a following, dependent object has already started, then the start and finish dates for that dependent activity are not adjusted.

Completing objects

If the object has not completed, providing a non-null time has the effect of completing it. As a consequence, the % complete is automatically set to 100%.

Supported API: false

Specified by:
changeActualFinish in interface ProjMonitorService
Parameters:
exec_obj -
actual_finish -
Returns:
ExecutionObject
Throws:
WTException

changeActualStart

public ExecutionObject changeActualStart(ExecutionObject exec_obj,
                                         Timestamp actual_start)
                                  throws WTException
Changes the actual start time for t.projmgmt.execution.ExecutionObject objects to the time passed as argument. The new actual time is aligned before it is set. The ability to set actual start is supported only for the manual execution mode. If the mode is not manual, then an exception is thrown. This operation is restricted to the owner of the object or the project manager. An uthorization exception is thrown if this is not the case. For objects that are not completed, the estimated finish is updated based on the object's duration. This new finish is propagated to all dependent objects that have not started yet. If a following, dependent object has already started, then the start and finish dates for that dependent activity are not adjusted. Changing the actual start for completed objects changes does not change the actual finish. An exception is thrown when the user attempts to change the actual start to a time after the actual finish.

Starting objects

If the object has not started, providing a non-null start time has the effect of starting it, even though the % complete may be greater than zero.

Unstarting objects

If the time passed as argument is 'null' the object changes to a 'non-started' state ("unstarted").This has the following side-effects: % complete, status and other dynamic information are reset and actual finish is reset (for completed objects).

Supported API: false

Specified by:
changeActualStart in interface ProjMonitorService
Parameters:
exec_obj -
actual_start -
Returns:
ExecutionObject
Throws:
WTException

changeCompletionTime

public ExecutionObject changeCompletionTime(ExecutionObject exec_obj,
                                            Timestamp new_time)
                                     throws WTException
Changes the completion time of the wt.projmgtm.execution.ExecutionObject to the time passed as argument. A ProjectManagementException is thrown in the following cases. Notes:

Supported API: true

Specified by:
changeCompletionTime in interface ProjMonitorService
Parameters:
exec_obj -
new_time -
Returns:
ExecutionObject
Throws:
WTException
See Also:
wt.projmgmt.ProjectState

changeCost

public ExecutionObject changeCost(ExecutionObject exec_obj,
                                  Currency new_total_cost,
                                  Currency new_curr_cost)
                           throws WTException
Changes the total and current costs of the execution object passed as argument. The cost change is propagated to all other execution objects that depend on the one passed as argument. NoteThese costs are only work costs; they don't include costs derived from resources other than person resources.

Supported API: true

Specified by:
changeCost in interface ProjMonitorService
Parameters:
exec_obj -
new_total_cost -
new_curr_cost -
Returns:
ExecutionObject
Throws:
WTException

changeDeadline

public ExecutionObject changeDeadline(ExecutionObject exec_obj,
                                      Timestamp new_deadline)
                               throws WTException
Changes deadline of the ExecutionObject passed as argument. The deadline is propagated to contained objects as an "inherited deadline." Schedules a DEADLINE event to be generated at the deadline if the object is still running at this time. If there are subscribers to this event and to this object, they will receive notification that the deadline has passed.

Supported API: true

Specified by:
changeDeadline in interface ProjMonitorService
Parameters:
exec_obj -
new_deadline -
Returns:
ExecutionObject
Throws:
WTException

changeDuration

public ExecutionObject changeDuration(ExecutionObject exec_obj,
                                      TimeToElapse new_duration)
                               throws WTException
Changes the duration of the ExecutionObject passed as argument. As a consequence of this operation, the estimated finished time of the object is updated and set to "overriden." Propagates scheduling changes to holder objects.

Supported API: true

Specified by:
changeDuration in interface ProjMonitorService
Parameters:
exec_obj -
new_duration -
Returns:
ExecutionObject
Throws:
WTException

changeEstimatedFinish

public ExecutionObject changeEstimatedFinish(ExecutionObject exec_obj,
                                             Timestamp new_finish)
                                      throws WTException
Changes expected finish date for the ExecutionObject. As a consequence of this operation, the duration of the object is updated and set to "overriden." Propagates scheduling changes to holder objects.

Supported API: true

Specified by:
changeEstimatedFinish in interface ProjMonitorService
Parameters:
exec_obj -
new_finish -
Returns:
ExecutionObject
Throws:
WTException

changeExecutionState

public ExecutionObject changeExecutionState(ExecutionObject exec_obj,
                                            ProjectState new_state)
                                     throws WTException
Changes execution state of the ExecutionObject passed as argument. Changing the execution state of objects may cause scheduling and other changes. For example, starting may change the estimated finish; completing sets % complete to 100. These changes are propagated to nodes in the plan that are dependent on the node that changed state.

Supported API: true

Specified by:
changeExecutionState in interface ProjMonitorService
Parameters:
exec_obj -
new_state -
Returns:
ExecutionObject
Throws:
WTException

changeMonitorInfo

public ExecutionObject changeMonitorInfo(ExecutionObject exec_obj,
                                         MonitorInfo new_info)
                                  throws WTException
Changes dynamic information associated with the ExecutionObject passed as argument. This dynamic information is contained in a MonitorInfo object and consists of status (ProjectHealthStatus), percent complete, estimated finish date, performed work, and total work. The advantage of using this API over updating each piece of information separately is that all the information is propagated together, reducing the number of propagation threads.

Supported API: true

Specified by:
changeMonitorInfo in interface ProjMonitorService
Parameters:
exec_obj -
new_info -
Returns:
ExecutionObject
Throws:
WTException

changeOwner

public ExecutionObject changeOwner(ExecutionObject exec_obj,
                                   WTPrincipal new_owner)
                            throws WTException
Changes the owner of the ExecutionObject passed as argument. Existing owner subscriptions are transferred to new owner.

Supported API: true

Specified by:
changeOwner in interface ProjMonitorService
Parameters:
exec_obj -
new_owner -
Returns:
ExecutionObject
Throws:
WTException

changePercentComplete

public ExecutionObject changePercentComplete(ExecutionObject exec_obj,
                                             int new_percent,
                                             Work total_work)
                                      throws WTException
Changes the percent complete the ExecutionObject passed as argument. If the final percent is 100%, this causes the object to change to the COMPLETED state. The percent change is propagated to all other execution objects that depend on the one passed as argument.

The percent complete of an execution object is related to the performed and total work through the formula (class invariant): percentComplete = performedWork / totalWork Also the performed work can't be greater than the total work.

 performedWork <= totalWork
 
This means that changing the percent complete necessarily changes the performed work. In case the total work is zero, performed work is necessarily also zero. In this case the convention is to set percent complete to 100. Note also that when propagating percent complete, to holder objects it is the performed work and total work that are actually propagated.

Supported API: true

Specified by:
changePercentComplete in interface ProjMonitorService
Parameters:
exec_obj -
new_percent -
total_work -
Returns:
ExecutionObject
Throws:
WTException

changeRollUpDeliverables

public ExecutionObject changeRollUpDeliverables(ExecutionObject exec_obj,
                                                boolean roll_up)
                                         throws WTException
Changes the roll up deliverables flag in the ExecutionObject passed as argument. If the flag is set to 'true' then the dynamic values of the plan are obtained from the deliverables rather than from the activities. Although one can pass an execution object as argument, it is preferable to pass a ProjectPlan. Otherwise one may get inconsistent values throughout the plan. NoteOnly the dynamic values that are not overridden are actually rolled up.

Supported API: true

Specified by:
changeRollUpDeliverables in interface ProjMonitorService
Parameters:
exec_obj -
roll_up -
Returns:
ExecutionObject
Throws:
WTException

changeStatus

public ExecutionObject changeStatus(ExecutionObject exec_obj,
                                    ProjectHealthStatus new_status,
                                    String desc)
                             throws WTException
Changes health status (ProjectHealthStatus of execution object passed as argument. A status description can be optionally provided. The status change is propagated to all other execution objects that depend on the one passed as argument whose status values are not overridden.

Supported API: true

Specified by:
changeStatus in interface ProjMonitorService
Parameters:
exec_obj -
new_status -
desc -
Returns:
ExecutionObject
Throws:
WTException

changeTimePastDeadline

public ExecutionObject changeTimePastDeadline(ExecutionObject exec_obj,
                                              TimeToElapse new_time)
                                       throws WTException
Changes the time interval past deadline of the ExecutionObject passed as argument. Schedules a TIME_PAST_DEADLINE event to be generated at a time equals to deadline + new_time if the object is still running at this time. If there are subscribers to this event and to this object, they will receive notification that the deadline has passed.

Supported API: true

Specified by:
changeTimePastDeadline in interface ProjMonitorService
Parameters:
exec_obj -
new_time -
Returns:
ExecutionObject
Throws:
WTException

changeTimeToDeadline

public ExecutionObject changeTimeToDeadline(ExecutionObject exec_obj,
                                            TimeToElapse new_time)
                                     throws WTException
Changes the time interval to deadline of the ExecutionObject passed as argument. Schedules a TIME_TO_DEADLINE event to be generated at a time equals to deadline - new_time if the object is still running at this time. If there are subscribers to this event and to this object, they will receive notification that the deadline is approaching.

Supported API: true

Specified by:
changeTimeToDeadline in interface ProjMonitorService
Parameters:
exec_obj -
new_time -
Returns:
ExecutionObject
Throws:
WTException

changeTimeToStart

public ExecutionObject changeTimeToStart(ExecutionObject exec_obj,
                                         Timestamp new_start)
                                  throws WTException
Changes the time to start of an ExecutionObject to the time passed as argument. If the time passed as argument is 'null' the time is set to the earliest possible date.

The state of the object must be ProjectState.DEFINED (that is, not started yet) otherwise an exception is thrown.

Also an exception is thrown if a date constraint is violated (for example, start the object before the time a predecessor node finishes).

As a consequence of this method, if the time is not null, the "start computed" flag is set to 'false' indicating that the time to start is explicitly set. Otherwise it is set to 'true'.

The new start time is propagated to the container of the object if there are no predecessors that belong to the same container. Also new estimated finish is computed and propagated to successor nodes and to the container if there are no successor nodes that belong to the same container.

Note:This method doesn't apply to deliverables and project work items.

Supported API: true

Specified by:
changeTimeToStart in interface ProjMonitorService
Parameters:
exec_obj -
new_start -
Returns:
ExecutionObject
Throws:
WTException
See Also:
ProjectState, ExecutionObject, ProjectNode

completeWorkItem

public void completeWorkItem(ProjectWorkItem work_item,
                             WTPrincipalReference p_ref,
                             Vector events)
                      throws WTException
Completes the ProjectWorkItem passed as argument. The user assigned to the work item and a list of events should be passed as well. For project management the list should be empty. Percent complete is set to 100 and this and other dynamic values are propagated to the ProjectActivity that holds the item.

Supported API: true

Specified by:
completeWorkItem in interface ProjMonitorService
Parameters:
work_item -
p_ref -
events -
Throws:
WTException

getProjectHistory

public QueryResult getProjectHistory(ProjectPlan plan,
                                     Vector source_objects,
                                     Vector event_types)
                              throws WTException
Deprecated.  

Returns all events associated with a given plan and source objects that are of the types given in the 'event_types' Vector. If the execution object vector passed as argument is null, events for all objects of the plan are returned. If the 'event_types' Vector is null, all events are returned. Whatever is the option chosen, the events are returned in the order they occurred. The project plan argument is only considered when the execution object is null. NoteOnly recorded events are retrieved. Which events are recorded is controlled through properties definable in wt.properties. The properties are the following and should be set to "true" for the ones that should be recorded.

Specified by:
getProjectHistory in interface ProjMonitorService
Parameters:
plan -
source_objects -
event_types -
Returns:
QueryResult
Throws:
WTException

getProjectSubscriptions

public QueryResult getProjectSubscriptions(ProjectPlan plan,
                                           WTUser user)
                                    throws WTException
Returns all ObjectSubscription associated with the project and user passed as arguments. The subscriptions may be associated directly with the plan or to one of its contained nodes (ProjectNode). If user is 'null' all plan subscriptions are returned.

Supported API: true

Specified by:
getProjectSubscriptions in interface ProjMonitorService
Parameters:
plan -
user -
Returns:
QueryResult
Throws:
WTException

getRolledUpValues

public MonitorInfo getRolledUpValues(ExecutionObject exec_obj)
                              throws WTException
Returns dynamic values from contained objects. These values are the health status, percent complete, estimated finish time, and total work. For example, if the passed object is a project activity, returns the values as computed from contained workitems. The execution object passed as argument must be a ProjectActivity or a Milestone or a SummaryActivity or a ProjectPlan, otherwise a runtime exception is thrown.

Supported API: true

Specified by:
getRolledUpValues in interface ProjMonitorService
Parameters:
exec_obj -
Returns:
MonitorInfo
Throws:
WTException

getSubscribers

public Enumeration getSubscribers(ExecutionObject exec_obj,
                                  ProjectEventType event)
                           throws WTException
Get all subscribers for an event for the ExecutionObject passed as argument. The list of subscribers is returned as an enumeration.

Supported API: true

Specified by:
getSubscribers in interface ProjMonitorService
Parameters:
exec_obj -
event -
Returns:
Enumeration
Throws:
WTException

getSubscriptions

public QueryResult getSubscriptions(ExecutionObject exec_obj,
                                    WTUser user)
                             throws WTException
Returns all ObjectSubscription directly associated with the ExecutionObject and the WTUser passed as arguments. If user is null all object's subscriptions are returned.

Supported API: true

Specified by:
getSubscriptions in interface ProjMonitorService
Parameters:
exec_obj -
user -
Returns:
QueryResult
Throws:
WTException

isManager

public boolean isManager(ProjectPlan plan,
                         WTUser user)
                  throws WTException
Returns 'true' if a wt.or.WTUser is a manager of the project that owns the ProjectPlan passed as argument. Returns 'false' otherwise.

Supported API: true

Specified by:
isManager in interface ProjMonitorService
Parameters:
plan -
user -
Returns:
boolean
Throws:
WTException

removeDeliverable

public DeliverableHolder removeDeliverable(DeliverableHolder holder,
                                           Deliverable deliverable)
                                    throws WTException
Removes deliverable to execution object. Updates execution object status that have been changed because of the removal.

Supported API: true

Specified by:
removeDeliverable in interface ProjMonitorService
Parameters:
holder -
deliverable -
Returns:
DeliverableHolder
Throws:
WTException

rollUpValues

public ExecutionObject rollUpValues(ExecutionObject exec_obj,
                                    ExecutionConfiguration roll_up_attrs)
                             throws WTException
Computes and sets dynamic values of the execution object. The dynamic values are the health status, the percent complete, the estimated finish date, the total work and the total cost. The computation is based on the values of the contained objects. If the recomputed value is different from the current one, the new values are propagated up the containment hierarchy.

The method allows the rolling up of specific attributes. This is accomplished by setting appropriate attributes in the ExecutionConfiguration passed as argument. For example, to roll up just the status and work of an activity, while keeping all other values the same (whether rolled up or overridden), use the following steps. ExecutionConfiguration config = new ExecutionConfiguration (0L); config.setRollUpStatus (true); config.setRollUpWork (true); activity = (ProjectActivity) ProjMonitorHelper.service.rollUpValues (activity, config);

Notes



Supported API: true

Specified by:
rollUpValues in interface ProjMonitorService
Parameters:
exec_obj -
roll_up_attrs -
Returns:
ExecutionObject
Throws:
WTException

rollUpValues

public ExecutionObject rollUpValues(ExecutionObject exec_obj)
                             throws WTException
Computes and sets dynamic values of the execution object. The dynamic values are the health status, the percent complete, the total work and the total cost. The computation is based on the values of the contained objects. If the recomputed value is different from the current one. The new values are not propagated up the containment hierarchy. This is the responsibility of the client code. Also if the execution object passed as argument is closed (COMPLETED or CANCELLED), then the values are not computed and taken as they are.

This method differs from the othe rollUpValues in 2 additional aspects. First all dynamic values are recomputed and, second, the method recursively computes the dynamic values of the contained objects. This method can be used to make sure that all dynamic values are consistent. In this aspect it is particularly useful in batch operations, when all propagation made only once, after all changes are performed.

Supported API: false

Specified by:
rollUpValues in interface ProjMonitorService
Parameters:
exec_obj -
Returns:
ExecutionObject
Throws:
WTException

subscribe

public void subscribe(ExecutionObject exec_obj,
                      ProjectEventType event,
                      Vector subscribers,
                      String msg)
               throws WTException
Create ObjectSubscription objects for an event for a given object. The list of subscribers is passed as a Vector, where each element can either be a principal or a reference to a principal.

Supported API: true

Specified by:
subscribe in interface ProjMonitorService
Parameters:
exec_obj -
event -
subscribers -
msg -
Throws:
WTException

unsubscribe

public void unsubscribe(ExecutionObject exec_obj,
                        ProjectEventType event,
                        Vector subscribers)
                 throws WTException
Delete ObjectSubscription for an event and a given object. The list of subscribers is passed as a Vector, where each element can either be a principal or a reference to a principal.

Supported API: true

Specified by:
unsubscribe in interface ProjMonitorService
Parameters:
exec_obj -
event -
subscribers -
Throws:
WTException

subscribe

public void subscribe(ExecutionObject exec_obj,
                      ProjectEventType event,
                      Vector subscribers,
                      String msg,
                      String attr_name,
                      String attr_value,
                      String key)
               throws WTException
Create ObjectSubscription objects for an event for a given object. The list of subscribers is passed as a Vector, where each element can either be a principal or a reference to a principal. This is used with Owner / PM Subscriptions where atribute name/value and key is needed

Supported API: false

Specified by:
subscribe in interface ProjMonitorService
Parameters:
exec_obj -
event -
subscribers -
msg -
attr_name -
attr_value -
key -
Throws:
WTException

unsubscribe

public void unsubscribe(ExecutionObject exec_obj,
                        ProjectEventType event,
                        Vector subscribers,
                        String msg,
                        String attr_name,
                        String attr_value,
                        String key)
                 throws WTException
Create ObjectSubscription objects for an event for a given object. The list of subscribers is passed as a Vector, where each element can either be a principal or a reference to a principal. This is used with Owner / PM Subscriptions where atribute name/value and key is needed

Supported API: false

Specified by:
unsubscribe in interface ProjMonitorService
Parameters:
exec_obj -
event -
subscribers -
msg -
attr_name -
attr_value -
key -
Throws:
WTException

propagateDeletion

public void propagateDeletion(ExecutionObject exec_obj)
                       throws WTException


Supported API: false

Specified by:
propagateDeletion in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
Throws:
WTException

deleteContainedObjects

public void deleteContainedObjects(ProjectPlan plan)
                            throws WTException


Supported API: false

Specified by:
deleteContainedObjects in interface ProjMonitorServiceSvr
Parameters:
plan -
Throws:
WTException

queueDeadline

public void queueDeadline(ExecutionObject exec_obj)
                   throws WTException
Queues deadline so that when it arrives, the event is notified.

Supported API: false

Specified by:
queueDeadline in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
Throws:
WTException

queueTimeToDeadline

public void queueTimeToDeadline(ExecutionObject exec_obj)
                         throws WTException
Queues deadline so that when the deadline is approaching, the event is notified.

Supported API: false

Specified by:
queueTimeToDeadline in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
Throws:
WTException

queueTimePastDeadline

public void queueTimePastDeadline(ExecutionObject exec_obj)
                           throws WTException
Queues deadline so that when the deadline is approaching, the event is notified.

Supported API: false

Specified by:
queueTimePastDeadline in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
Throws:
WTException

hasHistory

public boolean hasHistory(ExecutionObject exec_obj)
                   throws WTException
Determines whether the object has events associated with it. Returns 'true' if this is the case, 'false' otherwise.

Supported API: false

Specified by:
hasHistory in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
Returns:
boolean
Throws:
WTException

propagateChange

public void propagateChange(ExecutionObject exec_obj,
                            MonitorInfo old_info)
                     throws WTException
Propagates to containing objects a change in an execution object.

Supported API: false

Specified by:
propagateChange in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
old_info -
Throws:
WTException

propagateStatusAfterRemoval

public void propagateStatusAfterRemoval(ExecutionObject exec_obj)
                                 throws WTException


Supported API: false

Specified by:
propagateStatusAfterRemoval in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
Throws:
WTException

propagateNewState

public void propagateNewState(ExecutionObject exec_obj,
                              ProjectState old_state)
                       throws WTException,
                              WTPropertyVetoException


Supported API: false

Specified by:
propagateNewState in interface ProjMonitorServiceSvr
Parameters:
exec_obj -
old_state -
Throws:
WTException
WTPropertyVetoException

propagateToProject2

public Project2 propagateToProject2(ProjectPlan plan)
                             throws WTException
Propagate changes from the specified ProjectPlan to its associated Project2 (if it has one). The following values are propagated:

Supported API: false

Specified by:
propagateToProject2 in interface ProjMonitorServiceSvr
Parameters:
plan -
Returns:
Project2
Throws:
WTException

propagateStateChange

public ProjectNode propagateStateChange(ProjectNode node,
                                        WfTransition transition,
                                        ProjectState old_state)
                                 throws WTException
Performs propagation tasks associated with state changes.

Supported API: false

Specified by:
propagateStateChange in interface ProjMonitorServiceSvr
Parameters:
node -
transition -
old_state -
Returns:
ProjectNode
Throws:
WTException

propagateRemoval

public void propagateRemoval(ProjectNode node)
                      throws WTException
Propagates dynamic information changed when a node is removed from a container as a result of a container change operation. This is similar to deleting an object except that only estimated finish is propagated to the plan.

Supported API: false

Specified by:
propagateRemoval in interface ProjMonitorServiceSvr
Parameters:
node -
Throws:
WTException

getPropagationQueue

public ProcessingQueue getPropagationQueue()
                                    throws WTException
Returns project management propagation queue.

Supported API: false

Specified by:
getPropagationQueue in interface ProjMonitorServiceSvr
Returns:
ProcessingQueue
Throws:
WTException

rollUpTimeToStart

public WfContainer rollUpTimeToStart(WfContainer container)
                              throws WTException
Updates the time to start of a WfContainer based on its contained objects if its "start computed" flag is true. For the project management containers, that is, ProjectPlan and SummaryActivity, the time to start is computed from the contained project nodes.

Note that this method does not recompute the rightful time to start. It only takes into consideration constraints based on the contained nodes and is intended to be used after changes in the dependency relationships in the contained objects.

Supported API: false

Specified by:
rollUpTimeToStart in interface ProjMonitorServiceSvr
Parameters:
container -
Returns:
WfContainer
Throws:
WTException

completeExecObject

private ExecutionObject completeExecObject(ExecutionObject exec_obj)
                                    throws WTException
Completes execution object. This method is called when percent complete is set to 100%.

Throws:
WTException

markWorkItemsComplete

private void markWorkItemsComplete(ProjectActivity activity)
                            throws WTException
Marks project work items associated with the activity passed as argument as "completed".

Throws:
WTException

removeWorkItems

private void removeWorkItems(ProjectActivity activity)
                      throws WTException
Remove project work items associated with the activity passed as argument. This happens when the activity is cancelled.

Throws:
WTException

isUnoverride

private boolean isUnoverride(ExecutionObject exec_obj)
Determines whether there is a need to possibly un-override attribute roll up flags. This is the case if one of the flags for status, percent complete, or estimated finish date is overridden.


unoverride

private ExecutionObject unoverride(ExecutionObject exec_obj)
Unoverrides status, percent complete, and estimated finish roll up flags.


showFlags

private String showFlags(ExecutionObject exec_obj)
Queue work complete: this has to be queued so it is guaranteed to work after the propagation of the percent complete


queueWorkComplete

private void queueWorkComplete(ProjectWorkItem work_item,
                               WTPrincipalReference p_ref,
                               Vector events)
                        throws WTException
Queue work complete: this has to be queued so it is guaranteed to work after the propagation of the percent complete

Throws:
WTException

checkClosedAccess

private void checkClosedAccess(ExecutionObject exec_obj)
                        throws WTException
Throws an exception user can't change object in the closed state. Only managers can edit (some attributes of the) object in the closed state.

Throws:
WTException

isManualOrRunning

private static boolean isManualOrRunning(ExecutionObject exec_obj)
                                  throws WTException
Returns whether the object's plan is in manual mode or the object is RUNNING.

Throws:
WTException

checkManualOrRunning

private void checkManualOrRunning(ExecutionObject exec_obj)
                           throws WTException
Throws an exception if change isn't valid given the object's state.

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

checkEnabledManual

private void checkEnabledManual(ExecutionObject exec_obj)
                         throws WTException,
                                WTRuntimeException
Throws an exception if object is not enabled or mode is not manual.

Throws:
WTException
WTRuntimeException

checkEnabledRunning

private void checkEnabledRunning(ExecutionObject exec_obj)
                          throws WTException
Throws an exception if the object is not running.

Throws:
WTException

deleteHolderLinks

private QueryResult deleteHolderLinks(ExecutionObject exec_obj)
                               throws WTException
Deletes holder links and returns an enumeration with the holders of the execution object (deliverable or node);

Throws:
WTException

isPropagateInfo

private boolean isPropagateInfo(ExecutionObject exec_obj,
                                ExecutionObject from_obj,
                                MonitorInfo old_info,
                                boolean is_removal)
                         throws WTException
Determines whether an object change or removal causes propagation. Returns 'true' if this is the case; 'false' otherwise. The arguments are as follows.

Throws:
WTException

computeInfo

private MonitorInfo computeInfo(ExecutionObject exec_obj,
                                ExecutionObject skip_object,
                                boolean recurse)
                         throws WTException
Compute status of execution object based on its aggregates. In the computation don't use the values from object referred to by the 'skip_object' parameter.
Assumes exec_obj is a Milestone, ProjectActivity, SummaryActivity or a ProjectPlan. (Excluded are ProjectWorkItem, ProjectProxy, and Deliverable objects).

Throws:
WTException

propagateState

public static void propagateState(ObjectIdentifier exec_obj_id,
                                  ProjectState old_state)
                           throws WTException,
                                  WTPropertyVetoException
Propagates state change to dependent objects.

Throws:
WTException
WTPropertyVetoException

propagateState

private void propagateState(ExecutionObject exec_obj,
                            ProjectState old_state)
                     throws WTException,
                            WTPropertyVetoException
Propagates state change to dependent objects.

Throws:
WTException
WTPropertyVetoException

propagateInfo

public static void propagateInfo(ObjectIdentifier exec_obj_id,
                                 MonitorInfo old_info)
                          throws WTException
Propagates information up

Throws:
WTException

propagateInfo

private void propagateInfo(ExecutionObject exec_obj,
                           MonitorInfo old_info)
                    throws WTException
Propagates information up.

Throws:
WTException

getStateToPropagate

protected ProjectState getStateToPropagate(Deliverable deliverable,
                                           ProjectState new_state,
                                           ProjectState old_state)
                                    throws WTException,
                                           WTPropertyVetoException
Propagates state to deliverables. The state to propagate is determined by the following table:
 ---------------------------------------------------------------
             DEFINED   RUNNING   SUSPENDED COMPLETED CANCELLED
 ---------------------------------------------------------------
 DEFINED        -        OK         n/a       n/a       n/a
 RUNNING       n/a       -          check     check     check
 SUSPENDED     n/a       OK         -         check     check
 COMPLETED     OK        OK         n/a       -         n/a
 CANCELLED     OK        OK         n/a       n/a       -
 ---------------------------------------------------------------
 
Where:

Throws:
WTException
WTPropertyVetoException

checkState

private ProjectState checkState(Deliverable deliverable,
                                ProjectState new_state)
                         throws WTException
Throws:
WTException

propagateNewDeadline

private void propagateNewDeadline(ExecutionObject exec_obj,
                                  Timestamp deadline)
                           throws WTException,
                                  WTPropertyVetoException
Propagates deadline to dependent objects.

Throws:
WTException
WTPropertyVetoException

propagateDeadline

public static void propagateDeadline(ObjectIdentifier exec_obj_id,
                                     Timestamp deadline)
                              throws WTException,
                                     WTPropertyVetoException
Propagates deadline to dependent objects.

Throws:
WTException
WTPropertyVetoException

propagateDeadline

private void propagateDeadline(ExecutionObject exec_obj,
                               Timestamp deadline)
                        throws WTException,
                               WTPropertyVetoException
Propagates deadline to dependent objects.

Throws:
WTException
WTPropertyVetoException

removeViolatedDependencies

private ProjectNode removeViolatedDependencies(ProjectNode node)
                                        throws WTException
Removes all dependencies that node has for which the predecessor is not in the COMPLETED state. Assumes FINISH_START dependency.

Throws:
WTException

computeInheritedDeadline

private Timestamp computeInheritedDeadline(ExecutionObject exec_obj)
                                    throws WTException
Computes inherited deadline.

Throws:
WTException

getScheduleQueue

private ScheduleQueue getScheduleQueue()
                                throws WTException
Returns project schedule queue. First checks if one has already been created/retrieved, if not retrieves/creates it.

Throws:
WTException

containsSubscriber

private boolean containsSubscriber(Vector subscribers,
                                   ObjectReference subs_ref)
                            throws WTException
Returns whether a Vector of subscribers contains a specific subscriber whose reference is passed as argument.

Throws:
WTException

deleteSubscriptions

private void deleteSubscriptions(ExecutionObject exec_obj)
                          throws WTException
Deletes all subscriptions of the object passed as argument. This is done when an object is deleted.

Throws:
WTException

isHeld

private boolean isHeld(Deliverable deliverable)
                throws WTException
Returns whether the deliverable is held by a holder. Returns 'true' if this is the case; 'false' otherwise.

Throws:
WTException

getSubscriberString

private String getSubscriberString(Vector subscribers)
                            throws WTException
Debugging method that returns a string containing subscribers' names.

Throws:
WTException

getSubscriptionQS

private QuerySpec getSubscriptionQS(ProjectPlan plan,
                                    WTUser user,
                                    Class target_class,
                                    String plan_ref_attr_name)
                             throws WTException
Returns all subscriptions associated with objects of the target class that are contained in the project plan.

Throws:
WTException

createQueue

private ProcessingQueue createQueue(String queue_name,
                                    int queue_interval)
                             throws WTException
Creates, sets and starts processing queues.

Parameters:
queue_name - - queue name
queue_interval - - queue polling interval
Throws:
WTException

workComplete

public static void workComplete(ObjectIdentifier work_item_id,
                                WTPrincipalReference p_ref,
                                Vector events)
                         throws WTException
Throws:
WTException

deletePreviousEntries

private void deletePreviousEntries(String method_name,
                                   ExecutionObject exec_obj)
                            throws WTException
Deletes a previous schedule entry for the method and target object specified. Because this method is called every time an entry is queued, there is at most one previous entry.

This is to prevent multiple triggering of the same method.

Throws:
WTException

addComponentWork

private boolean addComponentWork(ExecutionObject container,
                                 ExecutionObject component)
                          throws WTException
Returns 'true' is the work from a component should be added to an execution object; 'false' otherwise. The result is computed according to the table.
 ----------------------------------------------------------------------
 container  roll up*  returns true for
 ----------------------------------------------------------------------
 milestone  -         Deliverable
 activity   -         ProjectWorkItem
 summary    false     ProjectActivity, ProjectProxy, SummaryActivity
 summary    true      Milestone, SummaryActivity
 plan       false     ProjectActivity, ProjectProxy, SummaryActivity
 plan       true      Milestone, SummaryActivity, Deliverable
 proxy      true      ProjectPlan
 ----------------------------------------------------------------------
 
(*) where roll up is true if container.getPlan().getConfiguration ().isRollUpDeliverables () is true.

Throws:
WTException

inThePast

private boolean inThePast(Timestamp time)
Determines if a given time has already past.


showVector

private String showVector(List objs)
Returns a String contained the list of persistables in the Vector.


getOidString

private String getOidString(Object obj)

getContainedLinkTemplates

private Vector getContainedLinkTemplates(WfContainer container)
                                  throws WTException
Throws:
WTException

equals

private boolean equals(Object obj1,
                       Object obj2)
Checks for equality when one or both of the objects might be null.


synchDeliverable

void synchDeliverable(ExecutionObject exec_obj)
                throws WTException
Synchronizes associated deliverable/activity is "link deliverables' is selected.

Throws:
WTException

setAttributes

private void setAttributes(ExecutionObject from,
                           ExecutionObject to)
                    throws WTException
Synchronizes associated deliverable/activity is "link deliverables' is selected.

Throws:
WTException

rollUpChangeEstimatedFinish

public ExecutionObject rollUpChangeEstimatedFinish(ExecutionObject exec_obj,
                                                   Timestamp new_finish)
                                            throws WTException
Throws:
WTException

same

private boolean same(Object o1,
                     Object o2)
Like equals but handles null objects.


getOid

private ObjectIdentifier getOid(Object obj)

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.


getStartTime

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