|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.services.StandardManager
wt.projmgmt.monitor.StandardProjMonitorService
public class StandardProjMonitorService
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
ProjMonitorService,
ProjMonitorServiceSvr,
ProjMgmtService,
Serialized Form| Method Summary | |
|---|---|
ExecutionObject |
addDeliverable(ExecutionObject exec_obj,
Deliverable deliverable)
Adds Deliverable to ExecutionObject. |
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,
wt.projmgmt.admin.ProjectState new_state)
Changes execution state of the ExecutionObject
passed as argument. |
ExecutionObject |
changeMonitorInfo(ExecutionObject exec_obj,
wt.projmgmt.monitor.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,
wt.projmgmt.resource.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. |
void |
completeWorkItem(ProjectWorkItem work_item,
WTPrincipalReference p_ref,
Vector events)
Completes the ProjectWorkItem passed
as argument. |
QueryResult |
getProjectSubscriptions(ProjectPlan plan,
WTUser user)
Returns all subscriptions associated with objects of the target class that are contained in the project plan associated with the project and user passed as arguments. |
wt.projmgmt.monitor.MonitorInfo |
getRolledUpValues(ExecutionObject exec_obj)
Returns dynamic values from contained objects. |
Enumeration |
getSubscribers(ExecutionObject exec_obj,
ProjectEventType event)
Get all subscribers for an event for the ExecutionObject
passed as argument. |
QueryResult |
getSubscriptions(ExecutionObject exec_obj,
WTUser user)
Returns all subscriptions directly associated with the ExecutionObject
and the WTUser passed as arguments. |
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. |
wt.projmgmt.resource.DeliverableHolder |
removeDeliverable(wt.projmgmt.resource.DeliverableHolder holder,
Deliverable deliverable)
Removes deliverable to execution object. |
ExecutionObject |
rollUpValues(ExecutionObject exec_obj,
wt.projmgmt.execution.ExecutionConfiguration roll_up_attrs)
Computes and sets dynamic values of the execution object. |
void |
subscribe(ExecutionObject exec_obj,
ProjectEventType event,
Vector subscribers,
String msg)
Create subscriptions for an event for a given object. |
void |
unsubscribe(ExecutionObject exec_obj,
ProjectEventType event,
Vector subscribers)
Delete subscriptions for an event and a given object. |
| Methods inherited from class wt.services.StandardManager |
|---|
getManagerService, getManagerStatus, getName, getStartupType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public ExecutionObject addDeliverable(ExecutionObject exec_obj,
Deliverable deliverable)
throws WTException
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.
addDeliverable in interface ProjMonitorServiceexec_obj - deliverable -
WTException
public ExecutionObject changeCompletionTime(ExecutionObject exec_obj,
Timestamp new_time)
throws WTException
wt.projmgtm.execution.ExecutionObject
to the time passed as argument. A ProjectManagementException
is thrown in the following cases.
changeCompletionTime in interface ProjMonitorServiceexec_obj - new_time -
WTExceptionwt.projmgmt.ProjectState
public ExecutionObject changeCost(ExecutionObject exec_obj,
Currency new_total_cost,
Currency new_curr_cost)
throws WTException
changeCost in interface ProjMonitorServiceexec_obj - new_total_cost - new_curr_cost -
WTException
public ExecutionObject changeDeadline(ExecutionObject exec_obj,
Timestamp new_deadline)
throws WTException
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.
changeDeadline in interface ProjMonitorServiceexec_obj - new_deadline -
WTException
public ExecutionObject changeDuration(ExecutionObject exec_obj,
TimeToElapse new_duration)
throws WTException
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.
changeDuration in interface ProjMonitorServiceexec_obj - new_duration -
WTException
public ExecutionObject changeEstimatedFinish(ExecutionObject exec_obj,
Timestamp new_finish)
throws WTException
ExecutionObject.
As a consequence of this operation, the duration of the object is
updated and set to "overriden." Propagates scheduling changes to holder
objects.
changeEstimatedFinish in interface ProjMonitorServiceexec_obj - new_finish -
WTException
public ExecutionObject changeExecutionState(ExecutionObject exec_obj,
wt.projmgmt.admin.ProjectState new_state)
throws WTException
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.
changeExecutionState in interface ProjMonitorServiceexec_obj - new_state -
WTException
public ExecutionObject changeMonitorInfo(ExecutionObject exec_obj,
wt.projmgmt.monitor.MonitorInfo new_info)
throws WTException
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.
changeMonitorInfo in interface ProjMonitorServiceexec_obj - new_info -
WTException
public ExecutionObject changeOwner(ExecutionObject exec_obj,
WTPrincipal new_owner)
throws WTException
ExecutionObject
passed as argument. Since owner subscriptions are associated with
OWNER, nothing needs to be done for existing subscriptions -- they
will automatically be associated with the new owner.
changeOwner in interface ProjMonitorServiceexec_obj - new_owner -
WTException
public ExecutionObject changePercentComplete(ExecutionObject exec_obj,
int new_percent,
wt.projmgmt.resource.Work total_work)
throws WTException
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 <= totalWorkThis 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.
changePercentComplete in interface ProjMonitorServiceexec_obj - new_percent - total_work -
WTException
public ExecutionObject changeRollUpDeliverables(ExecutionObject exec_obj,
boolean roll_up)
throws WTException
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.
changeRollUpDeliverables in interface ProjMonitorServiceexec_obj - roll_up -
WTException
public ExecutionObject changeStatus(ExecutionObject exec_obj,
ProjectHealthStatus new_status,
String desc)
throws WTException
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.
changeStatus in interface ProjMonitorServiceexec_obj - new_status - desc -
WTException
public ExecutionObject changeTimePastDeadline(ExecutionObject exec_obj,
TimeToElapse new_time)
throws WTException
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.
changeTimePastDeadline in interface ProjMonitorServiceexec_obj - new_time -
WTException
public ExecutionObject changeTimeToDeadline(ExecutionObject exec_obj,
TimeToElapse new_time)
throws WTException
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.
changeTimeToDeadline in interface ProjMonitorServiceexec_obj - new_time -
WTException
public ExecutionObject changeTimeToStart(ExecutionObject exec_obj,
Timestamp new_start)
throws WTException
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
changeTimeToStart in interface ProjMonitorServiceexec_obj - new_start -
WTExceptionProjectState,
ExecutionObject,
ProjectNode
public void completeWorkItem(ProjectWorkItem work_item,
WTPrincipalReference p_ref,
Vector events)
throws WTException
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.
completeWorkItem in interface ProjMonitorServicework_item - p_ref - events -
WTException
public QueryResult getProjectSubscriptions(ProjectPlan plan,
WTUser user)
throws WTException
ProjectNode).
If user is 'null' all plan subscriptions are returned.
getProjectSubscriptions in interface ProjMonitorServiceplan - user -
WTException
public wt.projmgmt.monitor.MonitorInfo getRolledUpValues(ExecutionObject exec_obj)
throws WTException
ProjectActivity
or a Milestone or a SummaryActivity
or a ProjectPlan, otherwise a runtime
exception is thrown.
getRolledUpValues in interface ProjMonitorServiceexec_obj -
WTException
public Enumeration getSubscribers(ExecutionObject exec_obj,
ProjectEventType event)
throws WTException
ExecutionObject
passed as argument. The list of subscribers is returned as an enumeration.
getSubscribers in interface ProjMonitorServiceexec_obj - event -
WTException
public QueryResult getSubscriptions(ExecutionObject exec_obj,
WTUser user)
throws WTException
ExecutionObject
and the WTUser passed as arguments. If user is null
all object's subscriptions are returned.
getSubscriptions in interface ProjMonitorServiceexec_obj - user -
WTException
public boolean isManager(ProjectPlan plan,
WTUser user)
throws WTException
wt.or.WTUser is a manager of the project
that owns the ProjectPlan passed as
argument. Returns 'false' otherwise.
isManager in interface ProjMonitorServiceplan - user -
WTException
public wt.projmgmt.resource.DeliverableHolder removeDeliverable(wt.projmgmt.resource.DeliverableHolder holder,
Deliverable deliverable)
throws WTException
removeDeliverable in interface ProjMonitorServiceholder - deliverable -
WTException
public ExecutionObject rollUpValues(ExecutionObject exec_obj,
wt.projmgmt.execution.ExecutionConfiguration roll_up_attrs)
throws WTException
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
rollUpValues in interface ProjMonitorServiceexec_obj - roll_up_attrs -
WTException
public void subscribe(ExecutionObject exec_obj,
ProjectEventType event,
Vector subscribers,
String msg)
throws WTException
subscribe in interface ProjMonitorServiceexec_obj - event - subscribers - msg -
WTException
public void unsubscribe(ExecutionObject exec_obj,
ProjectEventType event,
Vector subscribers)
throws WTException
unsubscribe in interface ProjMonitorServiceexec_obj - event - subscribers -
WTException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||