deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.tools.security
Class LDAPImporter

java.lang.Object
  extended by org.deegree.tools.security.LDAPImporter

public class LDAPImporter
extends java.lang.Object

This class provides the functionality to synchronize the User instances stored in a SecurityManager with a generic LDAP-Server (such as OpenLDAP).

Changes are committed after all steps succeeded. If an error occurs, changes in the SecurityManager are undone.

Version:
$Revision: 10660 $, $Date: 2008-03-24 21:39:54 +0000 (Mo, 24 Mrz 2008) $
Author:
Markus Schneider, Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
LDAPImporter(java.util.Properties config)
          Constructs a new ADExporter -instance.
 
Method Summary
 void abortChanges()
          Aborts the synchronization process and undoes all changes.
 void commitChanges()
          Ends the synchronization process and commits all changes.
static void main(java.lang.String[] args)
           
static void sendError(java.lang.Exception e)
          Sends an eMail to inform the admin that something went wrong.
 void sendLog()
          Sends an eMail with a log of the transaction.
(package private)  void synchronizeUsers()
          Synchronizes the LDAP's user objects with the SecurityManager's user objects.
(package private)  void updateSecAll()
          Updates the special group "SEC_ALL" (contains all users).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPImporter

LDAPImporter(java.util.Properties config)
       throws javax.naming.NamingException,
              GeneralSecurityException
Constructs a new ADExporter -instance.

Parameters:
config -
Throws:
javax.naming.NamingException
GeneralSecurityException
Method Detail

synchronizeUsers

void synchronizeUsers()
                throws javax.naming.NamingException,
                       java.io.IOException,
                       UnauthorizedException,
                       GeneralSecurityException
Synchronizes the LDAP's user objects with the SecurityManager's user objects.

Throws:
javax.naming.NamingException
java.io.IOException
GeneralSecurityException
UnauthorizedException

updateSecAll

void updateSecAll()
            throws GeneralSecurityException
Updates the special group "SEC_ALL" (contains all users).

Throws:
GeneralSecurityException

abortChanges

public void abortChanges()
Aborts the synchronization process and undoes all changes.


commitChanges

public void commitChanges()
Ends the synchronization process and commits all changes.


sendError

public static void sendError(java.lang.Exception e)
Sends an eMail to inform the admin that something went wrong.

NOTE: This is static, because it must be usable even when the construction of the ADExporter failed.

Parameters:
e -

sendLog

public void sendLog()
Sends an eMail with a log of the transaction.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parameters:
args -
Throws:
java.lang.Exception

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org