|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The class Condition
defines an interface
to allow pluggable condition. These are used to control
policy decisions based on parameters such as time,
auth level of the user session and IP address from which
the user is making the request.
A condition computes a ConditionDecision based on the state
of condtion object as set by setProperties method call and
the environment passed in a map of key/value pairs.
CondtionDecision encapsulates whether a policy applies for
the request and advice messages generated by the condtion.
The following Condition implementation are provided with the
Policy framework:
AuthLevelCondtion, AuthSchemeCondtion, IPCondition, TimeCondtion
All condition implementations should have a public no argument
constructor.
ConditionDecision
,
com.sun.identity.policy.plugins.AuthLevelCondtion
,
com.sun.identity.policy.plugins.AuthSchemeCondition
,
com.sun.identity.policy.plugins.IPCondition
,
com.sun.identity.policy.plugins.TimeCondition
Method Summary | |
java.lang.Object |
clone()
Overrride clone to make it public |
ConditionDecision |
getConditionDecision(SSOToken token,
java.util.Map env)
Gets the decision computed by this condition object, based on the map of environment paramters |
java.lang.String |
getDisplayName(java.lang.String property,
java.util.Locale locale)
Gets the display name for the property name. |
java.util.Map |
getProperties()
Gets the properties of the condition |
java.util.List |
getPropertyNames()
Returns a list of property names for the condition. |
Syntax |
getPropertySyntax(java.lang.String property)
Returns the syntax for a property name |
java.util.Set |
getValidValues(java.lang.String property)
Returns a set of valid values given the property name. |
void |
setProperties(java.util.Map properties)
Sets the properties of the condition. |
Method Detail |
public java.util.List getPropertyNames()
public Syntax getPropertySyntax(java.lang.String property)
String
- property nameSyntax for the property name- See Also:
Syntax
public java.lang.String getDisplayName(java.lang.String property, java.util.Locale locale) throws PolicyException
locale
variable could be used by the plugin to
customize the display name for the given locale.
The locale
variable could be null
, in which
case the plugin must use the default locale.String
- property nameLocale
- locale for which the property name must be customizedpublic java.util.Set getValidValues(java.lang.String property) throws PolicyException
String
- property namePolicyException
- if unable to get the Syntax.public void setProperties(java.util.Map properties) throws PolicyException
properties
- the properties of the condition
that would influence the CondtionDecision returned by a call
to method getConditionDecision(Map env).
Keys of the properties have to be String.
Value correspodning to each key have to be a Set of String
elements. Each implementation of Condtion could add further
restrictions on the keys and values of this map.ConditionDecision
public java.util.Map getProperties()
setProperties
public ConditionDecision getConditionDecision(SSOToken token, java.util.Map env) throws PolicyException, SSOException
token
- single-sign-on token of the userenv
- request specific environment map of key/value pairs
For example this would contain IP address of remote
client for an IPConditionPolicyException
- if the decision could not be computedSSOException
- if SSO token is not validConditionDecision
public java.lang.Object clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |