public class ConditionsImpl extends Object implements Conditions
Conditions
defines the SAML constructs that place
constraints on the acceptable use if SAML Assertion
s.Modifier and Type | Field and Description |
---|---|
static String |
AUDIENCE_RESTRICTION_ELEMENT |
static String |
CONDITION_ELEMENT |
static String |
CONDITIONS_ELEMENT |
static String |
NOT_BEFORE_ATTR |
static String |
NOT_ON_OR_AFTER_ATTR |
static String |
ONETIMEUSE_ELEMENT |
static String |
PROXY_RESTRICTION_ELEMENT |
Constructor and Description |
---|
ConditionsImpl()
Default constructor
|
ConditionsImpl(Element element)
This constructor is used to build
Conditions object from a
block of existing XML that has already been built into a DOM. |
ConditionsImpl(String xml)
This constructor is used to build
Conditions object
from a XML string. |
Modifier and Type | Method and Description |
---|---|
boolean |
checkDateValidity(long someTime)
Return true if a specific Date falls within the validity
interval of this set of conditions.
|
boolean |
checkDateValidity(long someTime,
int skewSeconds)
Return true if a specific Date falls within the validity
interval of this set of conditions.
|
List |
getAudienceRestrictions()
Returns a list of
AudienceRestriction |
List |
getConditions()
Returns a list of
Condition |
Date |
getNotBefore()
Returns the time instant before which the subject cannot be confirmed.
|
Date |
getNotOnOrAfter()
Returns the time instant at which the subject can no longer
be confirmed.
|
List |
getOneTimeUses()
Returns a list of
OneTimeUse |
List |
getProxyRestrictions()
Returns a list of
ProxyRestriction |
boolean |
isMutable()
Returns true if the object is mutable
|
void |
makeImmutable()
Makes the object immutable
|
void |
setAudienceRestrictions(List ars)
Sets a list of
AudienceRestriction |
void |
setConditions(List conditions)
Sets a list of
Condition |
void |
setNotBefore(Date value)
Sets the time instant before which the subject cannot
be confirmed.
|
void |
setNotOnOrAfter(Date value)
Sets the time instant at which the subject can no longer
be confirmed.
|
void |
setOneTimeUses(List oneTimeUses)
Sets a list of
OneTimeUse |
void |
setProxyRestrictions(List prs)
Sets a list of
ProxyRestriction |
String |
toXMLString()
Returns a String representation
|
String |
toXMLString(boolean includeNSPrefix,
boolean declareNS)
Returns a String representation
|
public static final String CONDITIONS_ELEMENT
public static final String CONDITION_ELEMENT
public static final String ONETIMEUSE_ELEMENT
public static final String AUDIENCE_RESTRICTION_ELEMENT
public static final String PROXY_RESTRICTION_ELEMENT
public static final String NOT_BEFORE_ATTR
public static final String NOT_ON_OR_AFTER_ATTR
public ConditionsImpl()
public ConditionsImpl(String xml) throws SAML2Exception
Conditions
object
from a XML string.xml
- A java.lang.String
representing
a Conditions
objectSAML2Exception
- if it could not process the XML stringpublic ConditionsImpl(Element element) throws SAML2Exception
Conditions
object from a
block of existing XML that has already been built into a DOM.element
- A org.w3c.dom.Element
representing
DOM tree for Conditions
objectSAML2Exception
- if it could not process the Elementpublic Date getNotOnOrAfter()
getNotOnOrAfter
in interface Conditions
public void setNotOnOrAfter(Date value) throws SAML2Exception
setNotOnOrAfter
in interface Conditions
value
- the time instant at which the subject can no longer
be confirmed.SAML2Exception
- if the object is immutablepublic List getConditions()
Condition
getConditions
in interface Conditions
Condition
public List getAudienceRestrictions()
AudienceRestriction
getAudienceRestrictions
in interface Conditions
AudienceRestriction
public List getOneTimeUses()
OneTimeUse
getOneTimeUses
in interface Conditions
OneTimeUse
public List getProxyRestrictions()
ProxyRestriction
getProxyRestrictions
in interface Conditions
ProxyRestriction
public void setConditions(List conditions) throws SAML2Exception
Condition
setConditions
in interface Conditions
conditions
- a list of Condition
SAML2Exception
- if the object is immutablepublic void setAudienceRestrictions(List ars) throws SAML2Exception
AudienceRestriction
setAudienceRestrictions
in interface Conditions
ars
- a list of AudienceRestriction
SAML2Exception
- if the object is immutablepublic void setOneTimeUses(List oneTimeUses) throws SAML2Exception
OneTimeUse
setOneTimeUses
in interface Conditions
oneTimeUses
- a list of OneTimeUse
SAML2Exception
- if the object is immutablepublic void setProxyRestrictions(List prs) throws SAML2Exception
ProxyRestriction
setProxyRestrictions
in interface Conditions
prs
- a list of ProxyRestriction
SAML2Exception
- if the object is immutablepublic Date getNotBefore()
getNotBefore
in interface Conditions
public void setNotBefore(Date value) throws SAML2Exception
setNotBefore
in interface Conditions
value
- the time instant before which the subject cannot
be confirmed.SAML2Exception
- if the object is immutablepublic boolean checkDateValidity(long someTime, int skewSeconds)
checkDateValidity
in interface Conditions
someTime
- Any time in milliseconds.skewSeconds
- Clock skew in seconds.someTime
is within the valid
interval of the Conditions
.public boolean checkDateValidity(long someTime)
checkDateValidity
in interface Conditions
someTime
- Any time in milliseconds.someTime
is within the valid
interval of the Conditions
.public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
toXMLString
in interface Conditions
includeNSPrefix
- Determines whether or not the namespace
qualifier is prepended to the Element when converteddeclareNS
- Determines whether or not the namespace is
declared within the Element.SAML2Exception
- if something is wrong during conversionpublic String toXMLString() throws SAML2Exception
toXMLString
in interface Conditions
SAML2Exception
- if something is wrong during conversionpublic void makeImmutable()
makeImmutable
in interface Conditions
public boolean isMutable()
isMutable
in interface Conditions
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.