wt.projmgmt.execution
Class ProjExecHelper

java.lang.Object
  extended bywt.projmgmt.execution.ProjExecHelper
All Implemented Interfaces:
Externalizable, Serializable

public class ProjExecHelper
extends Object
implements Externalizable

Helper class giving remote access to ProjExecService functionality.

Supported API: true

Extendable: false

See Also:
ProjExecService, Serialized Form

Field Summary
private static String CLASSNAME
           
static int COST_ATTR
          

Supported API: false
static long EXTERNALIZATION_VERSION_UID
           
static int FINISH_ATTR
          

Supported API: false
protected static long OLD_FORMAT_VERSION_UID
           
static int PERCENT_ATTR
          

Supported API: false
private static String RESOURCE
           
(package private) static long serialVersionUID
           
(package private) static boolean SERVER
           
static ProjExecService service
          

Supported API: true
static int STATUS_ATTR
          

Supported API: false
static int WORK_ATTR
          

Supported API: false
 
Constructor Summary
ProjExecHelper()
           
 
Method Summary
static void checkProjectCycle(ProjectPlan host, ProjectPlan plan)
          Throws exception if a 'host' is the same as 'plan' or if 'host' is a sub-project (directly or indirectly) of 'plan'.
private static ObjectIdentifier getOid(Object obj)
           
static TimeToElapse getPlannedDuration(ExecutionObject exec_obj)
           
static ProjectState getProjectState(WfState state)
          Returns the project state corresponding to a workflow state passed as argument.
private static boolean getRolledUpValue(ExecutionConfiguration config, int attribute)
           
static Timestamp getStart(ExecutionObject exec_obj)
          Returns the best estimate for the start time.
static ProcessDataInfo getVariableSignature()
          Returns basic variablesignature data for the creation of execution object.
static WfState getWfState(ProjectState state)
          Returns the workflow state corresponding to a project state passed as argument.
static WfTransition getWfTransition(ProjectState old_state, ProjectState new_state)
          Returns the workflow transition corresponding to pair of project states passed as argument as old and new states.
static boolean hasTasks(ExecutionObject exec_obj)
          Determines whether a ExecutionObject has subordinate tasks (ProjectWorkItem).
static boolean isAutomatic(ExecutionObject exec_obj)
          Return true if the specified ExecutionObject is executing in automatic mode (either with or without tasks).
static boolean isCompleted(ExecutionObject exec_obj)
          Return true if the specified ExecutionObject is completed.
static boolean isDefined(ExecutionObject exec_obj)
          Return true if the specified ExecutionObject is defined.
static boolean isDisplayAsRolledUp(ExecutionObject exec_obj, int attribute)
          Determines whether the dynamic attribute (status, percent, estimated finish, total work and work cost) of the object passed as argument should be displayed as rolled up or overridden.
static boolean isManual(ExecutionObject exec_obj)
          Return true if the specified ExecutionObject is executing in manual mode.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(ProjExecHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

STATUS_ATTR

public static final int STATUS_ATTR


Supported API: false

See Also:
Constant Field Values

PERCENT_ATTR

public static final int PERCENT_ATTR


Supported API: false

See Also:
Constant Field Values

FINISH_ATTR

public static final int FINISH_ATTR


Supported API: false

See Also:
Constant Field Values

WORK_ATTR

public static final int WORK_ATTR


Supported API: false

See Also:
Constant Field Values

COST_ATTR

public static final int COST_ATTR


Supported API: false

See Also:
Constant Field Values

service

public static final ProjExecService service


Supported API: true


serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

SERVER

static final boolean SERVER
Constructor Detail

ProjExecHelper

public ProjExecHelper()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(ProjExecHelper thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getWfState

public static WfState getWfState(ProjectState state)
Returns the workflow state corresponding to a project state passed as argument.

Supported API: false

Parameters:
state -
Returns:
WfState
See Also:
WfState, ProjectState

getProjectState

public static ProjectState getProjectState(WfState state)
Returns the project state corresponding to a workflow state passed as argument.

Supported API: false

Parameters:
state -
Returns:
ProjectState
See Also:
WfState, ProjectState

getWfTransition

public static WfTransition getWfTransition(ProjectState old_state,
                                           ProjectState new_state)
Returns the workflow transition corresponding to pair of project states passed as argument as old and new states.

Supported API: false

Parameters:
old_state -
new_state -
Returns:
WfTransition
See Also:
WfTransition, ProjectState

getVariableSignature

public static ProcessDataInfo getVariableSignature()
                                            throws WTException
Returns basic variablesignature data for the creation of execution object. Used during initialization of project activities, milestones and summary activity instances and templates.

Supported API: false

Returns:
ProcessDataInfo
Throws:
WTException

isDisplayAsRolledUp

public static boolean isDisplayAsRolledUp(ExecutionObject exec_obj,
                                          int attribute)
Determines whether the dynamic attribute (status, percent, estimated finish, total work and work cost) of the object passed as argument should be displayed as rolled up or overridden. Returns 'true' if this is the case; 'false' otherwise.

Supported API: false

Parameters:
exec_obj -
attribute -
Returns:
boolean

getStart

public static Timestamp getStart(ExecutionObject exec_obj)
                          throws WTException
Returns the best estimate for the start time. The best estimate of the start time is computed as follows. If the object has started, returns start time. Otherwise returns planned start.

Supported API: false

Parameters:
exec_obj -
Returns:
Timestamp
Throws:
WTException

hasTasks

public static boolean hasTasks(ExecutionObject exec_obj)
Determines whether a ExecutionObject has subordinate tasks (ProjectWorkItem). Returns 'true' if this is the case, 'false' otherwise.

Only ProjectActivity object may have tasks, so this method returns false if the object passed as argument is not an activity.

Supported API: false

Parameters:
exec_obj -
Returns:
boolean

isCompleted

public static boolean isCompleted(ExecutionObject exec_obj)
Return true if the specified ExecutionObject is completed. An execution object is completed under two different conditions:
  1. the execution state is ProjectState.COMPLETED
  2. the execution object is executing in manual mode and its percent complete is 100%


Supported API: false

Parameters:
exec_obj - determine whether this object is completed or not
Returns:
boolean

isDefined

public static boolean isDefined(ExecutionObject exec_obj)
Return true if the specified ExecutionObject is defined. An execution object is defined under two different conditions:
  1. the execution object is executing in automatic mode and the execution state is ProjectState.DEFINED
  2. the execution object is executing in manual mode, its percent complete is 0% and its actual start date is not set


Supported API: false

Parameters:
exec_obj - determine whether this object is defined or not
Returns:
boolean

isManual

public static boolean isManual(ExecutionObject exec_obj)
Return true if the specified ExecutionObject is executing in manual mode.

Supported API: false

Parameters:
exec_obj - determine whether this object is executing in manual mode or not
Returns:
boolean

isAutomatic

public static boolean isAutomatic(ExecutionObject exec_obj)
Return true if the specified ExecutionObject is executing in automatic mode (either with or without tasks).

Supported API: false

Parameters:
exec_obj - determine whether this object is executing in automatic mode or not
Returns:
boolean

checkProjectCycle

public static void checkProjectCycle(ProjectPlan host,
                                     ProjectPlan plan)
                              throws WTException
Throws exception if a 'host' is the same as 'plan' or if 'host' is a sub-project (directly or indirectly) of 'plan'. This check is performed prior to adding 'plan' as a sub-project of 'host' in order to avoid cycles in the project-subproject containment hierarchy.

Supported API: false

Parameters:
host -
plan -
Throws:
WTException

getOid

private static ObjectIdentifier getOid(Object obj)

getPlannedDuration

public static TimeToElapse getPlannedDuration(ExecutionObject exec_obj)
                                       throws WTException
Throws:
WTException

getRolledUpValue

private static boolean getRolledUpValue(ExecutionConfiguration config,
                                        int attribute)