ResourceAttribute
@Deprecated public interface ResponseProvider extends Cloneable
ResponseProvider
defines an interface to allow
pluggable response providers into the OpenAM framework. These
are used to provide policy response attributes. Policy response attributes
are different from ActionDecision
. Policy response attributes
typically provide attribute values of user profile. User profile could
exist in any data store managed by Identity repository. However, reponse
attributes are not restricted to attributes from user profile.
Source of the attribute values is completely at the discretion of the
specific implementation of the ResponseProvider
.
The response provider is initialized by calling its initialize()
method.
Its also configured by setting its properites by a call to
setProperties()
method.
Response attribute names are not checked against schema of the service
registered with OpenAM. (ActionDecision
attributes
are checked against the schema of the service registered with
OpenAM).
A Response Provider computes a Map
of response attributes
and their values based on the SSOToken
, resource name and
environment Map
passed in the method call
getResponseDecision()
.
Policy framework would make a call getResponseDecision
from the
ResponseProvider
(s) associated with a policy only if the
policy is applicable to a request as determined by SSOToken
,
resource name
, Subjects
and
Conditions
.
The only out-of-the-box ResponseProvider
implementation
provided with the Policy framework would be
IDRepoResponseProvider
.
All ResponseProvider
implementations should have a public no
argument constructor.
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
Returns a copy of this object.
|
String |
getDisplayName(String property,
Locale locale)
Deprecated.
Gets the display name for the property name.
|
Map |
getProperties()
Deprecated.
Gets the properties of the response provider.
|
List |
getPropertyNames()
Deprecated.
Returns a list of property names for the Response provider.
|
Syntax |
getPropertySyntax(String property)
Deprecated.
Returns the syntax for a property name
|
Map |
getResponseDecision(SSOToken token,
Map env)
Deprecated.
Gets the response attributes computed by this ResponseProvider object,
based on the
SSOToken and Map of
environment parameters. |
Set |
getValidValues(String property)
Deprecated.
Returns a set of valid values given the property name.
|
void |
initialize(Map configParams)
Deprecated.
Initialize the
ResponseProvider |
void |
setProperties(Map properties)
Deprecated.
Sets the properties of the responseProvider plugin.
|
void initialize(Map configParams) throws PolicyException
ResponseProvider
configParams
- Map
of the configurational informationPolicyException
- if an error occured during
initialization of the instanceList getPropertyNames()
Syntax getPropertySyntax(String property)
property
- property nameSyntax
for the property nameSyntax
String getDisplayName(String property, 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.property
- property namelocale
- locale for which the property name must be customizedPolicyException
- If the display name could not be retrieved.Set getValidValues(String property) throws PolicyException
Syntax
is either the
SINGLE_CHOICE
or MULTIPLE_CHOICE
.property
- String
representing property namePolicyException
- if unable to get the Syntax
.void setProperties(Map properties) throws PolicyException
getResponseDecision(Map)
These attribute-value pairs are encapsulated in
ResponseAttribute
element tag which is a child of the
PolicyDecision
element in the PolicyResponse xml
if the policy is applicable to the user for the resource, subject and
conditions defined.properties
- the properties of the ResponseProvider
Keys of the properties have to be String.
Value corresponding to each key have to be a Set
of String elements. Each implementation of ResponseProvider
could add further restrictions on the keys and values of this
map.PolicyException
- for any abnormal conditionMap getProperties()
ResponseProvider.setProperties(java.util.Map)
Map getResponseDecision(SSOToken token, Map env) throws PolicyException, SSOException
SSOToken
and Map
of
environment parameters.token
- single-sign-on token of the userenv
- request specific environment map of key/value pairsMap
of response attributes.
Keys of the Map are attribute names of type static
and dynamic
.
Value is a Set
of response attribute values
(String
).PolicyException
- if the decision could not be computedSSOException
- If the token is not valid.Object clone()
Object
which is a copy of this objectCopyright © 2010-2018, ForgeRock All Rights Reserved.