|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.panama.mp.privacy.AuthPeriod
The Authorization Period keeps a time range which is used when a user grants positioning rights to other users. An authorization period is composed of start date, end date, start time, end time and exclusions. The class also provides a method contains
to check whether specific time falls in the time range represented by the AuthPeriod object.
Field Summary | |
static AuthPeriod |
ALL_THE_TIME An AuthPeriod representing all time |
static byte |
FRIDAY A constant representing Friday |
static byte |
MONDAY A constant representing Monday |
static AuthPeriod |
NEVER An AuthPeriod representing never |
static byte |
SATURDAY A constant representing Saturday |
static byte |
SUNDAY A constant representing Sunday |
static byte |
THURSDAY A constant representing Thursday |
static byte |
TUESDAY A constant representing Tuesday |
static byte |
WEDNESDAY A constant representing Wednesday |
Constructor Summary | |
AuthPeriod(java.util.Calendar startD, java.util.Calendar endD, java.util.Calendar startT, java.util.Calendar endT, int excl) Construct an AuthPeriod which starts from a start day ( startD ), ends on a ending day (endD ) and for each day, starts from start time (startT and ends at ending time (endT ). |
Method Summary | |
boolean |
contains(java.util.Calendar posTime) This method is used to check whether the posTime falls in this AuthPeriod |
boolean |
equals(java.lang.Object obj) Returns true if the given object is equal to this period. |
java.util.Calendar |
getEndDate() Get the end date of the period |
java.util.Calendar |
getEndTime() Get the end time of the period |
byte |
getExclusion() Get the exclusions of the period |
java.util.Calendar |
getNextTimeWithinPeriod(java.util.Calendar now) Returns the overlap of this period and now. |
java.util.Calendar |
getStartDate() Get the start date of the period |
java.util.Calendar |
getStartTime() Get the start time of the period |
java.lang.String |
toString() Returns the string representation of this AuthPeriod object |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final AuthPeriod ALL_THE_TIME
public static final byte FRIDAY
public static final byte MONDAY
public static final AuthPeriod NEVER
public static final byte SATURDAY
public static final byte SUNDAY
public static final byte THURSDAY
public static final byte TUESDAY
public static final byte WEDNESDAY
Constructor Detail |
public AuthPeriod(java.util.Calendar startD, java.util.Calendar endD, java.util.Calendar startT, java.util.Calendar endT, int excl)
startD
), ends on a ending day (endD
) and for each day, starts from start time (startT
and ends at ending time (endT
). startT and endT are with the accuracy of minute. To represent a full day, the startT should be set to 00:00 and the endT should be set to 23:59 The excl specifies the days of the week which are excluded from the period. For example to contruct an AnthPeriod which represents the period: from June 15,2001 to July 15, 2001, each day from 9:00am to 5:00pm and excluding Weekends, startD
shoud be set to June 15,2001 endD
should be set to July 15,2001 startT
should be set to 9:00am endT
should be set to 5:00pm excl
should be set to AuthPeriod.SATURDAY | AuthPeriod.SUNDAY
startD
- the starting date(inclusive). If startD is null, today's date is usedendD
- the ending date(inclusive). If endD is null, today's date is usedstartT
- the starting time on each day (inclusive). If the startT is null, current time is used.endT
- the ending time on each day (inclusive). If the endT is null, current time is used.excl
- The exclusions.Method Detail |
public boolean contains(java.util.Calendar posTime)
posTime
- time to be checkedpublic boolean equals(java.lang.Object obj)
obj
- the object to comparepublic java.util.Calendar getEndDate()
public java.util.Calendar getEndTime()
public byte getExclusion()
public java.util.Calendar getNextTimeWithinPeriod(java.util.Calendar now)
now
- the interval to use for the overlappublic java.util.Calendar getStartDate()
public java.util.Calendar getStartTime()
public java.lang.String toString()
|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |