com.sun.identity.saml.assertion
クラス Conditions

java.lang.Object
  上位を拡張 com.sun.identity.saml.assertion.Conditions

public class Conditions
extends Object

This Conditions is a set of Condition. The validity of an Assertion MAY be subject to a set of Conditions. Each Condition evaluates to a value that is Valid, Invalid or Indeterminate.


フィールドの概要
protected  DoNotCacheCondition doNotCache
           
 
コンストラクタの概要
Conditions()
          Default Constructor
Conditions(Date notBefore, Date notOnOrAfter)
          Constructs an instance of Conditions.
Conditions(Date notBefore, Date notOnOrAfter, Condition condition, AudienceRestrictionCondition arc)
          Constructs an instance of Conditions.
Conditions(Date notBefore, Date notOnOrAfter, Condition condition, AudienceRestrictionCondition arc, DoNotCacheCondition doNotCacheCnd)
          Constructs an instance of Conditions.
Conditions(Element conditionsElement)
          Constructs a Conditions element from an existing XML block.
 
メソッドの概要
 boolean addAudienceRestrictionCondition(AudienceRestrictionCondition arc)
          Adds an audience restriction condition within this Conditions Element.
 boolean checkDateValidity(long someTime)
          Returns true if a specific Date falls within the validity interval of this set of conditions.
protected  AudienceRestrictionCondition createAudienceRestrictionCondition(Element audienceRestrictionElement)
           
protected  DoNotCacheCondition createDoNotCacheCondition(Element doNotCacheConditionElement)
           
 Set getAudienceRestrictionCondition()
          Returns a set of the AudienceRestrictionCondition elements held within this Conditions element.
 DoNotCacheCondition getDoNotCacheCondition()
          Returns DoNotCacheCondition elements held within this Conditions element
 Date getNotBefore()
          Returns the earliest time at which the assertion is valid held in this Conditions object.
 Date getNotOnorAfter()
          Returns the time instant held within this Conditions object at which the Assertion has expired.
 boolean removeAudienceRestrictionCondition(String audience)
          Removes an audience restriction condition AudienceRestrictionConditionfrom this Conditions object wherein the specified audience has been defined.
 void setDoNotCacheCondition(DoNotCacheCondition doNotCacheCnd)
          Sets DoNotCacheCondition elements held within this Conditions element.
 String toString()
          Returns a String representation of the element.
 String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the <Conditions> element.
 

フィールドの詳細

doNotCache

protected DoNotCacheCondition doNotCache
コンストラクタの詳細

Conditions

public Conditions()
Default Constructor


Conditions

public Conditions(Date notBefore,
                  Date notOnOrAfter)
           throws SAMLException
Constructs an instance of Conditions.

パラメータ:
notBefore - specifies the earliest time instant at which the assertion is valid.
notOnOrAfter - specifies the time instant at which the assertion has expired.
例外:
SAMLException - if the notBefore instant is after notOnOrAfter instant.

Conditions

public Conditions(Date notBefore,
                  Date notOnOrAfter,
                  Condition condition,
                  AudienceRestrictionCondition arc)
           throws SAMLException
Constructs an instance of Conditions.

パラメータ:
notBefore - specifies the earliest time instant at which the assertion is valid.
notOnOrAfter - specifies the time instant at which the assertion has expired.
condition - Condition object
arc - the <AudienceRestrictionCondition> to be added.Can be null, if no audience restriction.
例外:
SAMLException - if there is a problem in input data and it cannot be processed correctly.

Conditions

public Conditions(Date notBefore,
                  Date notOnOrAfter,
                  Condition condition,
                  AudienceRestrictionCondition arc,
                  DoNotCacheCondition doNotCacheCnd)
           throws SAMLException
Constructs an instance of Conditions.

パラメータ:
notBefore - specifies the earliest time instant at which the assertion is valid.
notOnOrAfter - specifies the time instant at which the assertion has expired.
condition - Condition object
arc - the <AudienceRestrictionCondition> to be added. Can be null, if no audience restriction.
doNotCacheCnd - DoNotCacheCondition object
例外:
SAMLException - if there is a problem in input data and it cannot be processed correctly.

Conditions

public Conditions(Element conditionsElement)
           throws SAMLException
Constructs a Conditions element from an existing XML block.

パラメータ:
conditionsElement - A org.w3c.dom.Element representing DOM tree for Conditions object
例外:
SAMLException - if it could not process the Element properly, implying that there is an error in the sender or in the element definition.
メソッドの詳細

getNotBefore

public Date getNotBefore()
Returns the earliest time at which the assertion is valid held in this Conditions object.

戻り値:
A Date containing the NotBefore time held within this Conditions element.

getNotOnorAfter

public Date getNotOnorAfter()
Returns the time instant held within this Conditions object at which the Assertion has expired.

戻り値:
time instant (at which assertion has expired) held within this Conditions element.

addAudienceRestrictionCondition

public boolean addAudienceRestrictionCondition(AudienceRestrictionCondition arc)
Adds an audience restriction condition within this Conditions Element.

パラメータ:
arc - a AudienceRestrictionCondition to be added to this Conditions.
戻り値:
true if the operation succeeds.

checkDateValidity

public boolean checkDateValidity(long someTime)
Returns true if a specific Date falls within the validity interval of this set of conditions.

パラメータ:
someTime - Any time in milliseconds.
戻り値:
true if someDate is within the valid interval of the Conditions.

getAudienceRestrictionCondition

public Set getAudienceRestrictionCondition()
Returns a set of the AudienceRestrictionCondition elements held within this Conditions element.

戻り値:
A set of the audience restriction conditions. Each element contained within is an object of AudienceRestrictionCondition type.

removeAudienceRestrictionCondition

public boolean removeAudienceRestrictionCondition(String audience)
Removes an audience restriction condition AudienceRestrictionConditionfrom this Conditions object wherein the specified audience has been defined.

パラメータ:
audience - A string representing audience.
戻り値:
true if the operation succeeds.

setDoNotCacheCondition

public void setDoNotCacheCondition(DoNotCacheCondition doNotCacheCnd)
Sets DoNotCacheCondition elements held within this Conditions element.

パラメータ:
doNotCacheCnd - an DoNotCacheCondition object.

getDoNotCacheCondition

public DoNotCacheCondition getDoNotCacheCondition()
Returns DoNotCacheCondition elements held within this Conditions element

戻り値:
an DoNotCacheCondition object if Conditions contains any DoNotCacheCondition, otherwise return null.

toString

public String toString()
Returns a String representation of the element.

オーバーライド:
クラス Object 内の toString
戻り値:
A string containing the valid XML for this element By default name space name is prepended to the element name example <saml:Conditions>.

toString

public String toString(boolean includeNS,
                       boolean declareNS)
Returns a String representation of the <Conditions> element.

パラメータ:
includeNS - Determines whether or not the namespace qualifier is prepended to the Element when converted
declareNS - Determines whether or not the namespace is declared within the Element.
戻り値:
A string containing the valid XML for this element.

createAudienceRestrictionCondition

protected AudienceRestrictionCondition createAudienceRestrictionCondition(Element audienceRestrictionElement)
                                                                   throws SAMLException
例外:
SAMLException

createDoNotCacheCondition

protected DoNotCacheCondition createDoNotCacheCondition(Element doNotCacheConditionElement)
                                                 throws SAMLException
例外:
SAMLException