org.aselect.agent.authorization.evaluation
Class AuthorizationRuleEvaluator

java.lang.Object
  extended by org.aselect.agent.authorization.evaluation.AuthorizationRuleEvaluator

public class AuthorizationRuleEvaluator
extends java.lang.Object

Evaluator for authorization rules.

Description:
The AuthorizationRuleEvaluator evaluates authorization rules for given user attributes. The input of the AuthorizationEvaluator is an evaluation tree created by the AuthorizationRuleParser and the user attributes of a user.

Concurrency issues:
-

Author:
Alfa & Ariss

Field Summary
static java.lang.String MODULE
          The module name.
 
Constructor Summary
AuthorizationRuleEvaluator(SystemLogger systemLoger)
          Create a new AuthorizationRuleEvaluator.
 
Method Summary
 boolean evaluate(java.util.Hashtable htAttributes, EvaluationTree tEvaluation)
          Evaluate a authorization rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODULE

public static final java.lang.String MODULE
The module name.

See Also:
Constant Field Values
Constructor Detail

AuthorizationRuleEvaluator

public AuthorizationRuleEvaluator(SystemLogger systemLoger)
Create a new AuthorizationRuleEvaluator.

Description:
Create a new instance of the AuthorizationRuleEvaluator with the given logger.

Parameters:
systemLoger - The system logger to be used.
Method Detail

evaluate

public boolean evaluate(java.util.Hashtable htAttributes,
                        EvaluationTree tEvaluation)
                 throws ASelectAuthorizationException
Evaluate a authorization rule.

Description:
this method uses the given evaluation tree and fills in the user attributes if all the expressions in the evaluation tree are valid for the user attributes this method returns true, otherwise false.

Preconditions:
-
Postconditions:
-

Parameters:
htAttributes - The user attributes.
tEvaluation - The evaluation tree to evaluate upon.
Returns:
true if the tree evaluates to true for the given user attributes, otherwise false.
Throws:
ASelectAuthorizationException - If evaluating fails.


Copyright © 2008 SURFnet BV. All Rights Reserved.