com.sun.identity.policy.interfaces
インタフェース Referral


public interface Referral

Interface to facilitate delegating policy evaluation There would be many implementations with different policy delegation mechanisms such as delegating to peer organizations only or delegating to sub organizations only.


メソッドの概要
 String getDisplayNameForValue(String value, Locale locale)
          Returns the display name for the value for the given locale.
 PolicyDecision getPolicyDecision(SSOToken token, String resourceType, String resourceName, Set actionNames, Map envParameters)
          Gets policy results
 String getReferralTypeName()
          Gets the name of the Referral Type
 Set getResourceNames(SSOToken token, String serviceTypeName, String resourceName)
          Gets resource names that are exact matches, sub resources or wild card matches of argument resource name.
 ValidValues getValidValues(SSOToken token)
          Gets the valid values for this referral
 ValidValues getValidValues(SSOToken token, String pattern)
          Gets the valid values for this referral matching a pattern
 Set getValues()
          Gets the values of this referral
 Syntax getValueSyntax(SSOToken token)
          Gets the syntax for the value
 void initialize(Map configurationMap)
          Initializes the Referral with a Map
 void setValues(Set values)
          Sets the values of this referral
 

メソッドの詳細

initialize

void initialize(Map configurationMap)
Initializes the Referral with a Map

パラメータ:
configurationMap - a Map containing configuration information. Each key of the Map is a configuration parameter. Each value of the key would be a Set of values for the parameter. The Map is cloned and a reference to the clone is stored in the referral

setValues

void setValues(Set values)
               throws InvalidNameException
Sets the values of this referral

パラメータ:
values - Set of values for this referral. Each element of the Set has to be a String
例外:
InvalidNameException - if any value passed in values is not valid

getValues

Set getValues()
Gets the values of this referral

戻り値:
the values of this referral Each element of the returned Set is a String.

getDisplayNameForValue

String getDisplayNameForValue(String value,
                              Locale locale)
                              throws NameNotFoundException
Returns the display name for the value for the given locale. For all the valid values obtained through the methods getValidValues this method must be called by web and command line interfaces to get the corresponding display name. The 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 (most probably en_US). This method returns only the display name and should not be used for the method setValues. Alternatively, if the plugin does not have to localize the value, it can just return the value as is.

パラメータ:
value - one of the valid value for the plugin
locale - locale for which the display name must be customized
戻り値:
the display name for the value for the given locale.
例外:
NameNotFoundException - if the given value is not one of the valid values for the plugin

getValidValues

ValidValues getValidValues(SSOToken token)
                           throws SSOException,
                                  PolicyException
Gets the valid values for this referral

パラメータ:
token - SSOToken
戻り値:
ValidValues object
例外:
SSOException, - PolicyException
SSOException
PolicyException

getValidValues

ValidValues getValidValues(SSOToken token,
                           String pattern)
                           throws SSOException,
                                  PolicyException
Gets the valid values for this referral matching a pattern

パラメータ:
token - SSOToken
pattern - a pattern to match against the value
戻り値:
ValidValues object
例外:
SSOException, - PolicyException
SSOException
PolicyException

getValueSyntax

Syntax getValueSyntax(SSOToken token)
                      throws SSOException,
                             PolicyException
Gets the syntax for the value

パラメータ:
token - SSOToken
例外:
SSOException
PolicyException
関連項目:
Syntax

getReferralTypeName

String getReferralTypeName()
Gets the name of the Referral Type

戻り値:
name of the Referral Type representing this referral

getPolicyDecision

PolicyDecision getPolicyDecision(SSOToken token,
                                 String resourceType,
                                 String resourceName,
                                 Set actionNames,
                                 Map envParameters)
                                 throws SSOException,
                                        PolicyException
Gets policy results

パラメータ:
token - SSOToken
resourceType - resource Type
resourceName - name of the resource
actionNames - a set of action names
envParameters - a map of enivronment parameters. Each key is an environment parameter name. Each value is a set of values for the parameter.
戻り値:
policy decision
例外:
PolicyException
SSOException

getResourceNames

Set getResourceNames(SSOToken token,
                     String serviceTypeName,
                     String resourceName)
                     throws PolicyException,
                            SSOException
Gets resource names that are exact matches, sub resources or wild card matches of argument resource name. To determine whether to include a resource name of a resource, argument resource name and policy resource name are compared treating wild characters in the policy resource name as wild. If the comparsion resulted in EXACT_MATCH, WILD_CARD_MACTH or SUB_RESOURCE_MACTH, the resource result would be included.

パラメータ:
token - sso token
serviceTypeName - service type name
resourceName - resource name
戻り値:
names of sub resources for the given resourceName. The return value also includes the resourceName.
例外:
PolicyException
SSOException
関連項目:
ResourceMatch.EXACT_MATCH, ResourceMatch.SUB_RESOURCE_MATCH, ResourceMatch.WILDCARD_MATCH