iiitAccessServer 1.0

de.iiit.access.server.plugins.parser
Class LdapResolver

java.lang.Object
  |
  +--de.iiit.access.server.plugins.parser.LdapResolver
All Implemented Interfaces:
AccessServerPluginIf, ResolverPluginIf, ThreadPluginIf

public class LdapResolver
extends Object
implements ResolverPluginIf

Implementation of resolver which uses a LDAP database as its data source.


Constructor Summary
LdapResolver()
          Creates a new instance of LdapResolver
 
Method Summary
 void initialize(Configuration config)
          Initialize the current object.
 Set resolve(ParserStackIf argStack)
          Resolves the expression on top of the stack.
 Set resolve(ParserStackIf argStack, String name)
          The evaluation is optimized in such way that it only retrieves information regarding the given user name.
 void shutdown()
          This method is called by the AccessServer when the background threads should stop because of a shutdown of the AccessServer itself.
 void start()
          This method is called by the AccessServer when the background thread should start.
 boolean verifyUser(String uid)
          Verifies whether a user exists in the user database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapResolver

public LdapResolver()
Creates a new instance of LdapResolver

Method Detail

initialize

public void initialize(Configuration config)
Initialize the current object. The plug-in configuration - which may be null - will be searched for an entity named LdapConfig. If none is found, the AccessServer itself will be asked for such an configuration entity. If none is found System.exit(1) will be called. The configuration is used to initialize a instance of LdapUtil. The configuration requirements are described there.

Specified by:
initialize in interface AccessServerPluginIf
Parameters:
config - The plug-in configuration

shutdown

public void shutdown()
This method is called by the AccessServer when the background threads should stop because of a shutdown of the AccessServer itself.

Specified by:
shutdown in interface ThreadPluginIf

start

public void start()
This method is called by the AccessServer when the background thread should start. It is called after the method initialize() is called for all plug-ins.

Specified by:
start in interface ThreadPluginIf

resolve

public Set resolve(ParserStackIf argStack)
            throws ParserException
Resolves the expression on top of the stack. If the result is also an expression the parser has to be called to evaluate it.

Specified by:
resolve in interface ResolverPluginIf
Parameters:
argStack - This stack includes all expressions and subexpressions of the current tree inside the orginal expression.
Returns:
The set of users described by the expression.
Throws:
ParserException - if there is something wrong with the expression. The most common cases are syntax errors or circular references within the expression.

resolve

public Set resolve(ParserStackIf argStack,
                   String name)
            throws ParserException
The evaluation is optimized in such way that it only retrieves information regarding the given user name.

Specified by:
resolve in interface ResolverPluginIf
Parameters:
argStack - This stack includes all expressions and subexpressions of the current tree inside the orginal expression.
name - The name of the user for whom the expression should be resolved.
Returns:
An optimized set of users. It is guaranteed that it is correct for the given user but it is not guaranteed that it includes all users described by the expression.
Throws:
ParserException - if there is something wrong with the expression. The most common cases are syntax errors or circular references within the expression.

verifyUser

public boolean verifyUser(String uid)
Verifies whether a user exists in the user database.

Specified by:
verifyUser in interface ResolverPluginIf
Parameters:
uid - the user ID.
Returns:
true if the user exists or if there is no user database, false if the user doesn't exist.

iiitAccessServer 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement