|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.projmgmt.resource.StandardProjResourceService
The StandardProjResourceService
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 newStandardProjResourceService
static factory method(s),
not the StandardProjResourceService
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: false
Extendable: false
ProjResourceService
,
ProjResourceServiceSvr
,
ProjMgmtService
,
Serialized FormField Summary | |
private static String |
CLASSNAME
|
private static String |
MONITOR_RESOURCE
|
private static String |
RESOURCE
|
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 | |
StandardProjResourceService()
|
Method Summary | |
ProjectActivity |
addResources(ProjectActivity act,
Vector resources,
Vector max_units)
Add the resources to the ProjectActivity . |
private boolean |
changeAllocation(ProjectActivity activity)
Determines whether the resource allocation for an activity should be changed. |
ProjectActivity |
changeResource(ProjectActivity projectActivity,
ProjectResource old_resource,
ProjectResource new_resource)
This method replaces one ProjectResource
with another ProjectResource in a ProjectActivity . |
ProjectResource |
changeResourceCost(ProjectResource resource,
Currency use,
CurrencyRate std,
CurrencyRate ovt)
Changes cost properties of the ProjectResource
passed as argument. |
Currency |
computeActivityCost(ProjectActivity activity,
Work work)
Computes the current cost for a project activity (@link wt.projmgtm.executionProjectActivity}) for a given work. |
private int |
computeAllocation(ProjectActivity activity,
Vector resources)
Computes allocation for an activity with n resources. |
double |
computeCurrentCost(ProjectActivity activity,
Timestamp time)
Returns current cost accrued by the activity due to use of material, equipment and facilities. |
Currency |
computeInitialWorkCost(ProjectActivity activity)
Returns the initial work cost for a given activity. |
private Work |
computePerformedWork(ProjectActivity activity,
PersonResource resource)
Computes the work spent by a person resource in an activity without work items. |
double |
computeTotalCost(ProjectActivity activity)
Returns total cost to be accrued by the activity due to use of material, equipment and facilities. |
private Work |
computeTotalWork(ProjectActivity activity,
PersonResource resource)
Computes the work spent by a person resource in an activity without work items. |
Currency |
computeWorkItemCost(ProjectWorkItem item,
Work standard_work,
Work overtime_work)
Computes the current cost for a project work item given the current standard work and the current overtime work. |
protected PersonResource |
createPersonResource(ProjectPlan plan,
WTPrincipalReference princ_ref)
|
QueryResult |
createPersonResources(ProjectPlan plan,
Vector assignees)
Creates person resources for a list of WTUser passed
as argument. |
void |
delegate(ProjectWorkItem workItem,
WTPrincipal principal)
Changes the owner of the ProjectWorkItem
to user passed as argument. |
void |
deleteContainedObjects(ProjectPlan plan)
Delete all resources objects contained in the plan passed as argument. |
ProjectActivity |
getActivityHolder(Deliverable deliverable)
Returns the ProjectActivity that holds
the Deliverable passed as argument. |
private QueryResult |
getActivityHolders(ProjectResource resource)
|
QueryResult |
getActivityResources(ProjectActivity activity)
Return all enabled ProjectResource associated
with a given ProjectActivity . |
QueryResult |
getAllActivityResources(ProjectActivity activity)
Return all enabled and disabled ProjectResource
objects associated with a given ProjectActivity . |
QueryResult |
getAllProjectResources(ProjectPlan plan)
Return all enabled and disabled ProjectResource
associated with a given ProjectPlan
passed as arguent. |
QueryResult |
getAllResourceAssignments(ProjectPlan plan,
ResourceHolder holder,
ProjectResource resource)
Returns resource assignments ( ResourceAssignmentLink )
for a ProjectPlan , ResourceHolder ,
and ProjectResource passed as arguments. |
QueryResult |
getAssignees(ProjectActivity activity)
Returns the assignees for the activity passed as argument. |
private QueryResult |
getAssignments(ProjectPlan plan,
ResourceHolder holder,
ProjectResource resource,
boolean only_enabled)
|
String |
getConceptualClassname()
Deprecated. |
protected double |
getCurrentAssignmentUnits(QueryResult assignments,
Timestamp time)
|
Currency |
getCurrentCost(ExecutionObject exec_obj,
Timestamp time)
Returns the total cost incurred in the execution of the object up to the time passed as argument. |
Currency |
getCurrentCost(ProjectResource resource,
ProjectActivity activity,
Timestamp time)
Returns the current cost spent by a ProjectResource
in a ProjectActivity up to the time
passed as argument. |
Currency |
getCurrentResourceCost(ProjectResource resource,
Timestamp time)
Returns the cost spent so far for a given ProjectResource
in the plan up to the time passed as argument. |
double |
getCurrentResourceUnits(ProjectResource resource,
Timestamp time)
Returns the number of resources (units) consumed so far for a given ProjectResource in the plan up to the
time passed as argument. |
double |
getCurrentUnits(ProjectResource resource,
ProjectActivity activity,
Timestamp time)
Returns the current units spent by a ProjectResource
in a ProjectActivity up to the time
passed as argument. |
protected int |
getCurrentUses(QueryResult assignments)
|
QueryResult |
getDeliverables(ExecutionObject exec_obj)
Returns all Deliverable s associated to
n {@link wt.projmgmt.execution. |
QueryResult |
getDeliverables(WTUser user)
Returns all Deliverable objects owner
by the WTUser passed as argument. |
private TimeToElapse |
getDuration(ExecutionObject exec_obj,
Timestamp time)
Returns a how long has elapsed since the execution object started. |
private double |
getHours(TimeToElapse duration)
Returns a how long has elapsed since the execution object started. |
private String |
getIdString(Object obj)
|
QueryResult |
getMilestoneHolders(Deliverable deliverable)
Returns a list of Milestone that hold
for the Deliverable passed as argument. |
private ObjectIdentifier |
getOid(Object obj)
|
private PersonResource |
getPersonResource(ProjectPlan plan,
WTPrincipalReference user_ref)
|
PersonResource |
getPersonResource(ProjectPlan plan,
WTUser person)
Returns the PersonResource for a plan
given a WTUser . |
private PersonResource |
getPersonResource(ProjectPlan plan,
WTUser replacedUser,
WTUser newUser)
|
private String |
getPersonResourceName(WTPrincipalReference pRef)
Get a default name to use for a person resoure based on the principal referenced by the resource. |
QueryResult |
getProjectPlanDeliverables(ProjectPlan plan)
Returns project plan deliverables for a given ProjectPlan . |
private ProjectResource |
getProjectResource(ProjectPlan plan,
Object res_obj)
Returns a project resource. |
QueryResult |
getProjectResources(ProjectPlan plan)
Return all enabled ProjectResource associated
with a given ProjectPlan passed as argument. |
ProjectResource |
getResource(ProjectPlan plan,
String resource_name)
Returns a ProjectResource given the host
ProjectPlan and the resource name. |
QueryResult |
getResourceAssignments(ProjectPlan plan,
ResourceHolder holder,
ProjectResource resource)
Returns resource assignments ( ResourceAssignmentLink )
for a ProjectPlan , ResourceHolder ,
and ProjectResource passed as arguments. |
private Work |
getResourcePerformedWork(PersonResource resource,
ProjectActivity activity)
Computes the work spent by a person resource in an activity. |
private QueryResult |
getResources(ProjectActivity activity,
boolean only_enabled)
|
private QueryResult |
getResources(ProjectPlan plan,
boolean only_enabled)
Returns resources for a given plan. |
private Work |
getResourceTotalWork(PersonResource resource,
ProjectActivity activity)
Computes the work spent by a person resource in an activity. |
private Timestamp |
getStart(ExecutionObject exec_obj)
|
QueryResult |
getSummaryDeliverables(SummaryActivity summary)
|
protected double |
getTotalAssignmentUnits(QueryResult assignments)
|
Currency |
getTotalCost(ExecutionObject exec_obj)
Returns the total cost incurred in the execution of the object passed as argument. |
Currency |
getTotalCost(ProjectResource resource,
ProjectActivity activity)
Returns the total cost to be spent by a ProjectResource
in a ProjectActivity . |
Currency |
getTotalResourceCost(ProjectResource resource)
Returns the total cost for a given ProjectResource
in the ProjectPlan that contains the
resource This method may return a non-zero value only for CostResource
objects. |
double |
getTotalResourceUnits(ProjectResource resource)
Returns the total resources (or units) to be spent for a given ProjectResource . |
double |
getTotalUnits(ProjectResource resource,
ProjectActivity activity)
Returns the total units to be spent by a ProjectResource . |
QueryResult |
getUnboundProjectPlanDeliverables(ProjectPlan plan)
Returns unbound project plan deliverables for a given ProjectPlan . |
protected QueryResult |
getUserDeliverables(ProjectPlan plan,
WTUser user)
|
QueryResult |
getUserDeliverables(WTUser user,
ProjectPlan plan,
ProjectState state)
Returns all Deliverable that belong to
a given WTUser . |
QueryResult |
getUserDeliverables(WTUser user,
ProjectPlan plan,
ProjectState state,
Integer queryLimit,
String orderByStr)
Returns all Deliverable that belong to
a given WTUser . |
private boolean |
isUnoverride(ProjectActivity activity)
Determines whether there is a need to possibly un-override attribute roll up flags. |
static StandardProjResourceService |
newStandardProjResourceService()
Default factory for the class. |
ProjectActivity |
removeResources(ProjectActivity act,
Vector resources)
Removes the resource assignments ( ResourceAssignmentLink )
that correspond to the ProjectActivity .and
ProjectResource s passed as arguments. |
void |
replaceUser(WTContainer container,
WTUser replacedUser,
WTUser newUser)
Replaces the replaced user with the new user for resource objects. |
void |
setMilestones(Deliverable deliverable,
Vector milestones)
Adds the Deliverable to each be contained
in each Milestone passed as argument
as a list. |
ProjectActivity |
setResources(ProjectActivity act,
Vector resources,
Vector max_units)
Sets initial ProjectResource s for a ProjectActivity , given the resources and associated
maximum units. |
Deliverable |
setTarget(Deliverable deliverable,
Persistable target,
boolean latest)
Sets the target of a Deliverable as the
Persistable passed as argument. |
private String |
showVector(Vector objs)
Returns a comma separated list of the objects in the Vector. |
private ProjectActivity |
unoverride(ProjectActivity activity)
Unoverrides roll up flags. |
void |
updateResourceAllocation(ExecutionObject exec_obj)
Updates the resource allocation for a project work item or a project activity. |
ProjectActivity |
updateResources(ProjectActivity act,
Vector resources,
Vector max_units)
Updates project resources for an activity, given the resources and associated maximum units. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final boolean VERBOSE
private static final String MONITOR_RESOURCE
Constructor Detail |
public StandardProjResourceService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
public static StandardProjResourceService newStandardProjResourceService() throws WTException
WTException
public ProjectActivity addResources(ProjectActivity act, Vector resources, Vector max_units) throws WTException
ProjectActivity
.
The resources and their corresponding maximum units are given as
two lists (Vector
) of ProjectResource
and Integer
, respectively. If the resource assignment
already exists and if the current maximum units resources is the same
as the maximum units resources passed as argument nothing happens.
Otherwise the maximum units that differ are updated.
addResources
in interface ProjResourceService
act
- resources
- max_units
-
WTException
public ProjectActivity changeResource(ProjectActivity projectActivity, ProjectResource old_resource, ProjectResource new_resource) throws WTException
ProjectResource
with another ProjectResource
in a ProjectActivity
.
changeResource
in interface ProjResourceService
projectActivity
- old_resource
- new_resource
-
WTException
public ProjectResource changeResourceCost(ProjectResource resource, Currency use, CurrencyRate std, CurrencyRate ovt) throws WTException
ProjectResource
passed as argument. For PersonResource
objects the method propagates changes as they affect work cost.
changeResourceCost
in interface ProjResourceService
resource
- use
- std
- ovt
-
WTException
public QueryResult createPersonResources(ProjectPlan plan, Vector assignees) throws WTException
WTUser
passed
as argument. Returns the list of PersonResource
just created. A resource is created for a specific user only if it
doesn't exist already.
createPersonResources
in interface ProjResourceService
plan
- assignees
-
WTException
public void delegate(ProjectWorkItem workItem, WTPrincipal principal) throws WTException
ProjectWorkItem
to user passed as argument. Updates the resource assignment and calls
the workflow method of the same name in the work service.
delegate
in interface ProjResourceService
workItem
- principal
-
WTException
public ProjectActivity getActivityHolder(Deliverable deliverable) throws WTException
ProjectActivity
that holds
the Deliverable
passed as argument.
Returns 'null' if deliverable is not held by any activity.
getActivityHolder
in interface ProjResourceService
deliverable
-
WTException
public QueryResult getActivityResources(ProjectActivity activity) throws WTException
ProjectResource
associated
with a given ProjectActivity
.
getActivityResources
in interface ProjResourceService
activity
-
WTException
public QueryResult getAllActivityResources(ProjectActivity activity) throws WTException
ProjectResource
objects associated with a given ProjectActivity
.
getAllActivityResources
in interface ProjResourceService
activity
-
WTException
public QueryResult getAllProjectResources(ProjectPlan plan) throws WTException
ProjectResource
associated with a given ProjectPlan
passed as arguent.
getAllProjectResources
in interface ProjResourceService
plan
-
WTException
public QueryResult getAllResourceAssignments(ProjectPlan plan, ResourceHolder holder, ProjectResource resource) throws WTException
ResourceAssignmentLink
)
for a ProjectPlan
, ResourceHolder
,
and ProjectResource
passed as arguments.
If the resource holder is not null, only resource assignments for
the holder are returned. Similarly, if the resource is not null,
only assignments for the given resource are returned. If the resource
is null, assignments for both enabled and disabled resources are returned.
getAllResourceAssignments
in interface ProjResourceService
plan
- holder
- resource
-
WTException
public QueryResult getAssignees(ProjectActivity activity) throws WTException
getAssignees
in interface ProjResourceService
activity
-
WTException
public Currency getCurrentCost(ExecutionObject exec_obj, Timestamp time) throws WTException
ProjectActivity
,
SummaryActivity
, ProjectProxy
and ProjectPlan
.
getCurrentCost
in interface ProjResourceService
exec_obj
- time
-
WTException
public Currency getCurrentCost(ProjectResource resource, ProjectActivity activity, Timestamp time) throws WTException
ProjectResource
in a ProjectActivity
up to the time
passed as argument.
getCurrentCost
in interface ProjResourceService
resource
- activity
- time
-
WTException
public Currency getCurrentResourceCost(ProjectResource resource, Timestamp time) throws WTException
ProjectResource
in the plan up to the time passed as argument.
This method may return a non-zero value only for CostResource
objects. For non-cost resources this method returns 0.0.
The current cost for a single activity is the cost per use plus a cost that depends on the type of the resource, as follows.
PersonResource
this is equal
to the current units multiplied by the resource standard rate.
getCurrentResourceCost
in interface ProjResourceService
resource
- time
-
WTException
public double getCurrentResourceUnits(ProjectResource resource, Timestamp time) throws WTException
ProjectResource
in the plan up to the
time passed as argument.
PersonResource
the number of
units is equal to the performed work for the workitem owned by the
user. If there are no tasks, the performed work for the activity
is divided among the resources proportionally to the resource participation.
TimeResource
(EquipmentResource
and FacilityResource
), the assignment
total resources is interpreted as a percentage. The current resource
units are computed as this percentage multiplied by the current duration
of the activity.
MaterialResource
, the
current resources is equal to the assignment total resources multiplied
by the ration of the current duration over the total duration.
getCurrentResourceUnits
in interface ProjResourceService
resource
- time
-
WTException
public double getCurrentUnits(ProjectResource resource, ProjectActivity activity, Timestamp time) throws WTException
ProjectResource
in a ProjectActivity
up to the time
passed as argument.
getCurrentUnits
in interface ProjResourceService
resource
- activity
- time
-
WTException
public QueryResult getDeliverables(ExecutionObject exec_obj) throws WTException
Deliverable
s associated to
n ExecutionObject
. If the execution
object is a deliverable holder (milestone or project activity) it
navigates the deliverable holding association. If it is a project
plan, it returns all deliverables in the plan. If it is a summary
activity, it returns all deliverables held by objects contained in
the summary. Otherwise an empty list is returned. Only enabled deliverables
are returned.
getDeliverables
in interface ProjResourceService
exec_obj
-
WTException
wt.projmgmtexecution.Milestone
,
wt.projmgmtexecution.ProjectActivity
,
wt.projmgmtexecution.ProjectPlan
,
wt.projmgmtexecution.ProjectProxy
,
wt.projmgmtexecution.SummaryActivity
,
Deliverable
,
DeliverableHolder
public QueryResult getDeliverables(WTUser user) throws WTException
Deliverable
objects owner
by the WTUser
passed as argument. Only deliverables
belonging to running projects are returned. The user passed as argument
can not be 'null'
getDeliverables
in interface ProjResourceService
user
-
WTException
public QueryResult getMilestoneHolders(Deliverable deliverable) throws WTException
Milestone
that hold
for the Deliverable
passed as argument.
getMilestoneHolders
in interface ProjResourceService
deliverable
-
WTException
public PersonResource getPersonResource(ProjectPlan plan, WTUser person) throws WTException
PersonResource
for a plan
given a WTUser
.
getPersonResource
in interface ProjResourceService
plan
- person
-
WTException
public QueryResult getProjectResources(ProjectPlan plan) throws WTException
ProjectResource
associated
with a given ProjectPlan
passed as argument.
getProjectResources
in interface ProjResourceService
plan
-
WTException
public ProjectResource getResource(ProjectPlan plan, String resource_name) throws WTException
ProjectResource
given the host
ProjectPlan
and the resource name.
Returns 'null' if this resource can't be found.
getResource
in interface ProjResourceService
plan
- resource_name
-
WTException
public QueryResult getResourceAssignments(ProjectPlan plan, ResourceHolder holder, ProjectResource resource) throws WTException
ResourceAssignmentLink
)
for a ProjectPlan
, ResourceHolder
,
and ProjectResource
passed as arguments.
If the resource holder is not null, only resource assignments for
the holder are returned. Similarly, if the resource is not null,
only assignments for the given resource are returned. If the resource
is null, assignments for only enabled are returned.
getResourceAssignments
in interface ProjResourceService
plan
- holder
- resource
-
WTException
public Currency getTotalCost(ExecutionObject exec_obj) throws WTException
ProjectActivity
,
SummaryActivity
, ProjectProxy
and ProjectPlan
.
getTotalCost
in interface ProjResourceService
exec_obj
-
WTException
public Currency getTotalCost(ProjectResource resource, ProjectActivity activity) throws WTException
ProjectResource
in a ProjectActivity
.
getTotalCost
in interface ProjResourceService
resource
- activity
-
WTException
public Currency getTotalResourceCost(ProjectResource resource) throws WTException
ProjectResource
in the ProjectPlan
that contains the
resource This method may return a non-zero value only for CostResource
objects. For non-cost resources this method returns 0.0. The total cost for a single activity is the cost per use plus a cost that depends on the type of the resource, as follows.
PersonResource
this is equal
to the total units multiplied by the resource standard rate.
getTotalResourceCost
in interface ProjResourceService
resource
-
WTException
public double getTotalResourceUnits(ProjectResource resource) throws WTException
ProjectResource
.
The total units depends on the type of the resource, as follows. It is a sum of the units for each activity in the plan.
PersonResource
this is equal
to the total work for the workitem owned by the user if the activity
has started. Otherwise the total work for the activity is divided
among the person resources proportionally to the participation.
TimeResource
(EquipmentResource
and FacilityResource
), the assignment
total resources is interpreted as a percentage. The total resources
is computed as this percentage of the total duration of the activity.
MaterialResource
, it
is equal to the assignment total resources.
getTotalResourceUnits
in interface ProjResourceService
resource
-
WTException
public double getTotalUnits(ProjectResource resource, ProjectActivity activity) throws WTException
ProjectResource
.
in a ProjectActivity
.
getTotalUnits
in interface ProjResourceService
resource
- activity
-
WTException
public QueryResult getUserDeliverables(WTUser user, ProjectPlan plan, ProjectState state) throws WTException
Deliverable
that belong to
a given WTUser
. If the plan passed as argument is 'null',
deliverables from all ProjectPlan
objects
are returned. Only plans in the state (ProjectState
)
passed as argument are considered. If the state is null, however,
all states are considered.
The deliverables are returned ordered by their deadlines (sooner
first) and then by their names.
Supported API: false
getUserDeliverables
in interface ProjResourceService
user
- plan
- state
-
WTException
public ProjectActivity removeResources(ProjectActivity act, Vector resources) throws WTException
ResourceAssignmentLink
)
that correspond to the ProjectActivity
.and
ProjectResource
s passed as arguments.
This method doesn't remove the resources from the plan just their
assignments in the activity.
removeResources
in interface ProjResourceService
act
- resources
-
WTException
public void replaceUser(WTContainer container, WTUser replacedUser, WTUser newUser) throws WTException
replaceUser
in interface ProjResourceService
container
- replacedUser
- newUser
-
WTException
public void setMilestones(Deliverable deliverable, Vector milestones) throws WTException
Deliverable
to each be contained
in each Milestone
passed as argument
as a list. Removes the deliverable from all milestones not in the
list.
setMilestones
in interface ProjResourceService
deliverable
- milestones
-
WTException
public ProjectActivity setResources(ProjectActivity act, Vector resources, Vector max_units) throws WTException
ProjectResource
s for a ProjectActivity
, given the resources and associated
maximum units. Assumes no resources has been set for the activity.
To update resources use ProjResourceService.updateResources(wt.projmgmt.execution.ProjectActivity, java.util.Vector, java.util.Vector)
setResources
in interface ProjResourceService
act
- resources
- max_units
-
WTException
public Deliverable setTarget(Deliverable deliverable, Persistable target, boolean latest) throws WTException
Deliverable
as the
Persistable
passed as argument. In case of iterated
object targets, the association between a deliverable is established
between the deliverable and the master if latest is 'true' or with
the iteration itself if not.
setTarget
in interface ProjResourceService
deliverable
- target
- latest
-
WTException
public ProjectActivity updateResources(ProjectActivity act, Vector resources, Vector max_units) throws WTException
updateResources
in interface ProjResourceService
act
- resources
- max_units
-
WTException
public QueryResult getUserDeliverables(WTUser user, ProjectPlan plan, ProjectState state, Integer queryLimit, String orderByStr) throws WTException
Deliverable
that belong to
a given WTUser
. If the plan passed as argument is 'null',
deliverables from all ProjectPlan
objects
are returned. Only plans in the state (ProjectState
)
passed as argument are considered. If the state is null, however,
all states are considered.
The deliverables are returned ordered by their deadlines (sooner
first) and then by their names.
Supported API: false
getUserDeliverables
in interface ProjResourceService
user
- plan
- state
- queryLimit
- orderByStr
-
WTException
public void deleteContainedObjects(ProjectPlan plan) throws WTException
deleteContainedObjects
in interface ProjResourceServiceSvr
plan
-
WTException
public Currency computeWorkItemCost(ProjectWorkItem item, Work standard_work, Work overtime_work) throws WTException
computeWorkItemCost
in interface ProjResourceServiceSvr
item
- standard_work
- overtime_work
-
WTException
Work
,
Currency
,
CurrencyRate
public Currency computeActivityCost(ProjectActivity activity, Work work) throws WTException
This is to used when the activity when the performed or total work
is set at the activity level.
Supported API: false
computeActivityCost
in interface ProjResourceServiceSvr
activity
- work
-
WTException
Work
,
Currency
,
CurrencyRate
public Currency computeInitialWorkCost(ProjectActivity activity) throws WTException
computeInitialWorkCost
in interface ProjResourceServiceSvr
activity
-
WTException
public double computeTotalCost(ProjectActivity activity) throws WTException
computeTotalCost
in interface ProjResourceServiceSvr
activity
-
WTException
public double computeCurrentCost(ProjectActivity activity, Timestamp time) throws WTException
computeCurrentCost
in interface ProjResourceServiceSvr
activity
- time
-
WTException
public QueryResult getProjectPlanDeliverables(ProjectPlan plan) throws WTException
ProjectPlan
.
A "project deliverable" is a deliverable that has the "projectDeliverable"
set to 'true'.
getProjectPlanDeliverables
in interface ProjResourceServiceSvr
plan
-
WTException
public QueryResult getUnboundProjectPlanDeliverables(ProjectPlan plan) throws WTException
ProjectPlan
.
A "project deliverable" is a deliverable that has the "projectDeliverable"
set to 'true' and is not associated with either a milestone or an
activity.
getUnboundProjectPlanDeliverables
in interface ProjResourceServiceSvr
plan
-
WTException
public void updateResourceAllocation(ExecutionObject exec_obj) throws WTException
allocation = (100 * work) / (n * duration in days * hour per day)
where n is the number of users assigned to the activity or item.
For items n = 1.
updateResourceAllocation
in interface ProjResourceServiceSvr
exec_obj
-
WTException
private QueryResult getResources(ProjectActivity activity, boolean only_enabled) throws WTException
WTException
private boolean changeAllocation(ProjectActivity activity) throws WTException
WTException
private int computeAllocation(ProjectActivity activity, Vector resources) throws WTException
allocation = total activity work / (n * activity actual duration * number hours per day)
WTException
private QueryResult getAssignments(ProjectPlan plan, ResourceHolder holder, ProjectResource resource, boolean only_enabled) throws WTException
WTException
private QueryResult getResources(ProjectPlan plan, boolean only_enabled) throws WTException
WTException
private boolean isUnoverride(ProjectActivity activity)
private ProjectActivity unoverride(ProjectActivity activity)
protected double getTotalAssignmentUnits(QueryResult assignments) throws WTException
WTException
protected double getCurrentAssignmentUnits(QueryResult assignments, Timestamp time) throws WTException
WTException
protected int getCurrentUses(QueryResult assignments) throws WTException
WTException
protected QueryResult getUserDeliverables(ProjectPlan plan, WTUser user) throws WTException
WTException
protected PersonResource createPersonResource(ProjectPlan plan, WTPrincipalReference princ_ref) throws WTException
WTException
private String getPersonResourceName(WTPrincipalReference pRef) throws WTException
pRef
- a reference to the person resource's person
WTException
public QueryResult getSummaryDeliverables(SummaryActivity summary) throws WTException
WTException
private PersonResource getPersonResource(ProjectPlan plan, WTPrincipalReference user_ref) throws WTException
WTException
private PersonResource getPersonResource(ProjectPlan plan, WTUser replacedUser, WTUser newUser) throws WTException
WTException
private double getHours(TimeToElapse duration) throws WTException
WTException
private TimeToElapse getDuration(ExecutionObject exec_obj, Timestamp time) throws WTException
WTException
private Work getResourcePerformedWork(PersonResource resource, ProjectActivity activity) throws WTException
WTException
private Work computePerformedWork(ProjectActivity activity, PersonResource resource) throws WTException
WTException
private Work getResourceTotalWork(PersonResource resource, ProjectActivity activity) throws WTException
WTException
private Work computeTotalWork(ProjectActivity activity, PersonResource resource) throws WTException
WTException
private ProjectResource getProjectResource(ProjectPlan plan, Object res_obj) throws WTException
WTException
private Timestamp getStart(ExecutionObject exec_obj) throws WTException
WTException
private String showVector(Vector objs)
private String getIdString(Object obj)
private QueryResult getActivityHolders(ProjectResource resource) throws WTException
WTException
private ObjectIdentifier getOid(Object obj)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |