|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.pba.rbac.SubsetCredentials issrg.pba.rbac.DefaultValidityPeriodBehaviour issrg.pba.rbac.RelativeValidityPeriod
public class RelativeValidityPeriod
This is a class representing a ValidityPeriod relative to the current time. Its notBefore and notAfter time depend on the time of evaluation and are specified as an offset from the current time.
A positive offset to the notBefore end of the period means it is in the past from now (and a negative means it is in the future from now). A positive offset to the notAfter end of the period means it is in the future from now (and a negative means it is in the past from now).
Field Summary | |
---|---|
protected RelativeDate |
na
|
protected RelativeDate |
nb
|
protected boolean |
notAfter
|
protected Clock |
theClock
This is the actual clock used for calculating relative periods. |
protected boolean |
unlimited
|
Constructor Summary | |
---|---|
protected |
RelativeValidityPeriod()
|
|
RelativeValidityPeriod(int years,
int months,
int days,
int hours,
int minutes,
int seconds,
boolean notAfter)
The integers specify how many years, months, etc to add (you can use negative values as well) to Now to get notBefore or notAfter date. |
|
RelativeValidityPeriod(int nbYears,
int nbMonths,
int nbDays,
int nbHours,
int nbMinutes,
int nbSeconds,
int naYears,
int naMonths,
int naDays,
int naHours,
int naMinutes,
int naSeconds)
This constructor lets build a RelativeValidityPeriod by specifying offsets for both the notBefore and notAfter ends explicitly. |
|
RelativeValidityPeriod(RelativeDate rd,
boolean notAfter)
This constructor builds the object using a reference to a ready to use RelativeDate object. |
|
RelativeValidityPeriod(RelativeDate notBefore,
RelativeDate notAfter)
This constructor specifies a RelativeValidityPeriod with the given RelativeDates of the notBefore and notAfter ends. |
Method Summary | |
---|---|
java.lang.Object |
clone()
This method creates a copy of the credentials object. |
java.util.Date |
getNotAfter()
This method returns the notAfter time offset from current time (as provided by the Clock). |
java.util.Date |
getNotBefore()
This method returns the notBefore time offset from current time (as provided by the Clock). |
java.lang.String |
toString()
|
Methods inherited from class issrg.pba.rbac.DefaultValidityPeriodBehaviour |
---|
contains, intersection |
Methods inherited from class issrg.pba.rbac.SubsetCredentials |
---|
equals, union |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface issrg.pba.Credentials |
---|
union |
Field Detail |
---|
protected Clock theClock
protected boolean unlimited
protected boolean notAfter
protected RelativeDate nb
protected RelativeDate na
Constructor Detail |
---|
protected RelativeValidityPeriod()
public RelativeValidityPeriod(int years, int months, int days, int hours, int minutes, int seconds, boolean notAfter)
years
- - the offset in yearsmonths
- - the offset in monthsdays
- - the offset in dayshours
- - the offset in hoursminutes
- - the offset in minutesseconds
- - the offset in secondsnotAfter
- - the flag specifying whether this is the offset for
notAfter or notBefore; if true, the specified offset is for notAfter,
otherwise for notBefore; the other end of the period is infinite.public RelativeValidityPeriod(RelativeDate rd, boolean notAfter)
rd
- - the RelativeDatenotAfter
- - the flag telling if it is the RelativeDate of the
notAfter or notBeforepublic RelativeValidityPeriod(int nbYears, int nbMonths, int nbDays, int nbHours, int nbMinutes, int nbSeconds, int naYears, int naMonths, int naDays, int naHours, int naMinutes, int naSeconds)
public RelativeValidityPeriod(RelativeDate notBefore, RelativeDate notAfter)
notBefore
- - the RelativeDate of the notBefore end of the periodnotAfter
- - the RelativeDate of the notAfter end of the periodMethod Detail |
---|
public java.util.Date getNotBefore()
public java.util.Date getNotAfter()
public java.lang.Object clone()
SubsetCredentials
clone
in interface Credentials
clone
in class SubsetCredentials
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |