|
|||||||||
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.IntersectionValidityPeriod
public class IntersectionValidityPeriod
This class is an intersection of ValidityPeriods. It is used when the intersection cannot be precomputed, e.g. when a AdjustedValidityPeriod is intersected with another ValidityPeriod, or when RelativeValidityPeriods are intersected - the results of both intersections will depend on the current time.
Constructor Summary | |
---|---|
protected |
IntersectionValidityPeriod()
|
|
IntersectionValidityPeriod(ValidityPeriod v1,
ValidityPeriod v2)
This constructor builds an intersection of two ValidityPeriods. |
Method Summary | |
---|---|
java.lang.Object |
clone()
This method creates a copy of the credentials object. |
boolean |
contains(Credentials c)
Generally, this method tests that both ValidityPeriods contain the given ValidityPeriod (the condition that the intersection of sets contains the given value). |
java.util.Date |
getNotAfter()
Generally this method returns the earliest notAfter time of the two ValidityPeriods. |
java.util.Date |
getNotBefore()
Generally, this method returns the latest of the notBefore times of the ValidityPeriods. |
boolean |
isNull()
This method tells the caller if this intersection of validity periods is null or not. |
java.lang.String |
toString()
|
Methods inherited from class issrg.pba.rbac.DefaultValidityPeriodBehaviour |
---|
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 |
Constructor Detail |
---|
protected IntersectionValidityPeriod()
public IntersectionValidityPeriod(ValidityPeriod v1, ValidityPeriod v2)
v1
- - one ValidityPeriodv2
- - another ValidityPeriodMethod Detail |
---|
public java.util.Date getNotBefore()
If either of the ValidityPeriods is a AdjustedValidityPeriod, the result is the notBefore time of the periods adjusted against each other. If neither of the ValidityPeriods is an AdjustedValidityPeriod, then the latest notBefore time of the two is returned.
public java.util.Date getNotAfter()
If either of the ValidityPeriods is a AdjustedValidityPeriod, then the notAfter time of the result of adjusting one period against the other is returned. If neither of them is an AdjustedValidityPeriod, then the earliest notAfter time of the two ValidityPeriods is returned.
public boolean contains(Credentials c)
This method overrides the inherited behaviour of the contains method to treat the AdjustedValidityPeriods differently. If neither of the Validity Periods in the intersection is an AdjustedValidityPeriod, or the given Credentials is not a ValidityPeriod, the inherited method determines whether the given Credentials is contained in this ValidityPeriod.
If either of the ValidityPeriods in the intersection is an AdjustedValidityPeriod, such validity period is adjusted against the given ValidityPeriod. The result of adjustment must still contain the given ValidityPeriod.
contains
in interface Credentials
contains
in class DefaultValidityPeriodBehaviour
c
- - the Credentials that must be contained in the intersection of
the ValidityPeriods (e.g. another ValidityPeriod or a
SetOfSubsetsCredentials containing multiple ValidityPeriods)
SetOfSubsetsCredentials
public boolean isNull()
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 |