com.ibm.tws.objects.model
Class Calendar

java.lang.Object
  extended bycom.ibm.tws.objects.model.Calendar
All Implemented Interfaces:
java.io.Serializable, TWSObject

public class Calendar
extends java.lang.Object
implements TWSObject

This object represents a TWS calendar, and wraps a CalendarHeader that in turn wraps a CalendarKey. No object is referenced by Calendar, which includes only the attributes of a TWS calendar.

The following syntax validation constraints must be met on Calendar objects in distributed environment:

name Always required
Alphanumeric characters
Starting with alphabetic character
'-' and '_' characters allowed
Blank spaces not allowed
Not longer than 8 characters
description Not longer than 120 characters
iCalendar A list of dates in the following format: yymmdd{,yymmdd}
Always required

The following syntax validation constraints must be met on Calendar objects in z/OS environment:

name Always required
Alphanumeric characters
Starting with alphabetic character
Blank spaces not allowed
Not longer than 16 characters
description Not longer than 30 characters
iCalendar N/A
shiftEndTime An amount of time, expressed in milliseconds
iCalendarFreeDates A list of dates in the following format: yyyymmdd{,yyyymmdd}
Required if iCalendarWorkDates, iCalendarWorkWeekdays and iCalendarFreeWeekdays are not specified
iCalendarWorkDates A list of dates in the following format: yyyymmdd{,yyyymmdd}
Required if iCalendarFreeDates, iCalendarWorkWeekdays and iCalendarFreeWeekdays are not specified
iCalendarWorkWeekdays A list of days in iCalendar sub-string format (e.g. "FR,SA")
Required if iCalendarWorkDates, iCalendarFreeDates and iCalendarFreeWeekdays are not specified
iCalendarFreeWeekdays A list of days in iCalendar sub-string format (e.g. "SA,SU")
Required if iCalendarWorkDates, iCalendarWorkWeekdays and iCalendarFreeDates are not specified

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
static java.lang.String HOLIDAYS
          The constant to be used to identify the name of the HOLIDAYS calendar.
 
Constructor Summary
Calendar()
          Creates an empty Calendar.
Calendar(CalendarHeader calendarHeader)
          Creates a Calendar with the specified header.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this Calendar object are equal to those of the given one.
 java.lang.String getDescription()
          Returns the calendar description.
 CalendarHeader getHeader()
          Returns the CalendarHeader wrapped by this Calendar object.
 java.lang.String getICalendar()
          Returns the list of all specific dates associated to this calendar as an iCalendar string.
 java.lang.String getICalendarDates()
          Returns the list of all specific dates associated to this calendar as an iCalendar string.
 java.lang.String getICalendarFreeDates()
          Returns the list of the "free" dates associated to this calendar as an iCalendar string.
 java.lang.String getICalendarFreeWeekdays()
          Returns the list of the "free" weekdays associated to this calendar as an iCalendar string.
 java.lang.String getICalendarWeekdays()
          Returns the list of all weekdays associated to this calendar as an iCalendar string.
 java.lang.String getICalendarWorkDates()
          Returns the list of the "working" dates associated to this calendar as an iCalendar string.
 java.lang.String getICalendarWorkWeekdays()
          Returns the list of the "working" weekdays associated to this calendar as an iCalendar string.
 Identifier getId()
          Returns the calendar identifier.
 CalendarKey getKey()
          Returns the CalendarKey wrapped by this Calendar object.
 LockData getLockData()
          Returns the calendar lock data.
 ModifyData getModifyData()
          Returns the calendar modification data.
 java.lang.String getName()
          Returns the calendar name.
 TWSHeader getObjectHeader()
          Returns the calendar header as a TWS header.
 TWSKey getObjectKey()
          Returns the calendar key as a TWS key.
 long getShiftEndTime()
          Returns the calendar shift end time in milliseconds (e.g.
 int hashCode()
          Returns a hash code for this Calendar object.
 void setDescription(java.lang.String value)
          Sets the calendar description.
 void setHeader(CalendarHeader calendarHeader)
          Sets the CalendarHeader to be wrapped by this Calendar object.
 void setICalendar(java.lang.String value)
          Sets the list of all specific dates to be associated to this calendar as an iCalendar string.
 void setICalendarFreeDates(java.lang.String value)
          Sets the list of the "free" dates to be associated to this calendar as an iCalendar string.
 void setICalendarFreeWeekdays(java.lang.String value)
          Sets the list of the "free" weekdays to be associated to this calendar as an iCalendar string.
 void setICalendarWeekdays(java.lang.String value)
          Sets the list of all weekdays to be associated to this calendar as an iCalendar string.
 void setICalendarWorkDates(java.lang.String value)
          Sets the list of the "working" dates to be associated to this calendar as an iCalendar string.
 void setICalendarWorkWeekdays(java.lang.String value)
          Sets the list of the "working" weekdays to be associated to this calendar as an iCalendar string.
 void setId(Identifier identifier)
          Sets the calendar identifier.
 void setKey(CalendarKey calendarKey)
          Sets the CalendarKey to be wrapped by this Calendar object.
 void setLockData(LockData data)
          Sets the calendar lock data.
 void setModifyData(ModifyData data)
          Sets the calendar modification data.
 void setName(java.lang.String value)
          Sets the calendar name.
 void setShiftEndTime(long value)
          Sets the calendar shift end time in milliseconds (e.g.
 java.lang.String toString()
          Returns a string representation of this Calendar object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.


HOLIDAYS

public static final java.lang.String HOLIDAYS
The constant to be used to identify the name of the HOLIDAYS calendar.

See Also:
Constant Field Values
Constructor Detail

Calendar

public Calendar()
Creates an empty Calendar.


Calendar

public Calendar(CalendarHeader calendarHeader)
Creates a Calendar with the specified header.

Parameters:
calendarHeader - The calendar header.
Method Detail

getId

public Identifier getId()
Returns the calendar identifier.

Specified by:
getId in interface TWSObject
Returns:
The calendar identifier.

getObjectKey

public TWSKey getObjectKey()
Returns the calendar key as a TWS key.

Specified by:
getObjectKey in interface TWSObject
Returns:
The calendar key as a TWS key.

getObjectHeader

public TWSHeader getObjectHeader()
Returns the calendar header as a TWS header.

Specified by:
getObjectHeader in interface TWSObject
Returns:
The calendar header as a TWS header.

getKey

public CalendarKey getKey()
Returns the CalendarKey wrapped by this Calendar object.

Returns:
The CalendarKey wrapped by this Calendar object.

getHeader

public CalendarHeader getHeader()
Returns the CalendarHeader wrapped by this Calendar object.

Returns:
The CalendarHeader wrapped by this Calendar object.

getName

public java.lang.String getName()
Returns the calendar name.

Specified by:
getName in interface TWSObject
Returns:
The calendar name.

getDescription

public java.lang.String getDescription()
Returns the calendar description.

Returns:
The calendar description.

getModifyData

public ModifyData getModifyData()
Returns the calendar modification data.

Specified by:
getModifyData in interface TWSObject
Returns:
The calendar modification data.

getLockData

public LockData getLockData()
Returns the calendar lock data.

Specified by:
getLockData in interface TWSObject
Returns:
The calendar lock data.

getICalendar

public java.lang.String getICalendar()
Returns the list of all specific dates associated to this calendar as an iCalendar string.

Returns:
A string that contains the list of specific dates associated to this calendar in iCalendar sub-string format (e.g. "20050714,20050901,20050914").

getICalendarDates

public java.lang.String getICalendarDates()
Returns the list of all specific dates associated to this calendar as an iCalendar string.

Returns:
A string that contains the list of specific dates associated to this calendar in iCalendar sub-string format (e.g. "20050714,20050901,20050914").

getICalendarFreeDates

public java.lang.String getICalendarFreeDates()
Returns the list of the "free" dates associated to this calendar as an iCalendar string.

Returns:
A string that contains the list of "free" dates associated to this calendar in iCalendar sub-string format (e.g. "20050314,20050401").

getICalendarWorkDates

public java.lang.String getICalendarWorkDates()
Returns the list of the "working" dates associated to this calendar as an iCalendar string.

Returns:
A string that contains the list of "working" dates associated to this calendar in iCalendar sub-string format (e.g. "20050314,20050401").

getICalendarWeekdays

public java.lang.String getICalendarWeekdays()
Returns the list of all weekdays associated to this calendar as an iCalendar string.

Returns:
A string that contains the list of weekdays associated to this calendar in iCalendar sub-string format (e.g. "TU,FR,SA").

getICalendarFreeWeekdays

public java.lang.String getICalendarFreeWeekdays()
Returns the list of the "free" weekdays associated to this calendar as an iCalendar string.

Returns:
A string that contains the list of only the "free" weekdays associated to this calendar in iCalendar sub-string format (e.g. "SA,SU").

getICalendarWorkWeekdays

public java.lang.String getICalendarWorkWeekdays()
Returns the list of the "working" weekdays associated to this calendar as an iCalendar string.

Returns:
A string that contains the list of only the "working" weekdays associated to this calendar in iCalendar sub-string format (e.g. "MO,TU,WE,TH,FR").

getShiftEndTime

public long getShiftEndTime()
Returns the calendar shift end time in milliseconds (e.g. 18:00 = (18 * 60 * 60 + 0 * 60) * 1000)

Returns:
The calendar shift end time.

setId

public void setId(Identifier identifier)
Sets the calendar identifier.

Parameters:
identifier - The calendar identifier.

setKey

public void setKey(CalendarKey calendarKey)
Sets the CalendarKey to be wrapped by this Calendar object.

Parameters:
calendarKey - The CalendarKey to be wrapped by this Calendar object.

setHeader

public void setHeader(CalendarHeader calendarHeader)
Sets the CalendarHeader to be wrapped by this Calendar object.

Parameters:
calendarHeader - The CalendarHeader to be wrapped by this Calendar object.

setName

public void setName(java.lang.String value)
Sets the calendar name.

Parameters:
value - The calendar name.

setDescription

public void setDescription(java.lang.String value)
Sets the calendar description.

Parameters:
value - The calendar description.

setModifyData

public void setModifyData(ModifyData data)
Sets the calendar modification data. For internal use only.

Parameters:
data - A ModifyData object.

setLockData

public void setLockData(LockData data)
Sets the calendar lock data. For internal use only.

Parameters:
data - A LockData object.

setICalendar

public void setICalendar(java.lang.String value)
Sets the list of all specific dates to be associated to this calendar as an iCalendar string.

Parameters:
value - A string that contains the list of specific dates to be associated to this calendar in iCalendar sub-string format (e.g. "20050714,20050901,20050914").

setICalendarFreeDates

public void setICalendarFreeDates(java.lang.String value)
Sets the list of the "free" dates to be associated to this calendar as an iCalendar string.

Parameters:
value - A string that contains the list of "free" dates to be associated to this calendar in iCalendar sub-string format (e.g. "20050314,20050401").

setICalendarWorkDates

public void setICalendarWorkDates(java.lang.String value)
Sets the list of the "working" dates to be associated to this calendar as an iCalendar string.

Parameters:
value - A string that contains the list of "working" dates to be associated to this calendar in iCalendar sub-string format (e.g. "20050314,20050401").

setICalendarWeekdays

public void setICalendarWeekdays(java.lang.String value)
Sets the list of all weekdays to be associated to this calendar as an iCalendar string.

Parameters:
value - A string that contains the list of weekdays to be associated to this calendar in iCalendar sub-string format (e.g. "TU,FR,SA").

setICalendarFreeWeekdays

public void setICalendarFreeWeekdays(java.lang.String value)
Sets the list of the "free" weekdays to be associated to this calendar as an iCalendar string.

Parameters:
value - A string that contains the list of only the "free" weekdays to be associated to this calendar in iCalendar sub-string format (e.g. "SA,SU").

setICalendarWorkWeekdays

public void setICalendarWorkWeekdays(java.lang.String value)
Sets the list of the "working" weekdays to be associated to this calendar as an iCalendar string.

Parameters:
value - A string that contains the list of only the "working" weekdays to be associated to this calendar in iCalendar sub-string format (e.g. "MO,TU,WE,TH,FR").

setShiftEndTime

public void setShiftEndTime(long value)
Sets the calendar shift end time in milliseconds (e.g. 18:00 = (18 * 60 * 60 + 0 * 60) * 1000)

Parameters:
value - The calendar shift end time.

equals

public boolean equals(java.lang.Object object)
Returns true if all fields of this Calendar object are equal to those of the given one.

Parameters:
object - The object to be compared with this one.
Returns:
True if this object equals to the given one.

hashCode

public int hashCode()
Returns a hash code for this Calendar object.

Returns:
The object's hash code.

toString

public java.lang.String toString()
Returns a string representation of this Calendar object.

Returns:
A text string including all Calendar fields.


Copyright © 2005 IBM All Rights Reserved.