com.sun.identity.policy.client
クラス PolicyEvaluator

java.lang.Object
  上位を拡張 com.sun.identity.policy.client.PolicyEvaluator

public class PolicyEvaluator
extends Object

This class provides methods to get policy decisions for clients of policy service. This class uses XML/HTTP protocol to communicate with the Policy Service. Policy client API implementaion caches policy decision locally. The cache is updated through policy change notifications and/or polling.


コンストラクタの概要
PolicyEvaluator(String serviceName)
          Creates an instance of client policy evaluator
 
メソッドの概要
 PolicyDecision getPolicyDecision(SSOToken token, String resourceName, Set actionNames, Map envParameters)
          Evaluates privileges of the user to perform the specified actions on the specified resource.
 boolean isAllowed(SSOToken token, String resourceName, String actionName, Map envParameters)
          Evaluates simple privileges of boolean type.
 

コンストラクタの詳細

PolicyEvaluator

public PolicyEvaluator(String serviceName)
                throws PolicyException,
                       SSOException
Creates an instance of client policy evaluator

パラメータ:
serviceName - name of the service for which to create policy evaluator
例外:
PolicyException - if required properties cannot be retrieved.
SSOException - if application single sign on token is invalid.
メソッドの詳細

isAllowed

public boolean isAllowed(SSOToken token,
                         String resourceName,
                         String actionName,
                         Map envParameters)
                  throws PolicyException,
                         SSOException
Evaluates simple privileges of boolean type. The privilege indicates if the user can perform specified action on the specified resource. The evaluation also depends on user's application environment parameters.

パラメータ:
token - single sign on token of the user evaluating policies.
resourceName - name of the resource the user is trying to access
actionName - name of the action the user is trying to perform on the resource
envParameters - run time environment parameters
戻り値:
the result of the evaluation as a boolean value
例外:
PolicyException - if result could not be computed for reason other than single sign on token problem.
SSOException - if single sign on token is not valid

getPolicyDecision

public PolicyDecision getPolicyDecision(SSOToken token,
                                        String resourceName,
                                        Set actionNames,
                                        Map envParameters)
                                 throws PolicyException,
                                        SSOException
Evaluates privileges of the user to perform the specified actions on the specified resource. The evaluation also depends on user's run time environment parameters.

パラメータ:
token - single sign on token of the user evaluating policies.
resourceName - name of the resource the user is trying to access
actionNames - Set of action names the user is trying to perform on the resource.
envParameters - run-time environment parameters
戻り値:
policy decision
例外:
PolicyException - if result could not be computed for any reason other than single sign on token problem.
SSOException - if single sign on token is invalid or expired.