wt.projmgmt.monitor
Class MonitorInfo

java.lang.Object
  extended bywt.projmgmt.monitor.MonitorInfo
All Implemented Interfaces:
Evolvable, Externalizable, NetFactor, ObjectMappable, Serializable

public class MonitorInfo
extends Object
implements ObjectMappable, Evolvable, Externalizable

The MonitorInfo class represents dynamic project information that results from the project execution. This information includes the health status, the percent complete and the estimated finish date. Other attributes indicate whether these values were expliclty set or not.

Use the newMonitorInfo static factory method(s), not the MonitorInfo 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

See Also:
wt.projmgmt.admin.ProjectStatus, wt.projmgmt.execution.ExeutionObject, Serialized Form

Field Summary
private static String CLASSNAME
           
static String CURRENT_WORK_COST
          Label for the attribute.
private  Currency currentWorkCost
           
static String EXEC_STATUS
          Label for the attribute; Health status.
private static int EXEC_STATUS_UPPER_LIMIT
           
private  ProjectHealthStatus execStatus
           
static long EXTERNALIZATION_VERSION_UID
           
static String FINISH_DATE
          Label for the attribute; Timestamp representing the estimated finish date.
private  Timestamp finishDate
           
protected static long OLD_FORMAT_VERSION_UID
           
private static int PERCENT_PRECISION
           
static String PERFORMED_WORK
          Label for the attribute; Integer between -1 and 100 rerpesenting the percent complete of an execution object.
private  Work performedWork
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String TOTAL_WORK
          Label for the attribute; Total work.
static String TOTAL_WORK_COST
          Label for the attribute.
private  Work totalWork
           
private  Currency totalWorkCost
           
private static boolean VERBOSE
           
 
Constructor Summary
MonitorInfo()
           
 
Method Summary
 boolean equals(Object object)
          Determines if the object is equal to the one passed as argument.
private  boolean equals(Object obj1, Object obj2)
          Checks for equality when one or both of the objects might be null.
 ClassInfo getClassInfo()
          Returns the ClassInfo object for this class.
 String getConceptualClassname()
          Deprecated.  
 Currency getCurrentWorkCost()
          Gets the value of the attribute: CURRENT_WORK_COST.
 ProjectHealthStatus getExecStatus()
          Gets the value of the attribute: EXEC_STATUS.
 Timestamp getFinishDate()
          Gets the value of the attribute: FINISH_DATE.
 int getPercentComplete()
          

Supported API: false
 Work getPerformedWork()
          Gets the value of the attribute: PERFORMED_WORK.
 Work getTotalWork()
          Gets the value of the attribute: TOTAL_WORK.
 Currency getTotalWorkCost()
          Gets the value of the attribute: TOTAL_WORK_COST.
protected  void initialize()
          Supports initialization, following construction of an instance.
protected  void initialize(ExecutionObject exec_obj)
          Supports initialization, following construction of an instance.
static MonitorInfo newMonitorInfo()
          No arg constructor.
static MonitorInfo newMonitorInfo(ExecutionObject exec_obj)
          Constructor taking as arguments a project management object.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
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(MonitorInfo thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  int round(double percent)
          Rounds percentages avoiding floating point errors.
 void setCurrentWorkCost(Currency a_CurrentWorkCost)
          Sets the value of the attribute: CURRENT_WORK_COST.
 void setExecStatus(ProjectHealthStatus a_ExecStatus)
          Sets the value of the attribute: EXEC_STATUS.
 void setFinishDate(Timestamp a_FinishDate)
          Sets the value of the attribute: FINISH_DATE.
 void setPercentComplete(double percent)
          

Supported API: false
 void setPerformedWork(Work a_PerformedWork)
          Sets the value of the attribute: PERFORMED_WORK.
 ExecutionObject setToObject(ExecutionObject exec_obj)
          Sets the explicitly set values in the monitor info object to the corresponding values in the execution object passed as argument.
 void setTotalWork(Work a_TotalWork)
          Sets the value of the attribute: TOTAL_WORK.
 void setTotalWorkCost(Currency a_TotalWorkCost)
          Sets the value of the attribute: TOTAL_WORK_COST.
 String toString()
          Returns the conceptual (modeled) name for the class.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class java.lang.Object
clone, 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

EXEC_STATUS

public static final String EXEC_STATUS
Label for the attribute; Health status. It can be one of {UNAVAILABLE, GREEN, YELLOW, RED}.

Supported API: false

See Also:
ExecutionObject, Constant Field Values

EXEC_STATUS_UPPER_LIMIT

private static int EXEC_STATUS_UPPER_LIMIT

execStatus

private ProjectHealthStatus execStatus

FINISH_DATE

public static final String FINISH_DATE
Label for the attribute; Timestamp representing the estimated finish date.

Supported API: false

See Also:
ExecutionObject, Constant Field Values

finishDate

private Timestamp finishDate

PERFORMED_WORK

public static final String PERFORMED_WORK
Label for the attribute; Integer between -1 and 100 rerpesenting the percent complete of an execution object.

Supported API: false

See Also:
ExecutionObject, Constant Field Values

performedWork

private Work performedWork

TOTAL_WORK

public static final String TOTAL_WORK
Label for the attribute; Total work.

Supported API: false

See Also:
Constant Field Values

totalWork

private Work totalWork

TOTAL_WORK_COST

public static final String TOTAL_WORK_COST
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

totalWorkCost

private Currency totalWorkCost

CURRENT_WORK_COST

public static final String CURRENT_WORK_COST
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

currentWorkCost

private Currency currentWorkCost

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

VERBOSE

private static final boolean VERBOSE

PERCENT_PRECISION

private static final int PERCENT_PRECISION
See Also:
Constant Field Values
Constructor Detail

MonitorInfo

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

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

toString

public String toString()
Returns the conceptual (modeled) name for the class.

Supported API: false

Returns:
String

getClassInfo

public ClassInfo getClassInfo()
                       throws WTIntrospectionException
Returns the ClassInfo object for this class.

Supported API: false

Specified by:
getClassInfo in interface NetFactor
Returns:
ClassInfo
Throws:
WTIntrospectionException

getExecStatus

public ProjectHealthStatus getExecStatus()
Gets the value of the attribute: EXEC_STATUS. Health status. It can be one of {UNAVAILABLE, GREEN, YELLOW, RED}.

Supported API: false

Returns:
ProjectHealthStatus
See Also:
ExecutionObject

setExecStatus

public void setExecStatus(ProjectHealthStatus a_ExecStatus)
Sets the value of the attribute: EXEC_STATUS. Health status. It can be one of {UNAVAILABLE, GREEN, YELLOW, RED}.

Supported API: false

Parameters:
a_ExecStatus -
See Also:
ExecutionObject

getFinishDate

public Timestamp getFinishDate()
Gets the value of the attribute: FINISH_DATE. Timestamp representing the estimated finish date.

Supported API: false

Returns:
Timestamp
See Also:
ExecutionObject

setFinishDate

public void setFinishDate(Timestamp a_FinishDate)
Sets the value of the attribute: FINISH_DATE. Timestamp representing the estimated finish date.

Supported API: false

Parameters:
a_FinishDate -
See Also:
ExecutionObject

getPerformedWork

public Work getPerformedWork()
Gets the value of the attribute: PERFORMED_WORK. Integer between -1 and 100 rerpesenting the percent complete of an execution object.

Supported API: false

Returns:
Work
See Also:
ExecutionObject

setPerformedWork

public void setPerformedWork(Work a_PerformedWork)
Sets the value of the attribute: PERFORMED_WORK. Integer between -1 and 100 rerpesenting the percent complete of an execution object.

Supported API: false

Parameters:
a_PerformedWork -
See Also:
ExecutionObject

getTotalWork

public Work getTotalWork()
Gets the value of the attribute: TOTAL_WORK. Total work.

Supported API: false

Returns:
Work

setTotalWork

public void setTotalWork(Work a_TotalWork)
Sets the value of the attribute: TOTAL_WORK. Total work.

Supported API: false

Parameters:
a_TotalWork -

getTotalWorkCost

public Currency getTotalWorkCost()
Gets the value of the attribute: TOTAL_WORK_COST.

Supported API: false

Returns:
Currency

setTotalWorkCost

public void setTotalWorkCost(Currency a_TotalWorkCost)
Sets the value of the attribute: TOTAL_WORK_COST.

Supported API: false

Parameters:
a_TotalWorkCost -

getCurrentWorkCost

public Currency getCurrentWorkCost()
Gets the value of the attribute: CURRENT_WORK_COST.

Supported API: false

Returns:
Currency

setCurrentWorkCost

public void setCurrentWorkCost(Currency a_CurrentWorkCost)
Sets the value of the attribute: CURRENT_WORK_COST.

Supported API: false

Parameters:
a_CurrentWorkCost -

newMonitorInfo

public static MonitorInfo newMonitorInfo(ExecutionObject exec_obj)
                                  throws WTException
Constructor taking as arguments a project management object. The monitor info values are read from the corresponding values of the object. Throws a runtime exception (internal error) if the object is not an execution object ExecutionObject. The argument object may or may not be a resource holder ResourceHolder.

Supported API: false

Parameters:
exec_obj -
Returns:
MonitorInfo
Throws:
WTException

initialize

protected void initialize(ExecutionObject exec_obj)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
exec_obj -
Throws:
WTException

newMonitorInfo

public static MonitorInfo newMonitorInfo()
                                  throws WTException
No arg constructor. The values for status, percent and date are 'UNAVAILABLE', '-1' and 'null' respectively.

Supported API: false

Returns:
MonitorInfo
Throws:
WTException

initialize

protected void initialize()
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Throws:
WTException

setToObject

public ExecutionObject setToObject(ExecutionObject exec_obj)
                            throws WTException
Sets the explicitly set values in the monitor info object to the corresponding values in the execution object passed as argument.

Supported API: false

Parameters:
exec_obj -
Returns:
ExecutionObject
Throws:
WTException

equals

public boolean equals(Object object)
Determines if the object is equal to the one passed as argument. Returns 'true' the they have the same values and 'false' otherwise.

Supported API: false

Parameters:
object -
Returns:
boolean

getPercentComplete

public int getPercentComplete()


Supported API: false

Returns:
int

setPercentComplete

public void setPercentComplete(double percent)


Supported API: false

Parameters:
percent -

equals

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


round

private int round(double percent)
Rounds percentages avoiding floating point errors.