deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.tools.security
Class ActiveDirectoryImporter

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

public class ActiveDirectoryImporter
extends Object

This class provides the functionality to synchronize the User and Group instances stored in a SecurityManager with an ActiveDirectory-Server.

Synchronization involves four steps:

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

Version:
$Revision: 18195 $, $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Markus Schneider, Andreas Poth, last edited by: $Author: mschneider $

Constructor Summary
ActiveDirectoryImporter(Properties config)
          Constructs a new ADExporter -instance.
 
Method Summary
 void abortChanges()
          Aborts the synchronization process and undoes all changes.
(package private)  void checkSubadminRoleValidity()
          Checks subadmin-role validity (each user one role max).
 void commitChanges()
          Ends the synchronization process and commits all changes.
static void main(String[] args)
           
static void sendError(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)  HashMap<String,Group> synchronizeGroups()
          Synchronizes the AD's group objects with the SecurityManager's group objects.
(package private)  void synchronizeUsers(HashMap<String,Group> groups)
          Synchronizes the AD'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

ActiveDirectoryImporter

ActiveDirectoryImporter(Properties config)
                  throws NamingException,
                         GeneralSecurityException
Constructs a new ADExporter -instance.

Parameters:
config -
Throws:
NamingException
GeneralSecurityException
Method Detail

synchronizeGroups

HashMap<String,Group> synchronizeGroups()
                                  throws NamingException,
                                         IOException,
                                         UnauthorizedException,
                                         GeneralSecurityException
Synchronizes the AD's group objects with the SecurityManager's group objects.

Returns:
the mapping of the String to the Groups
Throws:
NamingException
IOException
GeneralSecurityException
UnauthorizedException

synchronizeUsers

void synchronizeUsers(HashMap<String,Group> groups)
                throws NamingException,
                       IOException,
                       UnauthorizedException,
                       GeneralSecurityException
Synchronizes the AD's user objects with the SecurityManager's user objects.

Parameters:
groups -
Throws:
NamingException
IOException
GeneralSecurityException
UnauthorizedException

updateSecAll

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

Throws:
GeneralSecurityException

checkSubadminRoleValidity

void checkSubadminRoleValidity()
                         throws ManagementException,
                                GeneralSecurityException
Checks subadmin-role validity (each user one role max).

Throws:
ManagementException
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(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(String[] args)
                 throws Exception
Parameters:
args -
Throws:
Exception

deegree 2.3 (2010/04/09 10:10 build-4-official)

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