|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.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 specification.
Any String arguments must follow the syntax supported by the java.lang.DateFormat class. An example String argument for the US locale is:
"01/01/2004 11:00 PM"
An IllegalArgumentException will be thrown should the
format not be as required.
| Field Summary | |
|---|---|
static int |
NO_MASK
Use this value to disable a 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 local time period instance over the specified range using IETF formatted Strings and Masks. |
|
AbleTimePeriod(java.lang.String theTimePeriod,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask,
boolean isLocalTime)
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)
Tests to see if the time provided falls between the start and end date/times in this time period. |
protected long |
getDayOfMonthBitMask(int theDayOfMonth)
Return the bit mask for a given day of the month. |
protected long |
getDayOfMonthBitMaskFromLast(java.util.Calendar theCurrentTime)
Return the bit mask for a given day from last month. |
protected int |
getDayOfMonthFromLast(java.util.Calendar theCurrentTime)
Return the number of days between the provided time and the end of the month. |
long |
getDayOfMonthMask()
Get the day of the month mask for this time period. |
protected int |
getDayOfWeekBitMask(int theDayOfWeek)
Return the bit mask for a given day of the week. |
int |
getDayOfWeekMask()
Get the day of week mask for this time period. |
protected int |
getMonthBitMask(int theCalendarMonth)
Return the bit mask for a given calendar month. |
int |
getMonthMask()
Get the month mask for this time period. |
java.util.Calendar |
getTimeOfDayEndMask()
Get the end time mask for this time period |
java.util.Calendar |
getTimeOfDayStartMask()
Get the start time mask for this time period. |
boolean |
isInDayOfMonth(java.util.Calendar theCurrentTime)
Tests to see if the time provided falls between the start and end date/times in this time period. |
boolean |
isInDayOfWeek(java.util.Calendar theCurrentTime)
Tests to see if the time provided falls between the start and end date/times in this time period. |
boolean |
isInMonth(java.util.Calendar theCurrentTime)
Tests to see if the time provided falls between the start and end date/times in this time period. |
boolean |
isInTimePeriod(java.util.Calendar theCurrentTime)
Tests to see if the time provided falls between the start and end date/times in this time period. |
boolean |
isLocalTime()
|
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)
Sets the time of day mask for this time period. |
void |
setTimeOfDayMask(java.lang.String theTimeOfDayMask)
Sets 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)
Sets 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 |
public static final int NO_MASK
| Constructor Detail |
public AbleTimePeriod(java.lang.String theTimePeriod,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
theTimePeriod - The starting and ending date/time for this time period
encoded as a single string value of the form:
"yyyymmddThhmmss/yyyymmddThhmmss"
"THISANDPRIOR/yyyymmddThhmmss"
"yyyymmddThhmmss/THISANDFUTURE"
The ending date/time must come after the start date/time.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 starting and ending time of day for this time period
encoded as a single string value of the form
"Thhmmss/Thhmmss"
public AbleTimePeriod(java.lang.String theTimePeriod,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask,
boolean isLocalTime)
theTimePeriod - The starting and ending date/time for this time period
encoded as a single string value of the form:
"yyyymmddThhmmss/yyyymmddThhmmss"
"THISANDPRIOR/yyyymmddThhmmss"
"yyyymmddThhmmss/THISANDFUTURE"
The ending date/time must come after the start date/time.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 starting and ending time of day for this time period
encoded as a single string value of the form
"Thhmmss/Thhmmss"
isLocalTime - Use local time when true, universal when false.
public AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue)
theStartValue - The Calendar starting date/time for this time period.
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
public AbleTimePeriod(java.util.Calendar theStartValue,
java.lang.String theEndValue)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String ending local date/time for this time period.
The ending time must be after the starting time.
public AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
public AbleTimePeriod(java.lang.String theStartValue,
java.util.Calendar theEndValue)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
public AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
theMonthMask - The int bitmask representing the subset of months to include in this time period
public AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
theMonthMask - The int bitmask representing the subset of months to include in this time period
public AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask,
long theDayOfMonthMask)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
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 period
public AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
long theDayOfMonthMask)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
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 period
public AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theMonthMask,
int theDayOfWeekMask)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
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 period
public AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
int theDayOfWeekMask)
theStartValue - The String starting local date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
theMonthMask - The subset of months to include in this time period
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)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
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 period
public AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
theMonthMask - The subset of months to include in this time period.
theDayOfWeekMask - The days of the week to include in this time period (1-7).theTimeOfDayMask - The time of day to include in this time period.
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 Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
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 period
public 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 String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
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 period
public AbleTimePeriod(java.lang.String theStartValue,
java.lang.String theEndValue,
int theMonthMask,
long theDayOfMonthMask,
int theDayOfWeekMask,
java.lang.String theTimeOfDayMask)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
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)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
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.util.Calendar theStartValue,
java.util.Calendar theEndValue,
int theDayOfWeekMask,
java.util.Calendar theTimeOfDayStartMask,
java.util.Calendar theTimeOfDayEndMask)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
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 period
public AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
java.util.Calendar theTimeOfDayStartMask,
java.util.Calendar theTimeOfDayEndMask)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
theTimeOfDayStartMask - The time of day to include in this period
theTimeOfDayEndMask - The end of day to include in this period
public AbleTimePeriod(java.util.Calendar theStartValue,
java.util.Calendar theEndValue,
java.lang.String theTimeOfDayMask)
theStartValue - The Calendar starting date/time for this time period
The start time must precede the ending time.
theEndValue - The Calendar ending date/time for this time period.
The ending time must be after the starting time.
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)
theStartValue - The String local starting date/time for this time period
The start time must precede the ending time.
theEndValue - The String local ending date/time for this time period.
The ending time must be after the starting time.
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)
NO_MASK.
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 boolean isLocalTime()
public java.util.BitSet setDayOfMonthMask(int theDayOfMonthMask)
NO_MASK.
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(30) is day 31.public long getDayOfMonthMask()
public java.util.BitSet setDayOfWeekMask(int theDayOfWeekMask)
NO_MASK.
theDayOfWeekMask - The bitmapped int indicating the days of the week which are to be included in this time period.
Note: LSB (0) = Monday.public int getDayOfWeekMask()
public void setTimeOfDayStartMask(java.util.Calendar theMaskValue)
theMaskValue - The Calendar object indicating the start time for this time period.public java.util.Calendar getTimeOfDayStartMask()
public void setTimeOfDayEndMask(java.util.Calendar theMaskValue)
theMaskValue - The Calendar object indicating the end time for this time periodpublic java.util.Calendar getTimeOfDayEndMask()
public void setTimeOfDayMask(java.util.Calendar theStartValue,
java.util.Calendar theEndValue)
theStartValue - The start time to be included in this time periodtheEndValue - The end time to be included in this time periodpublic void setTimeOfDayMask(java.lang.String theTimeOfDayMask)
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)
"yyyymmddThhmmss/yyyymmddThhmmss"
"THISANDPRIOR/yyyymmddThhmmss"
"yyyymmddThhmmss/THISANDFUTURE"
theTimePeriod - The start and end dates and times in a single string formatted per IETF specspublic boolean isInTimePeriod(java.util.Calendar theCurrentTime)
theCurrentTime - The time to test.
public boolean isInMonth(java.util.Calendar theCurrentTime)
theCurrentTime - The time to test.
public boolean isInDayOfWeek(java.util.Calendar theCurrentTime)
theCurrentTime - The time to test.
public boolean isInDayOfMonth(java.util.Calendar theCurrentTime)
theCurrentTime - The time to test.
public boolean contains(java.util.Calendar theCurrentTime)
theCurrentTime - The time to test.
protected int getMonthBitMask(int theCalendarMonth)
theCalendarMonth - A calendar month such as java.util.Calendar.JANUARY.
protected int getDayOfWeekBitMask(int theDayOfWeek)
theDayOfWeek - A week day such as java.util.Calendar.MONDAY.
protected long getDayOfMonthBitMask(int theDayOfMonth)
theDayOfMonth - A month day ranging from 1 to 31.
protected long getDayOfMonthBitMaskFromLast(java.util.Calendar theCurrentTime)
theCurrentTime - The calendar indicating the current time.
protected int getDayOfMonthFromLast(java.util.Calendar theCurrentTime)
theCurrentTime - The calendar indicating the current time.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||