issrg.pba.rbac
Class AdjustedPeriodCollection

java.lang.Object
  extended by issrg.pba.rbac.SubsetCredentials
      extended by issrg.pba.rbac.DefaultValidityPeriodBehaviour
          extended by issrg.pba.rbac.RelativeValidityPeriod
              extended by issrg.pba.rbac.AdjustedValidityPeriod
                  extended by issrg.pba.rbac.AdjustedPeriodCollection
All Implemented Interfaces:
Credentials, ValidityPeriod, java.lang.Cloneable

public class AdjustedPeriodCollection
extends AdjustedValidityPeriod

This is a collection of periods that are applied together. This is an advanced implementation of intersection. Normally the IntersectionValidityPeriod produces the validity period that is just a set of the latest notBefore and the earliest notAfter, which is good for constraining. However, Age and Min cannot be implemented this way, because if the ValidityPeriod exceeds one of the margins, it is fully invalid, and not just constrained.

Author:
A.Otenko

Field Summary
 
Fields inherited from class issrg.pba.rbac.AdjustedValidityPeriod
age, maxSpan, minSpan
 
Fields inherited from class issrg.pba.rbac.RelativeValidityPeriod
na, nb, notAfter, theClock, unlimited
 
Constructor Summary
protected AdjustedPeriodCollection()
           
  AdjustedPeriodCollection(ValidityPeriod vp1, ValidityPeriod vp2)
          This constructor builds a AdjustedPeriodCollection of two ValidityPeriods.
 
Method Summary
 ValidityPeriod adjust(ValidityPeriod vp)
          This method returns an adjusted ValidityPeriod, where the collection of ValidityPeriods provided at construction time is adjusted against the given ValidityPeriod.
 java.lang.String toString()
           
 
Methods inherited from class issrg.pba.rbac.AdjustedValidityPeriod
intersection
 
Methods inherited from class issrg.pba.rbac.RelativeValidityPeriod
clone, getNotAfter, getNotBefore
 
Methods inherited from class issrg.pba.rbac.DefaultValidityPeriodBehaviour
contains
 
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

AdjustedPeriodCollection

protected AdjustedPeriodCollection()

AdjustedPeriodCollection

public AdjustedPeriodCollection(ValidityPeriod vp1,
                                ValidityPeriod vp2)
This constructor builds a AdjustedPeriodCollection of two ValidityPeriods. More ValidityPeriods can be added to the collection by chaining multiple AdjustedPeriodCollection as a binary tree. Both ValidityPeriods are treated equally.

Parameters:
vp1 - - one ValidityPeriod
vp2 - - another ValidityPeriod
Method Detail

adjust

public ValidityPeriod adjust(ValidityPeriod vp)
This method returns an adjusted ValidityPeriod, where the collection of ValidityPeriods provided at construction time is adjusted against the given ValidityPeriod.

Overrides:
adjust in class AdjustedValidityPeriod
Parameters:
vp - - the ValidityPeriod to adjust against

toString

public java.lang.String toString()
Overrides:
toString in class AdjustedValidityPeriod