org.openpermis.basic
Class TimePeriodConstraint

java.lang.Object
  extended by org.openpermis.basic.TimePeriodConstraint
All Implemented Interfaces:
Serializable

public final class TimePeriodConstraint
extends Object
implements Serializable

A time period constraint containing one absolute and three relative time constraints.

Absolute Period:
The absolute valid period. The actual validity period is the intersection of the policy absolute validity period and the attribute certificate validity period.

Minimum Valid From:
The minimum duration that an attribute certificate must have been valid relative to the evaluation time.

Minimum Valid Up To:
The minimum duration that an attribute certificate must be valid from relative to the evaluation time.

Maximum Valid Up To:
The maximum duration that an attribute certificate should be valid from the evaluation time.

See Also:
Serialized Form
Since:
0.3.0

Field Summary
static TimePeriodConstraint UNCONSTRAINED
          A constraint that do not constrain (empty constraint).
 
Constructor Summary
TimePeriodConstraint(TimePeriod absolutePeriod, org.joda.time.Period minimumValidFrom, org.joda.time.Period minimumValidUpTo, org.joda.time.Period maximumValidUpTo)
          Creates a time period constraint.
 
Method Summary
 boolean equals(Object object)
           
 TimePeriod getAbsolutePeriod()
          Returns the absolute valid time period.
 org.joda.time.Period getMaximumValidUpTo()
          Returns the maximum valid up to period.
 org.joda.time.Period getMinimumValidFrom()
          Returns the minimum valid from period.
 org.joda.time.Period getMinimumValidUpTo()
          Returns the minimum valid up to period.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNCONSTRAINED

public static final TimePeriodConstraint UNCONSTRAINED
A constraint that do not constrain (empty constraint).

Constructor Detail

TimePeriodConstraint

public TimePeriodConstraint(TimePeriod absolutePeriod,
                            org.joda.time.Period minimumValidFrom,
                            org.joda.time.Period minimumValidUpTo,
                            org.joda.time.Period maximumValidUpTo)
Creates a time period constraint. Every argument may be null.

Parameters:
absolutePeriod - a TimePeriod.
minimumValidFrom - a Period.
minimumValidUpTo - a Period.
maximumValidUpTo - a Period.
Method Detail

getAbsolutePeriod

public TimePeriod getAbsolutePeriod()
Returns the absolute valid time period.

Returns:
the absolute valid time period.

getMinimumValidFrom

public org.joda.time.Period getMinimumValidFrom()
Returns the minimum valid from period.

Returns:
the minimum valid from period.

getMinimumValidUpTo

public org.joda.time.Period getMinimumValidUpTo()
Returns the minimum valid up to period.

Returns:
the minimum valid up to period.

getMaximumValidUpTo

public org.joda.time.Period getMaximumValidUpTo()
Returns the maximum valid up to period.

Returns:
the maximum valid up to period.

equals

public boolean equals(Object object)
Overrides:
equals in class Object
Since:
0.3.0

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Since:
0.3.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG