wt.projmgmt.monitor
Class ProjMonitorHelper

java.lang.Object
  extended bywt.projmgmt.monitor.ProjMonitorHelper
All Implemented Interfaces:
Externalizable, Serializable

public class ProjMonitorHelper
extends Object
implements Externalizable

Helper class giving remote access to ProjMonitorService functionality. It also holds utility functions and the time granularityto be used for project management.

Supported API: true

Extendable: false

See Also:
ProjMonitorService, Serialized Form

Field Summary
private static String CLASSNAME
           
static long END_OF_DAY
          Gives the time considered to be the end of day for deadline purposes.
static long EXTERNALIZATION_VERSION_UID
           
private static long MILLIS_IN_HOUR
           
private static long MILLIS_IN_MINUTE
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static ProjMonitorService service
          

Supported API: true
static long TIME_UNIT
          Number of minutes that gives the time granularity.
private static long timeUnit
           
private static boolean VERBOSE
           
private static double WORK_PRECISION
           
 
Constructor Summary
ProjMonitorHelper()
           
 
Method Summary
static boolean afterTime(Timestamp time1, Timestamp time2)
          Computes whether the first date is after the second for project management purposes.
static Timestamp getDeadlineTime(Timestamp time)
          Returns the deadline time for the day of the time passed as argument.
 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(ProjMonitorHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static boolean sameCurrency(Currency curr1, Currency curr2)
          Returns whether two cost objects are equal.
static boolean sameElapsedTime(TimeToElapse time1, TimeToElapse time2)
          Computes whether two elapsed times are the same for project management purposes.
private static boolean sameLong(long t1, long t2)
           
static boolean sameTime(Timestamp time1, Timestamp time2)
          Computes whether two dates are equal for project management purposes.
static boolean sameWork(Work work1, Work work2)
          Returns whether two work objects are equal.
 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

TIME_UNIT

public static final long TIME_UNIT
Number of minutes that gives the time granularity. This is, two dates are considered equal if they differ by less than TIME_UNIT minutes.

Supported API: false


END_OF_DAY

public static final long END_OF_DAY
Gives the time considered to be the end of day for deadline purposes. The time is given in hours using a 24 hour scale. So, for example, 18 represents 6:00 PM. The default is 20.

Supported API: false


service

public static final ProjMonitorService 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

timeUnit

private static final long timeUnit

WORK_PRECISION

private static final double WORK_PRECISION
See Also:
Constant Field Values

MILLIS_IN_HOUR

private static final long MILLIS_IN_HOUR
See Also:
Constant Field Values

MILLIS_IN_MINUTE

private static final long MILLIS_IN_MINUTE
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE
Constructor Detail

ProjMonitorHelper

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

sameTime

public static boolean sameTime(Timestamp time1,
                               Timestamp time2)
Computes whether two dates are equal for project management purposes. Returns 'true' if they differ by less than TIME_UNIT minutes and 'false' otherwise.

Supported API: false

Parameters:
time1 -
time2 -
Returns:
boolean

afterTime

public static boolean afterTime(Timestamp time1,
                                Timestamp time2)
Computes whether the first date is after the second for project management purposes. Returns 'true' if the first date is greater than the second more than TIME_UNIT minutes and 'false' otherwise.

Supported API: false

Parameters:
time1 -
time2 -
Returns:
boolean

sameElapsedTime

public static boolean sameElapsedTime(TimeToElapse time1,
                                      TimeToElapse time2)
Computes whether two elapsed times are the same for project management purposes. Returns 'true' if they differ by less than TIME_UNIT minutes and 'false' otherwise.

Supported API: false

Parameters:
time1 -
time2 -
Returns:
boolean

sameWork

public static boolean sameWork(Work work1,
                               Work work2)
Returns whether two work objects are equal. It is like the equals method only that it is equal if both are null.

Supported API: false

Parameters:
work1 -
work2 -
Returns:
boolean
See Also:
Work

sameCurrency

public static boolean sameCurrency(Currency curr1,
                                   Currency curr2)
Returns whether two cost objects are equal. It is like the equals method only that it is equal if both are null.

Supported API: false

Parameters:
curr1 -
curr2 -
Returns:
boolean
See Also:
wt.projmgmt.resource.Cost

getDeadlineTime

public static Timestamp getDeadlineTime(Timestamp time)
Returns the deadline time for the day of the time passed as argument.

Supported API: false

Parameters:
time -
Returns:
Timestamp

sameLong

private static boolean sameLong(long t1,
                                long t2)