oracle.panama.mp.privacy
Class AuthPeriod
java.lang.Object
|
+--oracle.panama.mp.privacy.AuthPeriod
- public class AuthPeriod
- extends java.lang.Object
AuthPeriod keeps a time range which is used when a user
grants the positioning right 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.
- Since:
- iAS Wireless Edition Release 2.0
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 ). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MONDAY
public static final byte MONDAY
TUESDAY
public static final byte TUESDAY
WEDNESDAY
public static final byte WEDNESDAY
THURSDAY
public static final byte THURSDAY
FRIDAY
public static final byte FRIDAY
SATURDAY
public static final byte SATURDAY
SUNDAY
public static final byte SUNDAY
AuthPeriod
public 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
). 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
- Parameters:
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.
getStartDate
public java.util.Calendar getStartDate()
getEndDate
public java.util.Calendar getEndDate()
getStartTime
public java.util.Calendar getStartTime()
getEndTime
public java.util.Calendar getEndTime()
getExclusion
public byte getExclusion()
contains
public boolean contains(java.util.Calendar posTime)
- This method is used to check whether the posTime falls in this AuthPeriod
- Parameters:
posTime
- time to be checked- Returns:
- if the posTime falls in the period, returns true, otherwise, false
is returned.