|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.calendar.CalendarMonth
This is a lightweight class to transport the user's calendar data from
the server to the client. The attributes represent the working, nonworking,
and delegated days for a given month in as compact manner as feasible.
There are getter methods to exposed and abstract the data for display
purposes.
Each instance of this class will comprise one calendar month's worth
of data for the user. This amount of time was chosen because it is the
same amount of time that will be displayed to the use at any given time.
Note that to access the system calendar, the user parm would need to
be the WTPrincipalReference for the WTGroup assigned in the wt.properties
file to the property wt.admin.adminGroup.
Supported API: false
Extendable: false
Field Summary | |
private static int |
ALL_DAYS_SET
|
private static String |
CLASSNAME
|
private static int[] |
day_bits
|
private Hashtable |
delegatedDays
|
static long |
EXTERNALIZATION_VERSION_UID
|
private int |
nonWorkingDays
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static boolean |
VERBOSE
|
private int |
workingDays
|
Constructor Summary | |
CalendarMonth()
|
Method Summary | |
static CalendarMonth |
CalendarMonth()
|
private int |
checkBit(int set,
int bit)
|
private int |
clearBit(int set,
int bit)
|
WTPrincipalReference |
getDelegate(int dayOfTheMonth)
Returns null if the day is not delegated. |
Hashtable |
getDelegatedDays()
Gets the value of the attribute: delegatedDays; Used to hold days delegated (working or not). |
int |
getNonWorkingDays()
Gets the value of the attribute: nonWorkingDays; Used to hold days marked as non-working by the user. |
int |
getWorkingDays()
Gets the value of the attribute: workingDays; Used to hold days marked as working by the user. |
boolean |
isChanged(int dayOfTheMonth)
|
protected boolean |
isDaySet(int day,
int bits)
|
boolean |
isNonWorking(int dayOfTheMonth)
Supported API: false |
boolean |
isWorking(int dayOfTheMonth)
Supported API: false |
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(CalendarMonth thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
private int |
setBit(int set,
int bit)
|
protected int |
setDay(int day,
int bits)
|
protected void |
setDelegatedDay(int dayOfMonth,
WTPrincipalReference pRef)
|
void |
setDelegatedDays(Hashtable a_DelegatedDays)
Sets the value of the attribute: delegatedDays; Used to hold days delegated (working or not). |
protected void |
setNonWorkingDay(int day)
|
void |
setNonWorkingDays(int a_NonWorkingDays)
Sets the value of the attribute: nonWorkingDays; Used to hold days marked as non-working by the user. |
protected void |
setWorkingDay(int day)
|
void |
setWorkingDays(int a_WorkingDays)
Sets the value of the attribute: workingDays; Used to hold days marked as working by the user. |
protected int |
unsetDay(int day,
int bits)
|
protected void |
unsetNonWorkingDay(int day)
|
protected void |
unsetWorkingDay(int day)
|
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 |
private static final String RESOURCE
private static final String CLASSNAME
private int workingDays
private int nonWorkingDays
private Hashtable delegatedDays
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static boolean VERBOSE
private static final int[] day_bits
private static final int ALL_DAYS_SET
Constructor Detail |
public CalendarMonth()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(CalendarMonth thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public int getWorkingDays()
public void setWorkingDays(int a_WorkingDays) throws WTPropertyVetoException
a_WorkingDays
-
WTPropertyVetoException
public int getNonWorkingDays()
public void setNonWorkingDays(int a_NonWorkingDays) throws WTPropertyVetoException
a_NonWorkingDays
-
WTPropertyVetoException
public Hashtable getDelegatedDays()
public void setDelegatedDays(Hashtable a_DelegatedDays) throws WTPropertyVetoException
a_DelegatedDays
-
WTPropertyVetoException
public boolean isWorking(int dayOfTheMonth)
dayOfTheMonth
-
public boolean isNonWorking(int dayOfTheMonth)
dayOfTheMonth
-
public WTPrincipalReference getDelegate(int dayOfTheMonth)
dayOfTheMonth
-
private int setBit(int set, int bit)
protected int setDay(int day, int bits)
private int clearBit(int set, int bit)
protected int unsetDay(int day, int bits)
private int checkBit(int set, int bit)
protected boolean isDaySet(int day, int bits)
protected void setDelegatedDay(int dayOfMonth, WTPrincipalReference pRef) throws WTPropertyVetoException
WTPropertyVetoException
protected void setWorkingDay(int day)
protected void unsetWorkingDay(int day)
protected void setNonWorkingDay(int day)
protected void unsetNonWorkingDay(int day)
public static CalendarMonth CalendarMonth()
public boolean isChanged(int dayOfTheMonth)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |