Interface ResponseProvider
-
- All Superinterfaces:
Cloneable
@SupportedAll @Deprecated public interface ResponseProvider extends Cloneable
Deprecated.The classResponseProvider
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 fromActionDecision
. 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 theResponseProvider
.The response provider is initialized by calling its
initialize()
method. Its also configured by setting its properites by a call tosetProperties()
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 aMap
of response attributes and their values based on theSSOToken
, resource name and environmentMap
passed in the method callgetResponseDecision()
. Policy framework would make a callgetResponseDecision
from theResponseProvider
(s) associated with a policy only if the policy is applicable to a request as determined bySSOToken
,resource name
,Subjects
andConditions
.The only out-of-the-box
ResponseProvider
implementation provided with the Policy framework would beIDRepoResponseProvider
. AllResponseProvider
implementations should have a public no argument constructor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method 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 nameMap
getResponseDecision(SSOToken token, Map env)
Deprecated.Gets the response attributes computed by this ResponseProvider object, based on theSSOToken
andMap
of environment parameters.Set
getValidValues(String property)
Deprecated.Returns a set of valid values given the property name.void
initialize(Map configParams)
Deprecated.Initialize theResponseProvider
void
setProperties(Map properties)
Deprecated.Sets the properties of the responseProvider plugin.
-
-
-
Method Detail
-
initialize
void initialize(Map configParams) throws PolicyException
Deprecated.Initialize theResponseProvider
- Parameters:
configParams
-Map
of the configurational information- Throws:
PolicyException
- if an error occured during initialization of the instance
-
getPropertyNames
List getPropertyNames()
Deprecated.Returns a list of property names for the Response provider.- Returns:
- list of property names
-
getPropertySyntax
Syntax getPropertySyntax(String property)
Deprecated.Returns the syntax for a property name- Parameters:
property
- property name- Returns:
Syntax
for the property name- See Also:
Syntax
-
getDisplayName
String getDisplayName(String property, Locale locale) throws PolicyException
Deprecated.Gets the display name for the property name. Thelocale
variable could be used by the plugin to customize the display name for the given locale. Thelocale
variable could benull
, in which case the plugin must use the default locale.- Parameters:
property
- property namelocale
- locale for which the property name must be customized- Returns:
- display name for the property name.
- Throws:
PolicyException
- If the display name could not be retrieved.
-
getValidValues
Set getValidValues(String property) throws PolicyException
Deprecated.Returns a set of valid values given the property name. This method is called if the propertySyntax
is either theSINGLE_CHOICE
orMULTIPLE_CHOICE
.- Parameters:
property
-String
representing property name- Returns:
- Set of valid values for the property.
- Throws:
PolicyException
- if unable to get theSyntax
.
-
setProperties
void setProperties(Map properties) throws PolicyException
Deprecated.Sets the properties of the responseProvider plugin. This influences the response attribute-value Map that would be computed by a call to methodgetResponseDecision(Map)
These attribute-value pairs are encapsulated inResponseAttribute
element tag which is a child of thePolicyDecision
element in the PolicyResponse xml if the policy is applicable to the user for the resource, subject and conditions defined.- Parameters:
properties
- the properties of theResponseProvider
Keys of the properties have to be String. Value corresponding to each key have to be aSet
of String elements. Each implementation of ResponseProvider could add further restrictions on the keys and values of this map.- Throws:
PolicyException
- for any abnormal condition
-
getProperties
Map getProperties()
Deprecated.Gets the properties of the response provider.- Returns:
- properties of the response provider.
- See Also:
setProperties(java.util.Map)
-
getResponseDecision
Map getResponseDecision(SSOToken token, Map env) throws PolicyException, SSOException
Deprecated.Gets the response attributes computed by this ResponseProvider object, based on theSSOToken
andMap
of environment parameters.- Parameters:
token
- single-sign-on token of the userenv
- request specific environment map of key/value pairs- Returns:
- a
Map
of response attributes. Keys of the Map are attribute names of typestatic
anddynamic
. Value is aSet
of response attribute values (String
). - Throws:
PolicyException
- if the decision could not be computedSSOException
- If the token is not valid.
-
clone
Object clone()
Deprecated.Returns a copy of this object.- Returns:
- an
Object
which is a copy of this object
-
-