org.aselect.agent.authorization.parsing
Class AuthorizationRuleParser

java.lang.Object
  extended by org.aselect.agent.authorization.parsing.AuthorizationRuleParser

public class AuthorizationRuleParser
extends java.lang.Object

Parser for evaluation rules.

Description:
This LL(1) Parser uses a AuthorizationRuleScanner to parse authorization rules.

Concurrency issues:
Use one AuthorizationRuleParser per authorization rule.

Author:
Alfa & Ariss

Field Summary
static java.lang.String MODULE
          The module name.
 
Constructor Summary
AuthorizationRuleParser(AuthorizationRuleScanner oScanner, SystemLogger systemLoger)
          Create a new AuthorizationRuleParser.
 
Method Summary
 EvaluationTree getEvaluationTree()
          Retrieve the authorization tree.
 void parse()
          Parse a Evaluation 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

AuthorizationRuleParser

public AuthorizationRuleParser(AuthorizationRuleScanner oScanner,
                               SystemLogger systemLoger)
Create a new AuthorizationRuleParser.

Description:
Create a new AuthorizationRuleParser with the given SystemLogger and using the given AuthorizationRuleScanner.

Concurrency issues:
Use one AuthorizationRuleParser per authorization rule.

Preconditions:
-

Postconditions:
Then scanner and system logger are set.

Parameters:
oScanner - The scanner which scans the authorization rule.
systemLoger - The logger for system entries.
Method Detail

parse

public void parse()
           throws ASelectAuthorizationException
Parse a Evaluation Rule.

Description:
This method parses the evaluation rule recursively using the followoing methods:
Concurrency issues:
-

Preconditions:
-

Postconditions:
The evaluation tree is parsed and the getEvaluationTree() method returns the parsed evaluation rule.

Throws:
ASelectAuthorizationException - If parsing fails.

getEvaluationTree

public EvaluationTree getEvaluationTree()
Retrieve the authorization tree.

Description:
Retrieve the constructed evaluation tree.

Concurrency issues:
-

Preconditions:
The evaluation tree should be parsed by calling the parse() method.

Postconditions:
-

Returns:
The evaluation tree containing the complete authorization rule.


Copyright © 2008 SURFnet BV. All Rights Reserved.