|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.rules.AbleTimePeriod
This class defines the Able time period built in data type. It is used to specify a time period with optional masks for Months of the year, days of the month, days of the week, and starting/ending time of day.
The masks follow the IETF Policy Framework TimePeriod Condition spec.
Field Summary | |
---|---|
protected long |
myDayOfMonthMask
The Day of Month mask |
protected int |
myDayOfWeekMask
The Day of Week mask |
protected java.util.Calendar |
myEndValue
The ending date/time for this time period |
protected int |
myMonthMask
The Month mask |
protected java.util.Calendar |
myStartValue
The starting date/time for this time period. |
protected java.util.Calendar |
myTimeOfDayEndMask
The Time of Day end mask |
protected java.util.Calendar |
myTimeOfDayStartMask
The Time of Day start mask |
Constructor Summary | |
---|---|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
java.util.Calendar theTimeOfDayStartMask,
java.util.Calendar theTimeOfDayEndMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theDayOfWeekMask,
java.util.Calendar theTimeOfDayStartMask,
java.util.Calendar theTimeOfDayEndMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask,
int theDayOfWeekMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask,
long theDayOfMonthMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.util.Calendar theTimeOfDayStartMask,
java.util.Calendar theTimeOfDayEndMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
java.lang.String theTimeOfDayMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.util.Calendar theStartValue,
java.lang.String theEndValue)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.util.Calendar theEndValue)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theTimePeriod,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
Create a new time period instance over the specified range using IETF formatted Strings and Masks |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
int theDayOfWeekMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
long theDayOfMonthMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.util.Calendar theTimeOfDayStartMask,
java.util.Calendar theTimeOfDayEndMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
Create a new time period instance over the specified range. |
|
AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
java.lang.String theTimeOfDayMask)
Create a new time period instance over the specified range. |
Method Summary | |
---|---|
boolean |
contains(java.util.Calendar theCurrentTime)
Test to see if theCurrentTime (or simulated time) falls between the start and end date/times in this time period |
protected long |
getDayOfMonthBitMask(int theDayOfMonth)
|
long |
getDayOfMonthMask()
|
protected int |
getDayOfWeekBitMask(int theDayOfWeek)
|
int |
getDayOfWeekMask()
|
protected int |
getMonthBitMask(int theCalendarMonth)
|
int |
getMonthMask()
|
java.util.Calendar |
getTimeOfDayEndMask()
|
java.util.Calendar |
getTimeOfDayStartMask()
|
boolean |
isInDayOfMonth(java.util.Calendar theCurrentTime)
|
boolean |
isInDayOfWeek(java.util.Calendar theCurrentTime)
|
boolean |
isInMonth(java.util.Calendar theCurrentTime)
|
boolean |
isInTimePeriod(java.util.Calendar theCurrentTime)
|
java.util.BitSet |
setDayOfMonthMask(int theDayOfMonthMask)
Set the day of the month mask for this time period |
java.util.BitSet |
setDayOfWeekMask(int theDayOfWeekMask)
Set the day of week mask for this time period |
java.util.BitSet |
setMonthMask(int theMonthMask)
Set the month mask for this time period |
void |
setTimeOfDayEndMask(java.util.Calendar theMaskValue)
Set the end time mask for this time period |
void |
setTimeOfDayMask(java.util.Calendar theStartValue,
java.util.Calendar theEndValue)
Set the time of day mask for this time period |
void |
setTimeOfDayMask(java.lang.String theTimeOfDayMask)
Set the time of day mask for this time period using IETF syntax |
void |
setTimeOfDayStartMask(java.util.Calendar theMaskValue)
Set the start time mask for this time period |
void |
setTimePeriod(java.lang.String theTimePeriod)
Set the time period using IETF syntax |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Calendar myStartValue
protected java.util.Calendar myEndValue
protected int myMonthMask
protected int myDayOfWeekMask
protected long myDayOfMonthMask
protected java.util.Calendar myTimeOfDayStartMask
protected java.util.Calendar myTimeOfDayEndMask
Constructor Detail |
public AbleTimePeriod(java.lang.String theTimePeriod, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask) throws java.text.ParseException
theTimePeriod
- The starting and ending date/time for this time period
encoded as a single string value of the form
"yyyymmddThhmmss/yyyymmddThhmmss"
theMonthOfYearMask
- The subset of months to include in this time period
theDayOfMonthMask
- The days of the month to include in this time period (1-31)
theDayOfWeekMask
- The days of the week to include in this time period (1-7)
theTimeOfDayMask
- The starting and ending time of day for this time period
encoded as a single string value of the form
"Thhmmss/Thhmmss"
public AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue)
theStartValue
- The Calendar starting date/time for this time period
theEndValue
- The Calendar ending date/time for this time period.
public AbleTimePeriod(java.util.Calendar theStartValue, java.lang.String theEndValue)
theStartValue
- The Calendar starting date/time for this time period
theEndValue
- The String ending date/time for this time period.
public AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue)
theStartValue
- The String starting date/time for this time period
theEndValue
- The String ending date/time for this time period.
public AbleTimePeriod(java.lang.String theStartValue, java.util.Calendar theEndValue)
theStartValue
- The String starting date/time for this time period
theEndValue
- The String ending date/time for this time period.
public AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask)
theStartValue
- The Calendar starting date/time for this time period
theEndValue
- The Calendar ending date/time for this time period.
theMonthMask
- The int bitmask representing the subset of months to include in this time periodpublic AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask)
theStartValue
- The String starting date/time for this time period
theEndValue
- The String ending date/time for this time period.
theMonthMask
- The int bitmask representing the subset of months to include in this time periodpublic AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, long theDayOfMonthMask)
theStartValue
- The Calendar starting date/time for this time period
theEndValue
- The Calendar ending date/time for this time period.
theMonthMask
- The int bitmask representing the subset of months to include in this time period
theDayOfMonthMask
- The long bitmask representing the days of the month to include in this time periodpublic AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, long theDayOfMonthMask)
theStartValue
- The Calendar starting date/time for this time period
theEndValue
- The Calendar ending date/time for this time period.
theMonthMask
- The int bitmask representing the subset of months to include in this time period
theDayOfMonthMask
- The long bitmask representing the days of the month to include in this time periodpublic AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, int theDayOfWeekMask)
theStartValue
- The Calendar starting date/time for this time period
theEndValue
- The Calendar ending date/time for this time period.
theMonthMask
- The int bitmask representing the subset of months to include in this time period
theDayOfWeekMask
- The int bitmask representing the days of the week to include in this time periodpublic AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, int theDayOfWeekMask)
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theMonthMask
- The subset of months to include in this time period
theDayOfMonthMask
- The days of the month to include in this time period (1-31)
theDayOfWeekMask
- The days of the week to include in this time period (1-7)public AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask) throws java.text.ParseException
theStartValue
- The Calendar starting date/time for this time period
theEndValue
- The Calendar ending date/time for this time period.
theMonthMask
- The int bitmask representing the subset of months to include in this time period
theDayOfWeekMask
- The int bitmask representing the days of the week to include in this time periodpublic AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask) throws java.text.ParseException
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theMonthMask
- The subset of months to include in this time period
theDayOfMonthMask
- The days of the month to include in this time period (1-31)
theDayOfWeekMask
- The days of the week to include in this time period (1-7)public AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theMonthMask
- The subset of months to include in this time period
theDayOfMonthMask
- The days of the month to include in this time period (1-31)
theDayOfWeekMask
- The days of the week to include in this time period (1-7)
theTimeOfDayStartMask
- The time of day to include in this period
theTimeofDayEndMask
- The end of day to include in this periodpublic AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theMonthMask
- The subset of months to include in this time period
theDayOfMonthMask
- The days of the month to include in this time period (1-31)
theDayOfWeekMask
- The days of the week to include in this time period (1-7)
theTimeOfDayStartMask
- The time of day to include in this period
theTimeofDayEndMask
- The end of day to include in this periodpublic AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask) throws java.text.ParseException
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theMonthMask
- The subset of months to include in this time period
theDayOfMonthMask
- The days of the month to include in this time period (1-31)
theDayOfWeekMask
- The days of the week to include in this time period (1-7)
theTimeOfDayMask
- The time of day to include in this period
public AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theDayOfWeekMask, java.lang.String theTimeOfDayMask) throws java.text.ParseException
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theDayOfWeekMask
- The days of the week to include in this time period (1-7)
theTimeOfDayStartMask
- The time of day to include in this period
theTimeofDayEndMask
- The end of day to include in this periodpublic AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theDayOfWeekMask, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theDayOfWeekMask
- The days of the week to include in this time period (1-7)
theTimeOfDayStartMask
- The time of day to include in this period
theTimeofDayEndMask
- The end of day to include in this periodpublic AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theTimeOfDayStartMask
- The time of day to include in this period
theTimeofDayEndMask
- The end of day to include in this periodpublic AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, java.lang.String theTimeOfDayMask) throws java.text.ParseException
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theTimeOfDayMask
- The String representation of the time of day to include in this period
Format is "Thhmmss/Thhmmss" as in the IETF Policy Framework spec
public AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, java.lang.String theTimeOfDayMask) throws java.text.ParseException
theStartValue
- The starting date/time for this time period
theEndValue
- The ending date/time for this time period.
theTimeOfDayMask
- The String representation of the time of day to include in this period
Format is "Thhmmss/Thhmmss" as in the IETF Policy Framework spec
Method Detail |
public java.util.BitSet setMonthMask(int theMonthMask)
theMonthMask
- The bitmapped int indicating which months are to be included in this time period
Note: LSB = Jan (0), MSB = Dec (11)public int getMonthMask()
public java.util.BitSet setDayOfMonthMask(int theDayOfMonthMask)
theDayOfMonthMask
- The bitmapped int indicating which days in the month are to be included in this time period
Note: LSB (0) is day 1, MSB(31) is day 31public long getDayOfMonthMask()
public java.util.BitSet setDayOfWeekMask(int theDayOfWeekMask)
theDayOfWeekMask
- The bitmapped int indicating the days of the week which are to be included in this time period
Note: LSB (0) = Mondaypublic int getDayOfWeekMask()
public void setTimeOfDayStartMask(java.util.Calendar theMaskValue)
theMaskValue
- The Date object indicating the start time for this time periodpublic java.util.Calendar getTimeOfDayStartMask()
public void setTimeOfDayEndMask(java.util.Calendar theMaskValue)
theMaskValue
- The Date object indicating the end time for this time periodpublic java.util.Calendar getTimeOfDayEndMask()
public void setTimeOfDayMask(java.util.Calendar theStartValue, java.util.Calendar theEndValue)
theTimeofDayMask
- The start and end times to be included in this time periodpublic void setTimeOfDayMask(java.lang.String theTimeOfDayMask) throws java.text.ParseException
Format = "Thhmmss/Thhmmss" or optionally "hh:mm:ss AM/hh:mm:ss PM"
theTimeofDayMask
- The start and end times to be included in this time periodpublic void setTimePeriod(java.lang.String theTimePeriod) throws java.text.ParseException
Format = "yyyymmddThhmmss/yyyymmddThhmmss"
theTimePeriod
- The start and end dates and times in a single string formatted per IETF specspublic boolean isInTimePeriod(java.util.Calendar theCurrentTime)
public boolean isInMonth(java.util.Calendar theCurrentTime)
public boolean isInDayOfWeek(java.util.Calendar theCurrentTime)
public boolean isInDayOfMonth(java.util.Calendar theCurrentTime)
public boolean contains(java.util.Calendar theCurrentTime)
protected int getMonthBitMask(int theCalendarMonth)
protected int getDayOfWeekBitMask(int theDayOfWeek)
protected long getDayOfMonthBitMask(int theDayOfMonth)
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |