From 65293eb331bcfa7bb6c6187e15220c7d217eea97 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 06 Jan 2014 17:48:52 +0000
Subject: [PATCH] OPENDJ-1235: Migrate configuration framework

---
 opendj-admin/src/main/java/org/opends/server/config/spi/ConfigurationRepository.java                    |    6 -
 opendj-admin/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java                   |    6 +
 opendj-admin/src/main/java/org/opends/server/admin/condition/ANDCondition.java                          |    3 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java           |    1 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java                  |    2 
 opendj-admin/src/main/java/org/opends/server/admin/condition/NOTCondition.java                          |    3 
 opendj-admin/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java                 |    9 +-
 opendj-admin/src/main/java/org/opends/server/config/spi/ConfigAddListener.java                          |    4 
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java              |   11 +-
 opendj-admin/src/test/java/org/opends/server/admin/AdminTestCase.java                                   |    3 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java    |    1 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java        |    1 
 opendj-admin/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java                     |    1 
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java                 |    5 
 opendj-admin/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java                   |    5 
 opendj-admin/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java                       |    3 
 opendj-admin/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java                      |    7 -
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java              |    1 
 opendj-admin/src/main/java/org/opends/server/config/spi/package-info.java                               |    2 
 opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java                     |    2 
 opendj-admin/src/test/java/org/opends/server/admin/TestParentCfgDefn.java                               |    2 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObject.java                      |   10 +-
 opendj-admin/src/main/java/org/opends/server/admin/condition/Conditions.java                            |    2 
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeResult.java                       |    2 
 opendj-admin/src/main/java/org/opends/server/config/spi/ConfigDeleteListener.java                       |    4 
 opendj-admin/src/main/java/org/opends/server/admin/condition/Condition.java                             |    2 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java        |    1 
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java                   |    2 
 opendj-admin/src/main/java/org/opends/server/admin/client/spi/Driver.java                               |    4 
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java              |    1 
 opendj-admin/src/main/java/org/opends/server/types/AddressMask.java                                     |    2 
 opendj-admin/src/test/java/org/opends/server/admin/server/ConstraintTest.java                           |   11 +-
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java                 |    1 
 opendj-admin/src/test/java/org/opends/server/admin/TestParentCfg.java                                   |    2 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagementContext.java                  |    4 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java |    1 
 opendj-admin/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java                           |    2 
 opendj-admin/src/test/java/org/opends/server/admin/server/ListenerTest.java                             |   10 +-
 opendj-admin/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java                 |    2 
 opendj-admin/src/main/java/org/opends/server/admin/GenericConstraint.java                               |    2 
 opendj-admin/src/main/java/org/opends/server/config/spi/ConfigChangeListener.java                       |    4 
 opendj-admin/src/main/java/org/opends/server/config/spi/ConfigException.java                            |    2 
 /dev/null                                                                                               |   58 --------------
 opendj-admin/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java              |    5 
 opendj-admin/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java                    |    3 
 opendj-admin/src/main/java/org/opends/server/admin/condition/ORCondition.java                           |    3 
 opendj-admin/src/test/java/org/opends/server/admin/server/MockConstraint.java                           |    4 
 opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java |    1 
 opendj-admin/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java                 |    1 
 opendj-admin/src/test/java/org/opends/server/admin/server/AggregationServerTest.java                    |    9 +-
 50 files changed, 78 insertions(+), 155 deletions(-)

diff --git a/opendj-admin/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java b/opendj-admin/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java
index b83da60..8217c3f 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/AbstractManagedObjectDefinition.java
@@ -739,7 +739,6 @@
      *             definition was abstract.
      * @see DefinitionResolver
      */
-    @SuppressWarnings("unchecked")
     public final ManagedObjectDefinition<? extends C, ? extends S> resolveManagedObjectDefinition(DefinitionResolver r)
             throws DefinitionDecodingException {
         AbstractManagedObjectDefinition<? extends C, ? extends S> rd;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java b/opendj-admin/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java
index bab2d5d..4a6052e 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java
@@ -27,6 +27,7 @@
 
 import static com.forgerock.opendj.ldap.AdminMessages.*;
 import static com.forgerock.opendj.util.StaticUtils.*;
+
 import org.forgerock.util.Reject;
 
 import java.util.Collection;
@@ -47,13 +48,13 @@
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.condition.Condition;
 import org.opends.server.admin.condition.Conditions;
+import org.opends.server.admin.server.ConfigChangeResult;
 import org.opends.server.admin.server.ConfigurationDeleteListener;
 import org.opends.server.admin.server.ServerConstraintHandler;
 import org.opends.server.admin.server.ServerManagedObject;
 import org.opends.server.admin.server.ServerManagedObjectChangeListener;
 import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.config.ConfigException;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.forgerock.i18n.LocalizableMessage;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/GenericConstraint.java b/opendj-admin/src/main/java/org/opends/server/admin/GenericConstraint.java
index ba5f2c0..8a50908 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/GenericConstraint.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/GenericConstraint.java
@@ -37,7 +37,7 @@
 import org.opends.server.admin.condition.Condition;
 import org.opends.server.admin.server.ServerConstraintHandler;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * A generic constraint which comprises of an underlying condition and a
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java b/opendj-admin/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java
index 03f7c03..d1b2cf3 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java
@@ -30,7 +30,7 @@
 
 import java.util.EnumSet;
 
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 import org.opends.server.types.AddressMask;
 
 /**
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java b/opendj-admin/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java
index d58533d..9f8af69 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/client/ldap/LDAPManagedObject.java
@@ -160,9 +160,11 @@
             // be required anyway).
             DN dn;
             if (r instanceof InstantiableRelationDefinition) {
-                dn = LDAPNameBuilder.create(parent, (InstantiableRelationDefinition) r, driver.getLDAPProfile());
+                dn = LDAPNameBuilder.create(parent, (InstantiableRelationDefinition<?, ?>) r,
+                        driver.getLDAPProfile());
             } else {
-                dn = LDAPNameBuilder.create(parent, (SetRelationDefinition) r, driver.getLDAPProfile());
+                dn = LDAPNameBuilder.create(parent, (SetRelationDefinition<?, ?>) r,
+                        driver.getLDAPProfile());
             }
 
             if (!driver.entryExists(dn)) {
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/client/spi/Driver.java b/opendj-admin/src/main/java/org/opends/server/admin/client/spi/Driver.java
index 40a4574..fcf09e3 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/client/spi/Driver.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/client/spi/Driver.java
@@ -189,8 +189,8 @@
 
         // Get an inherited property value.
         @SuppressWarnings("unchecked")
-        private Collection<T> getInheritedProperty(ManagedObjectPath target, AbstractManagedObjectDefinition<?, ?> d,
-            String propertyName) {
+        private Collection<T> getInheritedProperty(ManagedObjectPath<?, ?> target,
+                AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
             // First check that the requested type of managed object
             // corresponds to the path.
             AbstractManagedObjectDefinition<?, ?> supr = target.getManagedObjectDefinition();
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/ANDCondition.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/ANDCondition.java
index e985d42..42559f1 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/ANDCondition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/ANDCondition.java
@@ -33,8 +33,7 @@
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
-
+import org.opends.server.config.spi.ConfigException;
 import org.forgerock.util.Reject;
 
 /**
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/Condition.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/Condition.java
index 96b09c2..0f24d28 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/Condition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/Condition.java
@@ -30,7 +30,7 @@
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * An interface for evaluating conditions.
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/Conditions.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/Conditions.java
index 3e228b1..811d390 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/Conditions.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/Conditions.java
@@ -30,7 +30,7 @@
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * This class consists exclusively of static methods that operate on or return
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
index d5d0b18..a546de7 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
@@ -35,7 +35,7 @@
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * A condition which evaluates to <code>true</code> if and only if a property
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java
index dfec5f8..d2a7156 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java
@@ -33,8 +33,7 @@
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
-
+import org.opends.server.config.spi.ConfigException;
 import org.forgerock.util.Reject;
 
 /**
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/NOTCondition.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/NOTCondition.java
index 1e2664d..e89ff90 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/NOTCondition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/NOTCondition.java
@@ -30,8 +30,7 @@
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
-
+import org.opends.server.config.spi.ConfigException;
 import org.forgerock.util.Reject;
 
 /**
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/ORCondition.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/ORCondition.java
index 7693413..7c6cd3f 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/ORCondition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/ORCondition.java
@@ -33,8 +33,7 @@
 import org.opends.server.admin.client.ManagedObject;
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
-
+import org.opends.server.config.spi.ConfigException;
 import org.forgerock.util.Reject;
 
 /**
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/doc/ConfigGuideGeneration.java b/opendj-admin/src/main/java/org/opends/server/admin/doc/ConfigGuideGeneration.java
deleted file mode 100644
index 14f368b..0000000
--- a/opendj-admin/src/main/java/org/opends/server/admin/doc/ConfigGuideGeneration.java
+++ /dev/null
@@ -1,1453 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2007-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2011-2013 ForgeRock AS
- */
-package org.opends.server.admin.doc;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.admin.meta.RootCfgDefn;
-import org.opends.server.admin.ACIPropertyDefinition;
-import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.AbstractManagedObjectDefinition;
-import org.opends.server.admin.AdministratorAction.Type;
-import org.opends.server.admin.AggregationPropertyDefinition;
-import org.opends.server.admin.AliasDefaultBehaviorProvider;
-import org.opends.server.admin.AttributeTypePropertyDefinition;
-import org.opends.server.admin.BooleanPropertyDefinition;
-import org.opends.server.admin.ClassLoaderProvider;
-import org.opends.server.admin.ClassPropertyDefinition;
-import org.opends.server.admin.DNPropertyDefinition;
-import org.opends.server.admin.DefaultBehaviorProvider;
-import org.opends.server.admin.DefinedDefaultBehaviorProvider;
-import org.opends.server.admin.DurationPropertyDefinition;
-import org.opends.server.admin.EnumPropertyDefinition;
-import org.opends.server.admin.IPAddressMaskPropertyDefinition;
-import org.opends.server.admin.IPAddressPropertyDefinition;
-import org.opends.server.admin.IntegerPropertyDefinition;
-import org.opends.server.admin.LDAPProfile;
-import org.opends.server.admin.ManagedObjectOption;
-import org.opends.server.admin.PropertyDefinition;
-import org.opends.server.admin.PropertyDefinitionVisitor;
-import org.opends.server.admin.PropertyOption;
-import org.opends.server.admin.RelationDefinition;
-import org.opends.server.admin.RelationOption;
-import org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider;
-import org.opends.server.admin.SizePropertyDefinition;
-import org.opends.server.admin.StringPropertyDefinition;
-import org.opends.server.admin.Tag;
-import org.opends.server.admin.TopCfgDefn;
-import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
-import org.opends.server.types.InitializationException;
-import org.opends.server.util.DynamicConstants;
-import org.opends.server.util.EmbeddedUtils;
-
-/**
- * This class allow Configuration Guide documentation generation (html format).
- * It is based on the Admin Framework Introspection API
- */
-@SuppressWarnings({ "unchecked", "rawtypes" })
-public final class ConfigGuideGeneration {
-
-    // Note : still to be done :
-    // I18n support. Today all the strings are hardcoded in this file
-
-    private final static String ACI_SYNTAX_REL_URL = "/doc/admin-guide/#about-acis";
-    private final static String DURATION_SYNTAX_REL_URL = "duration-syntax.html";
-    private static final String CSS_FILE = "opendj-config.css";
-
-    private static final String MAIN_FILE = "index.html";
-    private static final String INHERITANCE_TREE_FILE = "ManagedObjectInheritanceTree.html";
-    private static final String RELATION_TREE_FILE = "ManagedObjectRelationTree.html";
-    private static final String MO_LIST_FILE = "ManagedObjectList.html";
-    private static final String PROPERTIES_INDEX_FILE = "PropertiesIndex.html";
-    private static final String WELCOME_FILE = "welcome.html";
-    private static final String MAINTOP_FILE = "maintop.html";
-    private static final String INDEX_FILE = "index.html";
-    private static final String FAVICON = "http://forgerock.org/favicon.ico";
-
-    private static final String CONFIG_GUIDE_DIR = "opendj_config_guide";
-    private static final String MAIN_FRAME = "mainFrame";
-
-    private ConfigGuideGeneration() {
-        // no implementation required.
-    }
-
-    /**
-     * Entry point for documentation generation. Properties: GenerationDir - The
-     * directory where the doc is generated (default is
-     * /var/tmp/[CONFIG_GUIDE_DIR>]) LdapMapping - Presence means that the LDAP
-     * mapping section is to be generated (default is no) OpenDJWiki - The URL
-     * of the OpenDJ Wiki (default is
-     * "http://wikis.forgerock.org/confluence/display/OPENDJ") OpenDJHome - The
-     * URL of the OpenDJ project Home page (default is
-     * "http://opendj.forgerock.org")
-     *
-     * @param args
-     *            none.
-     */
-    public static void main(String[] args) {
-        Properties properties = System.getProperties();
-        generationDir = properties.getProperty("GenerationDir");
-        if (generationDir == null) {
-            // Default dir is prefixed by the system-dependent default temporary
-            // dir
-            generationDir = System.getProperty("java.io.tmpdir") + File.separator + CONFIG_GUIDE_DIR;
-        }
-        // Create new dir if necessary
-        try {
-            (new File(generationDir)).mkdir();
-        } catch (Exception e) {
-            e.printStackTrace();
-            System.exit(1);
-        }
-        System.out.println("Generation directory is : " + generationDir);
-
-        if (properties.getProperty("LdapMapping") != null) {
-            ldapMapping = true;
-        }
-
-        openDJWiki = properties.getProperty("OpenDJWiki");
-        if (openDJWiki == null) {
-            // Default is current wiki
-            openDJWiki = "http://wikis.forgerock.org/confluence/display/OPENDJ";
-        }
-
-        openDJHome = properties.getProperty("OpenDJHome");
-        if (openDJHome == null) {
-            // Default is current OpenDJ project home
-            openDJHome = "http://opendj.forgerock.org";
-        }
-
-        aciSyntaxPage = openDJHome + ACI_SYNTAX_REL_URL;
-        durationSyntaxPage = DURATION_SYNTAX_REL_URL;
-
-        ConfigGuideGeneration myGen = new ConfigGuideGeneration();
-        myGen.generate();
-    }
-
-    private void generate() {
-        init();
-
-        // Generate the relation tree of all the managed objects
-        genManagedObjectRelationTree(catTopRelList);
-
-        // Generate the inheritance tree of all the managed objects
-        genManagedObjectInheritanceTree(catTopMoList);
-
-        // Generate all the managed objects and their children
-        genAllManagedObject(topMoList);
-
-        // Generate a list of managed objects
-        genManagedObjectList(moList);
-
-        // Generate an index of properties
-        genPropertiesIndex();
-
-        // Generate the Index page
-        genIndexPage();
-
-        // Generate the Main Top page
-        genMainTopPage();
-
-        // Generate the Welcome page
-        genWelcomePage();
-    }
-
-    private void init() {
-
-        // Build a list of top relations
-        RootCfgDefn rootCfg = RootCfgDefn.getInstance();
-        for (RelationDefinition rel : rootCfg.getAllRelationDefinitions()) {
-            topRelList.put(rel.getChildDefinition().getName(), rel);
-        }
-
-        // Enable the client-side class loader to explicitly load classes
-        // which are not directly reachable from the root configuration
-        EmbeddedUtils.initializeForClientUse();
-        // Bootstrap definition classes.
-        try {
-            ClassLoaderProvider.getInstance().enable();
-        } catch (InitializationException e) {
-            System.err.println("ERROR : Cannot enable the client-side class loader.");
-            e.printStackTrace();
-            System.exit(1);
-        }
-
-        // Build a sorted list of top managed objects
-        TopCfgDefn topCfg = TopCfgDefn.getInstance();
-        Collection<AbstractManagedObjectDefinition<?, ?>> topObjects = topCfg.getChildren();
-        for (AbstractManagedObjectDefinition topObject : topObjects) {
-            if (topObject.getName().equals("")) {
-                // root
-                continue;
-            }
-            if (topObject.hasOption(ManagedObjectOption.HIDDEN)) {
-                continue;
-            }
-            topMoList.put(topObject.getName(), topObject);
-        }
-
-        // Build a list of top relations by category (core, database, ...)
-        for (RelationDefinition rel : topRelList.values()) {
-            AbstractManagedObjectDefinition<?, ?> mo = rel.getChildDefinition();
-            Collection<Tag> tags = mo.getAllTags();
-            for (Tag tag : tags) {
-                TreeMap<String, RelationDefinition> catMap = catTopRelList.get(tag.getName());
-                if (catMap == null) {
-                    catMap = new TreeMap<String, RelationDefinition>();
-                    catTopRelList.put(tag.getName(), catMap);
-                }
-                catMap.put(mo.getName(), rel);
-            }
-        }
-
-        // Build a list of top managed objects by category (core, database, ...)
-        for (AbstractManagedObjectDefinition<?, ?> topObject : topMoList.values()) {
-            Collection<Tag> tags = topObject.getAllTags();
-            for (Tag tag : tags) {
-                TreeMap<String, AbstractManagedObjectDefinition> catMap = catTopMoList.get(tag.getName());
-                if (catMap == null) {
-                    catMap = new TreeMap<String, AbstractManagedObjectDefinition>();
-                    catTopMoList.put(tag.getName(), catMap);
-                }
-                catMap.put(topObject.getName(), topObject);
-            }
-        }
-
-    }
-
-    /**
-     * Generate the inheritance tree of all the managed objects.
-     */
-
-    private void genManagedObjectInheritanceTree(
-        TreeMap<String, TreeMap<String, AbstractManagedObjectDefinition>> list) {
-
-        htmlHeader(DynamicConstants.PRODUCT_NAME + " " + "Configuration Reference - Inheritance View");
-        tabMenu(INHERITANCE_TREE_FILE);
-        viewHelp("This view represents the inheritance relationships between " + "configuration components.");
-        jumpSection();
-
-        for (String catName : list.keySet()) {
-            heading3(getFriendlyName(catName));
-            // Get the list of the category
-            TreeMap<String, AbstractManagedObjectDefinition> catList = list.get(catName);
-            for (AbstractManagedObjectDefinition mo : catList.values()) {
-                if ((relList.get(mo.getName()) != null)
-                    && (relList.get(mo.getName()).hasOption(RelationOption.HIDDEN))) {
-                    continue;
-                }
-                paragraph(getLink(mo.getUserFriendlyName().toString(), mo.getName() + ".html", MAIN_FRAME));
-                if (mo.hasChildren()) {
-                    genMoInheritanceTree(makeMOTreeMap(mo.getChildren()));
-                }
-            }
-        }
-
-        htmlFooter();
-        generateFile(INHERITANCE_TREE_FILE);
-    }
-
-    private void genMoInheritanceTree(TreeMap<String, AbstractManagedObjectDefinition> catList) {
-
-        beginList();
-        for (AbstractManagedObjectDefinition mo : catList.values()) {
-            link(mo.getUserFriendlyName().toString(), mo.getName() + ".html", MAIN_FRAME);
-            if (mo.hasChildren()) {
-                genMoInheritanceTree(makeMOTreeMap(mo.getChildren()));
-            }
-        }
-        endList();
-    }
-
-    private void jumpSection() {
-        htmlBuff.append("<p class=\"category-index\">" + "<strong>Jump To:</strong><br>\n");
-
-        String[] catNames = catTopMoList.keySet().toArray(new String[0]);
-        for (int ii = 0; ii < catNames.length; ii++) {
-            if (ii != 0) {
-                htmlBuff.append(", ");
-            }
-            String catFriendlyName = getFriendlyName(catNames[ii]);
-            htmlBuff.append(getLink(catFriendlyName, "#" + catFriendlyName));
-        }
-        htmlBuff.append("</p>\n");
-    }
-
-    /**
-     * Generate the relation tree of all the managed objects.
-     */
-    private void genManagedObjectRelationTree(TreeMap<String, TreeMap<String, RelationDefinition>> list) {
-
-        htmlHeader(DynamicConstants.PRODUCT_NAME + " Configuration Reference - Structure View");
-        tabMenu(RELATION_TREE_FILE);
-        viewHelp("This view represents the structural relationships between "
-            + "components and indicates how certain components can exist only within " + "container components.");
-        jumpSection();
-
-        for (String catName : list.keySet()) {
-            heading3(getFriendlyName(catName));
-            // Get the list of the category
-            TreeMap<String, RelationDefinition> catList = list.get(catName);
-            genMORelationTree(catList);
-        }
-
-        htmlFooter();
-        generateFile(RELATION_TREE_FILE);
-    }
-
-    private void genMORelationTree(TreeMap<String, RelationDefinition> list) {
-        for (RelationDefinition rel : list.values()) {
-            AbstractManagedObjectDefinition childMo = rel.getChildDefinition();
-            AbstractManagedObjectDefinition parentMo = rel.getParentDefinition();
-            // Does not generate several entry for the same relation
-            if (relList.put(childMo.getName(), rel) != null) {
-                continue;
-            }
-            if (rel.hasOption(RelationOption.HIDDEN)) {
-                continue;
-            }
-            String linkStr =
-                getLink(childMo.getUserFriendlyName().toString(), childMo.getName() + ".html", MAIN_FRAME);
-            String fromStr = "";
-            if (!parentMo.getName().equals("")) {
-                fromStr =
-                    " (from "
-                        + getLink(parentMo.getUserFriendlyName().toString(), parentMo.getName() + ".html", MAIN_FRAME)
-                        + ")";
-            }
-            if (!inList) {
-                paragraph(linkStr + fromStr);
-            } else {
-                bullet(linkStr + fromStr);
-            }
-            genMORelationSubTree(makeRelTreeMap(childMo.getAllRelationDefinitions()));
-            if (childMo.hasChildren()) {
-                for (Iterator<AbstractManagedObjectDefinition> it = childMo.getChildren().iterator(); it.hasNext();) {
-
-                    AbstractManagedObjectDefinition mo = it.next();
-                    if (mo.hasOption(ManagedObjectOption.HIDDEN)) {
-                        continue;
-                    }
-                    genMORelationSubTree(makeRelTreeMap(mo.getAllRelationDefinitions()));
-                }
-            }
-        }
-    }
-
-    private void genMORelationSubTree(TreeMap<String, RelationDefinition> list) {
-        if (!list.values().isEmpty()) {
-            beginList();
-            genMORelationTree(list);
-            endList();
-        }
-    }
-
-    /**
-     * Generate all the managed objects HTML pages.
-     */
-    private void genAllManagedObject(TreeMap<String, AbstractManagedObjectDefinition> list) {
-
-        for (AbstractManagedObjectDefinition mo : list.values()) {
-            if ((relList.get(mo.getName()) != null) && (relList.get(mo.getName()).hasOption(RelationOption.HIDDEN))) {
-                continue;
-            }
-            moList.put(mo.getName(), mo);
-            genManagedObject(mo);
-            if (mo.hasChildren()) {
-                genAllManagedObject(makeMOTreeMap(mo.getChildren()));
-            }
-        }
-    }
-
-    private void genManagedObject(AbstractManagedObjectDefinition mo) {
-        // ------------------------------------------------------------------------
-        // Header
-        // ------------------------------------------------------------------------
-
-        homeLink();
-        String title = mo.getUserFriendlyName().toString();
-        htmlHeader(DynamicConstants.PRODUCT_NAME + " - " + title);
-
-        // title
-        heading2(title);
-
-        // Abstract notice
-        if (mo.hasChildren()) {
-            paragraph("Note: this is an abstract component, that cannot be instantiated.", TextStyle.ITALIC);
-        }
-
-        // description
-        paragraph(mo.getSynopsis());
-        paragraph(mo.getDescription());
-
-        // sub-components
-        if (mo.hasChildren()) {
-            heading3("Direct Subcomponents");
-            paragraph("The following " + mo.getUserFriendlyPluralName() + " are available in the server :");
-            beginList();
-
-            TreeMap<String, AbstractManagedObjectDefinition> children = makeMOTreeMap(mo.getChildren());
-            for (AbstractManagedObjectDefinition child : children.values()) {
-                link(child.getUserFriendlyName().toString(), child.getName() + ".html");
-            }
-            endList();
-
-            paragraph("These " + mo.getUserFriendlyPluralName() + " inherit from the properties described below.");
-        }
-
-        // Parent
-        if (!mo.getParent().isTop()) {
-            heading3("Parent Component");
-            paragraph("The " + mo.getUserFriendlyName() + " component inherits from the "
-                + getLink(mo.getParent().getUserFriendlyName().toString(), mo.getParent().getName() + ".html"));
-        }
-
-        // Relations
-        generateRelationsSection(mo);
-
-        // Page links in case of LDAP mapping
-        if (ldapMapping) {
-            newline();
-            horizontalLine();
-            newline();
-            paragraph("This page describes the " + mo.getUserFriendlyName() + ":");
-            beginList();
-            link("Properties", "#Properties");
-            link("LDAP Mapping", "#LDAP Mapping");
-            endList();
-            newline();
-        }
-
-        // ------------------------------------------------------------------------
-        // Properties
-        // ------------------------------------------------------------------------
-
-        heading3("Properties");
-
-        paragraph("A description of each property follows.");
-        newline();
-
-        TreeMap<String, PropertyDefinition> basicProps = new TreeMap<String, PropertyDefinition>();
-        TreeMap<String, PropertyDefinition> advancedProps = new TreeMap<String, PropertyDefinition>();
-        // Properties actually defined in this managed object
-
-        Collection<PropertyDefinition> props = mo.getAllPropertyDefinitions();
-        for (PropertyDefinition prop : props) {
-            if (prop.hasOption(PropertyOption.ADVANCED)) {
-                advancedProps.put(prop.getName(), prop);
-            } else {
-                basicProps.put(prop.getName(), prop);
-            }
-        }
-
-        propertiesLinkTable(basicProps, advancedProps);
-
-        // basic properties
-        if (basicProps.size() > 0) {
-            heading4("Basic Properties");
-            for (PropertyDefinition prop : basicProps.values()) {
-                generateProperty(mo, prop);
-                newline();
-            }
-            newline();
-        }
-
-        // advanced properties
-        if (advancedProps.size() > 0) {
-            heading4("Advanced Properties");
-            for (PropertyDefinition prop : advancedProps.values()) {
-                generateProperty(mo, prop);
-                newline();
-            }
-            newline();
-        }
-
-        if (ldapMapping) {
-            genLdapMapping(mo);
-        }
-
-        htmlFooter();
-
-        generateFile(mo.getName() + ".html");
-    }
-
-    private TreeMap<String, PropertyDefinition> getPropertyList(AbstractManagedObjectDefinition mo) {
-
-        Collection<PropertyDefinition> props = mo.getAllPropertyDefinitions();
-        return makePropTreeMap(props);
-    }
-
-    private void homeLink() {
-        htmlBuff.append("<div style=\"font-size:11px;margin-top:-10px;"
-            + "margin-bottom:-10px; text-align:right\"><a href=\"" + MAIN_FILE
-            + "\" target=\"_top\">Configuration Reference Home</a></div>");
-    }
-
-    private void generateRelationsSection(AbstractManagedObjectDefinition mo) {
-        // Composition relations
-
-        Collection<RelationDefinition> compRels = mo.getRelationDefinitions();
-
-        Collection<RelationDefinition> reverseCompRels = mo.getReverseRelationDefinitions();
-        // Aggregation properties
-
-        Collection<AggregationPropertyDefinition> aggregProps = mo.getAggregationPropertyDefinitions();
-
-        Collection<AggregationPropertyDefinition> reverseAggregProps = mo.getReverseAggregationPropertyDefinitions();
-
-        // Check if something to print in composition relations
-        // (even if the list not empty, it may contain only hidden relations)
-        boolean isCompRelsEmpty = true;
-        if (!compRels.isEmpty()) {
-            for (RelationDefinition rel : compRels) {
-                if (rel.hasOption(RelationOption.HIDDEN)) {
-                    continue;
-                }
-                isCompRelsEmpty = false;
-            }
-        }
-        boolean isReverseCompRelsEmpty = true;
-        if (!reverseCompRels.isEmpty()) {
-            for (RelationDefinition rel : reverseCompRels) {
-                if (rel.hasOption(RelationOption.HIDDEN)) {
-                    continue;
-                }
-                // check if it is not root
-                if (rel.getParentDefinition().getName().equals("")) {
-                    continue;
-                }
-                isReverseCompRelsEmpty = false;
-            }
-        }
-
-        // Check if something to print in reverse aggregation relations
-        // (even if the list not empty, it may contain only relations from
-        // hidden component)
-        boolean isReverseAggregPropsEmpty = true;
-        if (!reverseAggregProps.isEmpty()) {
-            for (AggregationPropertyDefinition agg : reverseAggregProps) {
-                AbstractManagedObjectDefinition fromMo = agg.getManagedObjectDefinition();
-
-                Collection<RelationDefinition> rels = fromMo.getAllReverseRelationDefinitions();
-                for (RelationDefinition rel : rels) {
-                    if (rel.hasOption(RelationOption.HIDDEN)) {
-                        continue;
-                    }
-                    isReverseAggregPropsEmpty = false;
-                }
-            }
-        }
-
-        //
-        // Relations FROM this component
-        //
-
-        if (!isCompRelsEmpty || !aggregProps.isEmpty()) {
-            heading3("Relations From this Component");
-        }
-
-        if (!isCompRelsEmpty) {
-            paragraph("The following components have a direct COMPOSITION relation FROM "
-                + mo.getUserFriendlyPluralName() + " :");
-            for (RelationDefinition rel : compRels) {
-                if (rel.hasOption(RelationOption.HIDDEN)) {
-                    continue;
-                }
-                beginList();
-                AbstractManagedObjectDefinition childRel = rel.getChildDefinition();
-                link(childRel.getUserFriendlyName().toString(), childRel.getName() + ".html");
-                endList();
-            }
-        }
-        if (!aggregProps.isEmpty()) {
-            paragraph("The following components have a direct AGGREGATION relation FROM "
-                + mo.getUserFriendlyPluralName() + " :");
-            TreeMap<String, AbstractManagedObjectDefinition> componentList =
-                new TreeMap<String, AbstractManagedObjectDefinition>();
-            for (AggregationPropertyDefinition agg : aggregProps) {
-                RelationDefinition rel = agg.getRelationDefinition();
-                AbstractManagedObjectDefinition childRel = rel.getChildDefinition();
-                componentList.put(childRel.getName(), childRel);
-            }
-            for (AbstractManagedObjectDefinition component : componentList.values()) {
-                beginList();
-                link(component.getUserFriendlyName().toString(), component.getName() + ".html");
-                endList();
-            }
-        }
-
-        //
-        // Relations TO this component
-        //
-
-        if (!isReverseCompRelsEmpty || !isReverseAggregPropsEmpty) {
-            heading3("Relations To this Component");
-        }
-
-        if (!mo.getReverseRelationDefinitions().isEmpty()) {
-            if (!isReverseCompRelsEmpty) {
-                paragraph("The following components have a direct COMPOSITION relation TO "
-                    + mo.getUserFriendlyPluralName() + " :");
-                for (RelationDefinition rel : reverseCompRels) {
-                    beginList();
-                    AbstractManagedObjectDefinition childRel = rel.getParentDefinition();
-                    link(childRel.getUserFriendlyName().toString(), childRel.getName() + ".html");
-                    endList();
-                }
-            }
-        }
-        if (!isReverseAggregPropsEmpty) {
-            paragraph("The following components have a direct AGGREGATION relation TO "
-                + mo.getUserFriendlyPluralName() + " :");
-            TreeMap<String, AbstractManagedObjectDefinition> componentList =
-                new TreeMap<String, AbstractManagedObjectDefinition>();
-            for (AggregationPropertyDefinition agg : reverseAggregProps) {
-                AbstractManagedObjectDefinition fromMo = agg.getManagedObjectDefinition();
-                componentList.put(fromMo.getName(), fromMo);
-            }
-            for (AbstractManagedObjectDefinition component : componentList.values()) {
-                beginList();
-                link(component.getUserFriendlyName().toString(), component.getName() + ".html");
-                endList();
-
-            }
-        }
-
-    }
-
-    private void generateProperty(AbstractManagedObjectDefinition mo, PropertyDefinition prop) {
-
-        // Property name
-        paragraph(getAnchor(prop.getName()) + prop.getName(), TextStyle.STANDARD, "propertyname");
-
-        // Property table
-        startTable();
-        tableRow("Description",
-            ((prop.getSynopsis() != null) ? prop.getSynopsis().toString() + " " : "")
-                + ((prop.getDescription() != null) ? prop.getDescription().toString() : ""));
-
-        // Default value
-        String defValueStr = getDefaultBehaviorString(prop);
-        tableRow("Default Value", defValueStr);
-
-        tableRow("Allowed Values", getSyntaxStr(prop));
-
-        tableRow("Multi-valued", (prop.hasOption(PropertyOption.MULTI_VALUED) ? "Yes" : "No"));
-
-        if (prop.hasOption(PropertyOption.MANDATORY)) {
-            tableRow("Required", "Yes");
-        } else {
-            tableRow("Required", "No");
-        }
-
-        String action = "None";
-        if (prop.getAdministratorAction() != null) {
-            LocalizableMessage synopsis = prop.getAdministratorAction().getSynopsis();
-            Type actionType = prop.getAdministratorAction().getType();
-            String actionStr = "";
-            if (actionType == Type.COMPONENT_RESTART) {
-                actionStr =
-                    "The " + mo.getUserFriendlyName()
-                        + " must be disabled and re-enabled for changes to this setting " + "to take effect";
-            } else if (actionType == Type.SERVER_RESTART) {
-                actionStr = "Restart the server";
-            } else if (actionType == Type.NONE) {
-                actionStr = "None";
-            }
-            String dot = (actionStr.equals("") ? "" : ". ");
-            action = actionStr + ((synopsis != null) ? dot + synopsis : "");
-        }
-        tableRow("Admin Action Required", action);
-
-        if (prop.hasOption(PropertyOption.ADVANCED)) {
-            tableRow("Advanced Property", "Yes");
-        } else {
-            tableRow("Advanced Property", "No");
-        }
-
-        if (prop.hasOption(PropertyOption.READ_ONLY)) {
-            tableRow("Read-only", "Yes");
-        } else {
-            tableRow("Read-only", "No");
-        }
-
-        endTable();
-
-    }
-
-    private void propertiesLinkTable(TreeMap<String, PropertyDefinition> basicProps,
-        TreeMap<String, PropertyDefinition> advancedProps) {
-        htmlBuff.append("<table border=\"0\" cellspacing=\"0\" class=\"jump-table\">\n" + "  <tr>\n"
-            + "    <th>Basic Properties:</th>\n" + "    <th>Advanced Properties:</th>\n" + "  </tr>\n");
-
-        PropertyDefinition[] basicPropsArray = basicProps.values().toArray(new PropertyDefinition[0]);
-        PropertyDefinition[] advancedPropsArray = advancedProps.values().toArray(new PropertyDefinition[0]);
-
-        for (int ii = 0; (ii < basicPropsArray.length) || (ii < advancedPropsArray.length); ii++) {
-            String basicPropName = ii < basicPropsArray.length ? basicPropsArray[ii].getName() : null;
-            String advancedPropName = ii < advancedPropsArray.length ? advancedPropsArray[ii].getName() : null;
-
-            String basicHtmlCell = "";
-            if (basicPropName != null) {
-                basicHtmlCell =
-                    "  <td>&darr;&nbsp;<a href=\"#" + basicPropName + "\">" + basicPropName + "</a></td>\n";
-            } else if ((basicPropsArray.length == 0) && (ii == 0)) {
-                basicHtmlCell = "  <td>&nbsp;None</td>\n";
-            } else if (ii >= basicPropsArray.length) {
-                // Case of nb of basic props < nb of advanced props
-                basicHtmlCell = "  <td></td>\n";
-            }
-
-            String advancedHtmlCell = "";
-            if (advancedPropName != null) {
-                advancedHtmlCell =
-                    "  <td>&darr;&nbsp;<a href=\"#" + advancedPropName + "\">" + advancedPropName + "</a></td>\n";
-            } else if ((advancedPropsArray.length == 0) && (ii == 0)) {
-                advancedHtmlCell = "  <td>&nbsp;None</td>\n";
-            }
-
-            htmlBuff.append("<tr>\n");
-            htmlBuff.append(basicHtmlCell + advancedHtmlCell);
-            htmlBuff.append("</tr>\n");
-        }
-        htmlBuff.append("</table>\n");
-    }
-
-    private void genLdapMapping(AbstractManagedObjectDefinition mo) {
-        // ------------------------------------------------------------------------
-        // LDAP mapping
-        // ------------------------------------------------------------------------
-
-        heading3("LDAP Mapping");
-        paragraph("Each configuration property can be mapped to a specific "
-            + "LDAP attribute under the \"cn=config\" entry. "
-            + "The mappings that follow are provided for information only. "
-            + "In general, you should avoid changing the server configuration "
-            + "by manipulating the LDAP attributes directly.");
-
-        // Managed object table
-        startTable();
-
-        LDAPProfile ldapProfile = LDAPProfile.getInstance();
-        tableRow("Base DN", getBaseDN(mo, ldapProfile));
-
-        tableRow("objectclass name", ldapProfile.getObjectClass(mo));
-        if (mo.getParent().getName() != null) {
-            String superior = "";
-            if (mo.getParent().getName().equals("top")) {
-                superior = "top";
-            } else {
-                if (moList.get(mo.getParent().getName()) != null) {
-                    superior = ldapProfile.getObjectClass(moList.get(mo.getParent().getName()));
-                } else {
-                    System.err.println("Error: managed object " + mo.getName() + " not found.");
-                }
-            }
-            tableRow("objectclass superior", superior);
-        } else {
-            System.err.println("Error: objectclass superior not found for " + mo.getName());
-        }
-        endTable();
-
-        newline();
-        // Properties table
-        startTable();
-        tableRow("Property", "LDAP attribute");
-        for (PropertyDefinition prop : getPropertyList(mo).values()) {
-            tableRow(prop.getName(), ldapProfile.getAttributeName(mo, prop));
-        }
-
-        endTable();
-
-    }
-
-    private void genManagedObjectList(TreeMap<String, AbstractManagedObjectDefinition> list) {
-
-        htmlHeader(DynamicConstants.PRODUCT_NAME + " Configuration Reference - Components View");
-        tabMenu(MO_LIST_FILE);
-        viewHelp("This view provides a list of all configuration components, " + "in alphabetical order.");
-
-        newline();
-        StringBuffer moPointers = new StringBuffer();
-        String lettersPointers = "";
-        String firstChar = ".";
-        for (AbstractManagedObjectDefinition mo : list.values()) {
-            if (!mo.getName().startsWith(firstChar)) {
-                firstChar = mo.getName().substring(0, 1);
-                String letter = firstChar.toUpperCase();
-                moPointers.append(getAnchor(letter) + getHeading2(letter));
-                lettersPointers += getLink(letter, "#" + letter) + " ";
-            }
-            moPointers.append("<p> "
-                + getLink(mo.getUserFriendlyName().toString(), mo.getName() + ".html", MAIN_FRAME) + "</p>\n");
-        }
-        paragraph(lettersPointers);
-        htmlBuff.append(moPointers);
-        htmlFooter();
-        generateFile(MO_LIST_FILE);
-    }
-
-    private void genPropertiesIndex() {
-
-        // Build a sorted list of (property name + its managed object name)
-        TreeSet<String> propMoList = new TreeSet<String>();
-        for (AbstractManagedObjectDefinition<?, ?> mo : moList.values()) {
-            for (PropertyDefinition<?> prop : mo.getPropertyDefinitions()) {
-                propMoList.add(prop.getName() + "," + prop.getManagedObjectDefinition().getName());
-            }
-        }
-
-        String lettersPointers = "";
-        String firstChar = ".";
-        for (String propMoStr : propMoList) {
-            String[] propMoArray = propMoStr.split(",");
-            String propName = propMoArray[0];
-            AbstractManagedObjectDefinition mo = moList.get(propMoArray[1]);
-            if (!propName.startsWith(firstChar)) {
-                firstChar = propName.substring(0, 1);
-                String letter = firstChar.toUpperCase();
-                htmlBuff.append(getAnchor(letter) + getHeading2(letter));
-                lettersPointers += getLink(letter, "#" + letter) + " ";
-            }
-            String propLink = getLink(propName, mo.getName() + ".html" + "#" + propName, MAIN_FRAME);
-            String moLink = getLink(mo.getUserFriendlyName().toString(), mo.getName() + ".html", MAIN_FRAME, "#666");
-            paragraph(propLink + "  [ " + moLink + " ]");
-        }
-
-        String indexBody = htmlBuff.toString();
-        htmlBuff = new StringBuffer();
-        htmlHeader(DynamicConstants.PRODUCT_NAME + " Configuration Reference - Properties View");
-        tabMenu(PROPERTIES_INDEX_FILE);
-        viewHelp("This view provides a list of all configuration properties, "
-            + "in alphabetical order, and indicates the configuration component to " + "which each property applies.");
-
-        newline();
-        paragraph(lettersPointers);
-        htmlBuff.append(indexBody);
-        htmlFooter();
-        generateFile(PROPERTIES_INDEX_FILE);
-    }
-
-    private void genWelcomePage() {
-        htmlHeader(DynamicConstants.PRODUCT_NAME + " Configuration Reference - Welcome");
-        heading2("About This Reference");
-        paragraph("This reference " + "describes the " + DynamicConstants.PRODUCT_NAME
-            + " configuration properties that can be manipulated " + "with the dsconfig command.");
-        paragraph("Configuration components are grouped according to the area of "
-            + "the server in which they are used, as follows:");
-
-        beginList();
-        for (String catName : catTopMoList.keySet()) {
-            bullet(getFriendlyName(catName));
-        }
-        endList();
-
-        paragraph("For ease of reference, the configuration is described on multiple "
-            + "tabs. These tabs provide alternative views of the configuration " + "components:");
-        beginList();
-        bullet("The <strong>Inheritance</strong> view represents the inheritance "
-            + "relationships between configuration components. A sub-component "
-            + "inherits all of the properties of its parent component.");
-        bullet("The <strong>Structure</strong> view represents the structural "
-            + "relationships between components and indicates how certain components "
-            + "can exist only within container components. When a container "
-            + "component is deleted, all of the components within it are also " + "deleted.");
-        bullet("The <strong>Components</strong> view provides an alphabetical list "
-            + "of all configuration components.");
-        bullet("The <strong>Properties</strong> view provides an alphabetical list "
-            + "of all configuration properties, and indicates the configuration "
-            + "component to which each property applies.");
-        endList();
-
-        newline();
-        paragraph("When you set up " + DynamicConstants.PRODUCT_NAME + ", certain components are created in the "
-            + "configuration by default. These components are configured with "
-            + "specific values, which are not necessarily the same as the "
-            + "\"default values\" of new components that you create using dsconfig. "
-            + "The \"default values\" listed in this document refer to the values "
-            + "of the new components that you create using dsconfig.");
-
-        htmlFooter();
-        generateFile(WELCOME_FILE);
-
-    }
-
-    private void genMainTopPage() {
-        htmlHeader(DynamicConstants.PRODUCT_NAME + " Configuration Reference - Main Top");
-        htmlBuff.append("<div class=\"breadcrumb\"><span class=\"pageactions\">" + "<a href=\"" + openDJHome
-            + "\" target=\"_parent\">" + "<span style=\"font-size: 12px;\">&laquo;&nbsp;&nbsp;</span>" + "Back to "
-            + DynamicConstants.PRODUCT_NAME + " Home</a></span>&nbsp;&nbsp;</div>\n");
-        htmlBuff.append("<table class=\"titletable\" cellspacing=\"0\" " + "width=\"100%\">\n");
-        htmlBuff.append("<tbody><tr>\n");
-        htmlBuff.append("  <td><h2>" + DynamicConstants.PRODUCT_NAME + " Configuration Reference</h2></td>\n");
-        htmlBuff.append("  <td valign=\"bottom\" width=\"10%\">" + "<a href=\"" + openDJHome
-            + "\" target=\"_parent\">" + "<img src=\"opendj_logo_sm.png\" alt=\"OpenDJ Logo\" align=\"bottom\" "
-            + "border=\"0\" height=\"33\" width=\"114\"></a></td>\n");
-        htmlBuff.append("</tr>\n");
-        htmlBuff.append("</tbody></table>\n");
-
-        htmlFooter();
-        generateFile(MAINTOP_FILE);
-
-    }
-
-    private void genIndexPage() {
-        htmlBuff.append(getHtmlHeader(DynamicConstants.PRODUCT_NAME + " Configuration Reference"));
-
-        htmlBuff.append("<frameset rows=\"80,*\" framespacing=\"1\" "
-            + "frameborder=\"yes\" border=\"1\" bordercolor=\"#333333\">\n");
-        htmlBuff.append("  <frame src=\"" + MAINTOP_FILE + "\" name=\"topFrame\" "
-            + "id=\"topFrame\" border=\"1\" title=\"topFrame\" scrolling=\"no\">\n");
-        htmlBuff
-            .append("  <frameset cols=\"375,*\" frameborder=\"yes\" " + "border=\"1\" " + "framespacing=\"1\">\n");
-        htmlBuff.append("     <frame src=\"" + INHERITANCE_TREE_FILE + "\" "
-            + "name=\"leftFrame\" id=\"leftFrame\" title=\"leftFrame\" " + "scrolling=\"auto\">\n");
-        htmlBuff.append("     <frame src=\"" + WELCOME_FILE + "\" name=\"mainFrame\" "
-            + "id=\"mainFrame\" title=\"mainFrame\" scrolling=\"auto\">\n");
-        htmlBuff.append("   </frameset>\n");
-        htmlBuff.append("</frameset>\n");
-        htmlBuff.append("<noframes><body>\n");
-        htmlBuff.append("</body>\n");
-        htmlBuff.append("</noframes>\n");
-        htmlBuff.append("</html>\n");
-
-        generateFile(INDEX_FILE);
-    }
-
-    private String getBaseDN(AbstractManagedObjectDefinition mo, LDAPProfile ldapProfile) {
-
-        RelationDefinition rel = relList.get(mo.getName());
-        if (rel != null) {
-            String baseDn = ldapProfile.getRelationRDNSequence(rel);
-            if (!baseDn.equals("")) {
-                return baseDn;
-            } else {
-                // Check the parent relation
-                return getBaseDN(rel.getParentDefinition(), ldapProfile);
-            }
-        } else if (moList.get(mo.getParent().getName()) != null) {
-            // check its superior
-            return getBaseDN(moList.get(mo.getParent().getName()), ldapProfile);
-        } else {
-            System.err.println("Error: Base DN not found for " + mo.getName());
-        }
-        return null;
-    }
-
-    private String getSyntaxStr(PropertyDefinition prop) {
-        // Create a visitor for performing syntax specific processing.
-        PropertyDefinitionVisitor<String, Void> visitor = new PropertyDefinitionVisitor<String, Void>() {
-
-            @Override
-            public String visitACI(ACIPropertyDefinition prop, Void p) {
-                return getLink("An ACI Syntax", aciSyntaxPage);
-            }
-
-            @Override
-            public String visitAggregation(AggregationPropertyDefinition prop, Void p) {
-
-                RelationDefinition rel = prop.getRelationDefinition();
-                String linkStr = getLink(rel.getUserFriendlyName().toString(), rel.getName() + ".html");
-                return "The DN of any "
-                    + linkStr
-                    + ". "
-                    + ((prop.getSourceConstraintSynopsis() != null) ? prop.getSourceConstraintSynopsis().toString()
-                        : "");
-            }
-
-            @Override
-            public String visitAttributeType(AttributeTypePropertyDefinition prop, Void p) {
-                return "The name of an attribute type defined in the server schema.";
-            }
-
-            @Override
-            public String visitBoolean(BooleanPropertyDefinition prop, Void p) {
-                return "true" + getNewLine() + "false";
-            }
-
-            @Override
-            public String visitClass(ClassPropertyDefinition prop, Void p) {
-                String classStr = "A java class that implements or extends the class(es) :";
-                for (String clazz : prop.getInstanceOfInterface()) {
-                    classStr += getNewLine() + clazz;
-                }
-                return classStr;
-            }
-
-            @Override
-            public String visitDN(DNPropertyDefinition prop, Void p) {
-                String retStr = "A valid DN.";
-                if (prop.getBaseDN() != null) {
-                    retStr += prop.getBaseDN().toString();
-                }
-                return retStr;
-            }
-
-            @Override
-            public String visitDuration(DurationPropertyDefinition prop, Void p) {
-                String durationStr = "";
-
-                durationStr += getLink("A duration Syntax", durationSyntaxPage) + ". ";
-                if (prop.isAllowUnlimited()) {
-                    durationStr += "A value of \"-1\" or \"unlimited\" for no limit. ";
-                }
-                if (prop.getMaximumUnit() != null) {
-                    durationStr += "Maximum unit is \"" + prop.getMaximumUnit().getLongName() + "\". ";
-                }
-                long lowerLimitStr =
-                    new Double(prop.getBaseUnit().fromMilliSeconds(prop.getLowerLimit())).longValue();
-                durationStr += "Lower limit is " + lowerLimitStr + " " + prop.getBaseUnit().getLongName() + ". ";
-                if (prop.getUpperLimit() != null) {
-                    long upperLimitStr =
-                        new Double(prop.getBaseUnit().fromMilliSeconds(prop.getUpperLimit())).longValue();
-                    durationStr += "Upper limit is " + upperLimitStr + " " + prop.getBaseUnit().getLongName() + ". ";
-                }
-
-                return durationStr;
-            }
-
-            @Override
-            public String visitEnum(EnumPropertyDefinition prop, Void p) {
-                String enumStr = "";
-                Class en = prop.getEnumClass();
-                for (Object cst : en.getEnumConstants()) {
-                    enumStr += cst.toString();
-                    if (prop.getValueSynopsis((Enum) cst) != null) {
-                        enumStr += " - " + prop.getValueSynopsis((Enum) cst).toString();
-                    }
-                    enumStr += getNewLine() + getNewLine();
-                }
-                return enumStr;
-            }
-
-            @Override
-            public String visitInteger(IntegerPropertyDefinition prop, Void p) {
-                String intStr = "An integer value.";
-                intStr += " Lower value is " + prop.getLowerLimit() + ".";
-                if (prop.getUpperLimit() != null) {
-                    intStr += " Upper value is " + prop.getUpperLimit() + " .";
-                }
-                if (prop.isAllowUnlimited()) {
-                    intStr += " A value of \"-1\" or \"unlimited\" for no limit.";
-                }
-                if (prop.getUnitSynopsis() != null) {
-                    intStr += " Unit is " + prop.getUnitSynopsis() + ".";
-                }
-                return intStr;
-            }
-
-            @Override
-            public String visitIPAddress(IPAddressPropertyDefinition prop, Void p) {
-                return "An IP address";
-            }
-
-            @Override
-            public String visitIPAddressMask(IPAddressMaskPropertyDefinition prop, Void p) {
-
-                return "An IP address mask";
-            }
-
-            @Override
-            public String visitSize(SizePropertyDefinition prop, Void p) {
-                String sizeStr = "A positive integer representing a size.";
-                if (prop.getLowerLimit() != 0) {
-                    sizeStr += " Lower value is " + prop.getLowerLimit() + ".";
-                }
-                if (prop.getUpperLimit() != null) {
-                    sizeStr += " Upper value is " + prop.getUpperLimit() + " .";
-                }
-                if (prop.isAllowUnlimited()) {
-                    sizeStr += " A value of \"-1\" or \"unlimited\" for no limit.";
-                }
-                return sizeStr;
-            }
-
-            @Override
-            public String visitString(StringPropertyDefinition prop, Void p) {
-                String retStr = "A String";
-                if (prop.getPatternSynopsis() != null) {
-                    retStr = prop.getPatternSynopsis().toString();
-                }
-                return retStr;
-            }
-
-            @Override
-            public String visitUnknown(PropertyDefinition prop, Void p) {
-                return "Unknown";
-            }
-        };
-
-        // Invoke the visitor against the property definition.
-        return (String) prop.accept(visitor, null);
-
-    }
-
-    private String getDefaultBehaviorString(PropertyDefinition prop) {
-        DefaultBehaviorProvider defaultBehav = prop.getDefaultBehaviorProvider();
-        String defValueStr = "";
-        if (defaultBehav instanceof UndefinedDefaultBehaviorProvider) {
-            defValueStr = "None";
-        } else if (defaultBehav instanceof DefinedDefaultBehaviorProvider) {
-            DefinedDefaultBehaviorProvider defBehav = (DefinedDefaultBehaviorProvider) defaultBehav;
-            for (Iterator<String> it = defBehav.getDefaultValues().iterator(); it.hasNext();) {
-
-                String str = it.next();
-                defValueStr += str + (it.hasNext() ? "\n" : "");
-            }
-        } else if (defaultBehav instanceof AliasDefaultBehaviorProvider) {
-            AliasDefaultBehaviorProvider aliasBehav = (AliasDefaultBehaviorProvider) defaultBehav;
-            defValueStr = aliasBehav.getSynopsis().toString();
-        } else if (defaultBehav instanceof RelativeInheritedDefaultBehaviorProvider) {
-            RelativeInheritedDefaultBehaviorProvider relativBehav =
-                (RelativeInheritedDefaultBehaviorProvider) defaultBehav;
-            defValueStr =
-                getDefaultBehaviorString(relativBehav.getManagedObjectDefinition().getPropertyDefinition(
-                    relativBehav.getPropertyName()));
-        } else if (defaultBehav instanceof AbsoluteInheritedDefaultBehaviorProvider) {
-            AbsoluteInheritedDefaultBehaviorProvider absoluteBehav =
-                (AbsoluteInheritedDefaultBehaviorProvider) defaultBehav;
-            defValueStr =
-                getDefaultBehaviorString(absoluteBehav.getManagedObjectDefinition().getPropertyDefinition(
-                    absoluteBehav.getPropertyName()));
-        }
-        return defValueStr;
-    }
-
-    private TreeMap<String, AbstractManagedObjectDefinition> makeMOTreeMap(
-        Collection<AbstractManagedObjectDefinition> coll) {
-
-        if (coll == null) {
-            return null;
-        }
-        TreeMap<String, AbstractManagedObjectDefinition> map = new TreeMap<String, AbstractManagedObjectDefinition>();
-        for (AbstractManagedObjectDefinition mo : coll) {
-            if (mo.hasOption(ManagedObjectOption.HIDDEN)) {
-                continue;
-            }
-            map.put(mo.getName(), mo);
-        }
-        return map;
-    }
-
-    private TreeMap<String, RelationDefinition> makeRelTreeMap(Collection<RelationDefinition> coll) {
-
-        if (coll == null) {
-            return null;
-        }
-        TreeMap<String, RelationDefinition> map = new TreeMap<String, RelationDefinition>();
-        for (RelationDefinition rel : coll) {
-            map.put(rel.getChildDefinition().getName(), rel);
-        }
-        return map;
-    }
-
-    private TreeMap<String, PropertyDefinition> makePropTreeMap(Collection<PropertyDefinition> coll) {
-
-        if (coll == null) {
-            return null;
-        }
-        TreeMap<String, PropertyDefinition> map = new TreeMap<String, PropertyDefinition>();
-        for (PropertyDefinition prop : coll) {
-            map.put(prop.getName(), prop);
-        }
-        return map;
-    }
-
-    private void horizontalLine() {
-        htmlBuff.append("<hr style=\"width: 100%; height: 2px;\">");
-    }
-
-    private void endTable() {
-        htmlBuff.append("</tbody>\n");
-        htmlBuff.append("</table>\n");
-    }
-
-    private void bullet(String str) {
-        htmlBuff.append("<li>" + str + "</li>\n");
-    }
-
-    private void heading2(String string) {
-        heading(string, 2);
-    }
-
-    private void heading3(String string) {
-        heading(string, 3);
-    }
-
-    private void heading4(String string) {
-        heading(string, 4);
-    }
-
-    private void heading(String str, int level) {
-        htmlBuff.append(getHeading(str, level));
-    }
-
-    private String getHeading(String str, int level) {
-        String strLevel = (new Integer(level)).toString();
-        return "<h" + strLevel + ">" + "<a name=\"" + str + "\"></a>" + str + "</h" + strLevel + ">\n";
-    }
-
-    private String getHeading2(String str) {
-        return getHeading(str, 2);
-    }
-
-    private String getAnchor(String str) {
-        return "<a name=\"" + str + "\"></a>";
-    }
-
-    private void htmlHeader(String pageTitle) {
-        htmlBuff.append(getHtmlHeader(pageTitle) + "<body>\n");
-
-    }
-
-    private static final String NOW = new Date().toString();
-
-    private String getHtmlHeader(String pageTitle) {
-        return ("<html>\n" + "<head>\n" + "<meta http-equiv=\"content-type\"\n"
-            + "content=\"text/html; charset=ISO-8859-1\">\n" + "<title>" + pageTitle + "</title>\n"
-            + "<link rel=\"stylesheet\" type=\"text/css\"\n" + "href=\"" + CSS_FILE + "\">\n"
-            + "<link rel=\"shortcut icon\" href=\"" + FAVICON + "\">\n" + "<meta name=\"date generated\" content=\""
-            + NOW + "\">\n" + "</head>\n");
-    }
-
-    // Add a Tab Menu, the active tab is the one given as parameter
-    private void tabMenu(String activeTab) {
-        // @Checkstyle:off
-        htmlBuff.append("<div class=\"tabmenu\"> " +
-
-        "<span><a " + (activeTab.equals(INHERITANCE_TREE_FILE) ? "class=\"activetab\" " : "") + "href=\""
-            + INHERITANCE_TREE_FILE + "\"" + " title=\"Inheritance View of Components\">Inheritance</a></span> " +
-
-            "<span><a " + (activeTab.equals(RELATION_TREE_FILE) ? "class=\"activetab\" " : "") + "href=\""
-            + RELATION_TREE_FILE + "\"" + " title=\"Relational View of Components\">Structure</a></span> " +
-
-            "<span><a " + (activeTab.equals(MO_LIST_FILE) ? "class=\"activetab\" " : "") + "href=\"" + MO_LIST_FILE
-            + "\"" + " title=\"Alphabetical Index of Components\">Components</a></span> " +
-
-            "<span><a " + (activeTab.equals(PROPERTIES_INDEX_FILE) ? "class=\"activetab\" " : "") + "href=\""
-            + PROPERTIES_INDEX_FILE + "\"" + " title=\"Alphabetical Index of Properties\" >Properties</a></span>" +
-
-            "</div>" + "\n");
-        // @Checkstyle:on
-    }
-
-    private String getLink(String str, String link) {
-        return getLink(str, link, null, null);
-    }
-
-    private String getLink(String str, String link, String target) {
-        return getLink(str, link, target, null);
-    }
-
-    private String getLink(String str, String link, String target, String color) {
-        return "<a " + (color != null ? "style=\"color:" + color + "\" " : "") + "href=\"" + link + "\""
-            + (target == null ? "" : " target=\"" + target + "\"") + ">" + str + "</a>";
-    }
-
-    private void link(String str, String link) {
-        link(str, link, null, null);
-    }
-
-    private void link(String str, String link, String target) {
-        link(str, link, target, null);
-    }
-
-    private void link(String str, String link, String target, String color) {
-        String htmlStr = "";
-        if (!inList && getIndentPixels() > 0) {
-            htmlStr += "<div style=\"margin-left: " + getIndentPixels() + "px;\">";
-        } else if (inList) {
-            htmlStr += "<li>";
-        }
-        htmlStr += getLink(str, link, target, color);
-        if (!inList && getIndentPixels() > 0) {
-            htmlStr += "</div>";
-        } else if (inList) {
-            htmlStr += "</li>";
-        }
-        if (!inList) {
-            htmlStr += "<br>";
-        }
-        htmlBuff.append(htmlStr + "\n");
-    }
-
-    private void newline() {
-        htmlBuff.append(getNewLine());
-    }
-
-    private String getNewLine() {
-        return "<br>\n";
-    }
-
-    private void paragraph(LocalizableMessage description) {
-        if (description != null) {
-            paragraph(description.toString());
-        }
-    }
-
-    private void paragraph(String description) {
-        paragraph(description, TextStyle.STANDARD, null);
-    }
-
-    private void paragraph(String description, TextStyle style) {
-        paragraph(description, style, null);
-    }
-
-    private void paragraph(String description, TextStyle style, String pClass) {
-        String indentStr = "";
-        String styleStr = "";
-        String classStr = "";
-        if (getIndentPixels() > 0) {
-            indentStr = "style=\"margin-left: " + getIndentPixels() + "px;\"";
-        }
-        if (style == TextStyle.BOLD) {
-            styleStr = "style=\"font-weight: bold;\"";
-        } else if (style == TextStyle.ITALIC) {
-            styleStr = "style=\"font-style: italic;\"";
-        }
-        if (pClass != null) {
-            classStr = "class=" + pClass;
-        }
-
-        htmlBuff.append("<p " + indentStr + " " + styleStr + " " + classStr + ">" + description + "</p>\n");
-    }
-
-    private int getIndentPixels() {
-        return (ind * 40);
-    }
-
-    private void startTable() {
-        htmlBuff.append("<table " + "style=\"width: 100%; text-align: left;\"" + "border=\"1\"" + "cellpadding=\"1\""
-            + "cellspacing=\"0\"" + ">\n");
-
-        htmlBuff.append("<tbody>\n");
-    }
-
-    /*
-     * Generate a "friendly" name from a string : '-' and '_' replaced by space
-     * first letter of a word in uppercase
-     */
-    private String getFriendlyName(String str) {
-        String retStr = "";
-        String[] words = str.split("\\p{Punct}");
-        for (int ii = 0; ii < words.length; ii++) {
-            if (ii > 0) {
-                retStr += " ";
-            }
-            String word = words[ii];
-            String firstChar = word.substring(0, 1).toUpperCase();
-            retStr += firstChar + word.substring(1, word.length());
-        }
-        return retStr;
-    }
-
-    private void tableRow(String... strings) {
-        htmlBuff.append("<tr>\n");
-        for (int ii = 0; ii < strings.length; ii++) {
-            String string = strings[ii];
-            htmlBuff.append("<td style=\"" + "vertical-align: top; " + ((ii == 0) ? "width: 20%;" : "") + "\">"
-                + string + "<br></td>");
-        }
-        htmlBuff.append("</tr>\n");
-    }
-
-    /**
-     * Text style.
-     */
-    private enum TextStyle {
-
-        STANDARD, BOLD, ITALIC, UNDERLINE, FIXED_WIDTH
-    }
-
-    private void beginList() {
-        inList = true;
-        listLevel++;
-        htmlBuff.append("<ul>\n");
-    }
-
-    private void endList() {
-        listLevel--;
-        if (listLevel == 0) {
-            inList = false;
-        }
-        htmlBuff.append("</ul>\n");
-    }
-
-    private void htmlFooter() {
-        htmlBuff.append("</body>\n" + "</html>\n");
-    }
-
-    private void viewHelp(String helpStr) {
-        htmlBuff.append("<p class=\"view-help\" >" + helpStr + "</p>" + "\n");
-    }
-
-    private void generateFile(String fileName) {
-        // Write the html buffer in a file
-        try {
-            PrintWriter file =
-                new java.io.PrintWriter(new java.io.FileWriter(generationDir + File.separator + fileName));
-            file.write(htmlBuff.toString());
-            file.close();
-        } catch (Exception e) {
-            e.printStackTrace();
-            System.exit(1);
-        }
-        // re-init html buffer
-        htmlBuff = new StringBuffer();
-    }
-
-    // Relation List from RootConfiguration
-    private final TreeMap<String, RelationDefinition> topRelList = new TreeMap<String, RelationDefinition>();
-    private final TreeMap<String, RelationDefinition> relList = new TreeMap<String, RelationDefinition>();
-    private final TreeMap<String, TreeMap<String, RelationDefinition>> catTopRelList =
-        new TreeMap<String, TreeMap<String, RelationDefinition>>();
-    // managed object list
-    private final TreeMap<String, AbstractManagedObjectDefinition> moList =
-        new TreeMap<String, AbstractManagedObjectDefinition>();
-    private final TreeMap<String, AbstractManagedObjectDefinition> topMoList =
-        new TreeMap<String, AbstractManagedObjectDefinition>();
-    private final TreeMap<String, TreeMap<String, AbstractManagedObjectDefinition>> catTopMoList =
-        new TreeMap<String, TreeMap<String, AbstractManagedObjectDefinition>>();
-    private final int ind = 0;
-    private StringBuffer htmlBuff = new StringBuffer();
-    private static String generationDir;
-    private static boolean ldapMapping = false;
-    private static String openDJWiki;
-    private static String openDJHome;
-    private static String aciSyntaxPage;
-    private static String durationSyntaxPage;
-    private boolean inList = false;
-    private int listLevel = 0;
-}
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/doc/package-info.java b/opendj-admin/src/main/java/org/opends/server/admin/doc/package-info.java
deleted file mode 100644
index 4ffd601..0000000
--- a/opendj-admin/src/main/java/org/opends/server/admin/doc/package-info.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2007-2008 Sun Microsystems, Inc.
- */
-
-/**
- * Administration documentation classes.
- * <p>
- * This package contains classes used to generate administration documentation.
- */
-package org.opends.server.admin.doc;
-
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java
index 8976ef1..fa9c33b 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigAddListenerAdaptor.java
@@ -40,9 +40,8 @@
 import org.opends.server.admin.OptionalRelationDefinition;
 import org.opends.server.admin.SetRelationDefinition;
 import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.api.ConfigAddListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigAddListener;
+import org.opends.server.config.spi.ConfigException;
 import org.forgerock.opendj.ldap.DN;
 import org.forgerock.opendj.ldap.Entry;
 import org.slf4j.Logger;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java
index c46ca0a..208d573 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeListenerAdaptor.java
@@ -52,11 +52,10 @@
 import org.opends.server.admin.PropertyDefinition;
 import org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider;
 import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
-import org.opends.server.api.ConfigChangeListener;
-import org.opends.server.api.ConfigDeleteListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigChangeListener;
+import org.opends.server.config.spi.ConfigDeleteListener;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.forgerock.opendj.ldap.DN;
@@ -89,7 +88,7 @@
          * Finds the dependencies associated with the provided property
          * definition.
          *
-         * @param <T>
+         * @param <T> The type of property definition.
          * @param path
          *            The current base path used for relative name resolution.
          * @param pd
diff --git a/opendj-admin/src/main/java/org/opends/server/types/ConfigChangeResult.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeResult.java
similarity index 99%
rename from opendj-admin/src/main/java/org/opends/server/types/ConfigChangeResult.java
rename to opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeResult.java
index 96480b3..542861a 100644
--- a/opendj-admin/src/main/java/org/opends/server/types/ConfigChangeResult.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigChangeResult.java
@@ -23,7 +23,7 @@
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
  */
-package org.opends.server.types;
+package org.opends.server.admin.server;
 
 import java.util.ArrayList;
 import java.util.Iterator;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java
index 6edff02..6a9a77b 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigDeleteListenerAdaptor.java
@@ -42,9 +42,8 @@
 import org.opends.server.admin.OptionalRelationDefinition;
 import org.opends.server.admin.SetRelationDefinition;
 import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.api.ConfigDeleteListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigDeleteListener;
+import org.opends.server.config.spi.ConfigException;
 import org.forgerock.opendj.ldap.DN;
 import org.forgerock.opendj.ldap.Entry;
 import org.slf4j.Logger;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java
index cdff67a..a103d0b 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigExceptionFactory.java
@@ -30,7 +30,7 @@
 import static com.forgerock.opendj.util.StaticUtils.*;
 
 import org.opends.server.admin.DefinitionDecodingException;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 import org.opends.server.util.DynamicConstants;
 
 import com.forgerock.opendj.ldap.AdminMessages;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java
index 46ea3e8..bf512c0 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationAddListener.java
@@ -30,7 +30,6 @@
 import java.util.List;
 
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * This interface defines the methods that a Directory Server configurable
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java
index afb984a..51f3f27 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationChangeListener.java
@@ -30,7 +30,6 @@
 import java.util.List;
 
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * This interface defines the methods that a Directory Server configurable
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java
index cc7e606..3519977 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ConfigurationDeleteListener.java
@@ -30,7 +30,6 @@
 import java.util.List;
 
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * This interface defines the methods that a Directory Server configurable
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java b/opendj-admin/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java
index a59cb90..5b76645 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/DelayedConfigAddListener.java
@@ -25,11 +25,10 @@
  */
 package org.opends.server.admin.server;
 
-import org.opends.server.api.ConfigAddListener;
-import org.opends.server.api.ConfigDeleteListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigAddListener;
+import org.opends.server.config.spi.ConfigDeleteListener;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.forgerock.opendj.ldap.DN;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java
index 7439427..63b4a8f 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerConstraintHandler.java
@@ -28,7 +28,7 @@
 import java.util.Collection;
 
 import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * An interface for performing server-side constraint validation.
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObject.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObject.java
index 2d605c7..5e76a6a 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObject.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObject.java
@@ -48,11 +48,11 @@
 import org.opends.server.admin.RelationDefinition;
 import org.opends.server.admin.SetRelationDefinition;
 import org.opends.server.admin.SingletonRelationDefinition;
-import org.opends.server.api.ConfigAddListener;
-import org.opends.server.api.ConfigChangeListener;
-import org.opends.server.api.ConfigDeleteListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
+import org.opends.server.config.spi.ConfigAddListener;
+import org.opends.server.config.spi.ConfigChangeListener;
+import org.opends.server.config.spi.ConfigDeleteListener;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java
index 996c09d..7946502 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListener.java
@@ -30,7 +30,6 @@
 import java.util.List;
 
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * This interface defines the methods that a Directory Server configurable
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java
index f47eb77..a53a8d7 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectAddListenerAdaptor.java
@@ -29,7 +29,6 @@
 
 import org.forgerock.i18n.LocalizableMessage;
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * An adaptor class which converts {@link ServerManagedObjectAddListener}
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java
index c2215bf..3150907 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListener.java
@@ -30,7 +30,6 @@
 import java.util.List;
 
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * This interface defines the methods that a Directory Server configurable
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java
index 8c70945..6e9b962 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectChangeListenerAdaptor.java
@@ -29,7 +29,6 @@
 
 import org.forgerock.i18n.LocalizableMessage;
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * An adaptor class which converts {@link ServerManagedObjectChangeListener}
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java
index 0a93cb3..9ce7c52 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListener.java
@@ -30,7 +30,6 @@
 import java.util.List;
 
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * This interface defines the methods that a Directory Server configurable
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java
index a8642cc..3f66381 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDeleteListenerAdaptor.java
@@ -29,7 +29,6 @@
 
 import org.forgerock.i18n.LocalizableMessage;
 import org.opends.server.admin.Configuration;
-import org.opends.server.types.ConfigChangeResult;
 
 /**
  * An adaptor class which converts {@link ServerManagedObjectDeleteListener}
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagementContext.java b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagementContext.java
index 010371b..793d472 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagementContext.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagementContext.java
@@ -70,8 +70,8 @@
 import org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider;
 import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
 import org.opends.server.admin.DefinitionDecodingException.Reason;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.opends.server.core.DirectoryServer;
 import org.forgerock.opendj.admin.meta.RootCfgDefn;
 import org.forgerock.opendj.admin.server.RootCfg;
diff --git a/opendj-admin/src/main/java/org/opends/server/config/package-info.java b/opendj-admin/src/main/java/org/opends/server/config/package-info.java
deleted file mode 100644
index 533cdfa..0000000
--- a/opendj-admin/src/main/java/org/opends/server/config/package-info.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
- */
-
-/**
- * Contains code used to interact with the Directory Server configuration.  This
- * includes various kinds of configuration attributes for different data types,
- * as well as the primary means of exposing configuration and operations over
- * JMX.  Further, it includes the code for the default configuration handler
- * which stores information in an LDIF file.
- * <BR><BR>
- * Whenever a configuration entry is modified, assuming that the result of the
- * modification is in conformance with the server schema, then any configurable
- * components and configuration change listeners associated with that entry will
- * be invoked and given an opportunity to reject that update if there is a
- * problem with it, or dynamically react to it by applying the new
- * configuration.  If a new configuration entry is added, then any configuration
- * add listeners associated with that entry's parent will be invoked.  If an
- * existing entry is removed, then any configuration delete listeners associated
- * with that entry's parent will be invoked.
- */
-package org.opends.server.config;
-
diff --git a/opendj-admin/src/main/java/org/opends/server/api/ConfigAddListener.java b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigAddListener.java
similarity index 95%
rename from opendj-admin/src/main/java/org/opends/server/api/ConfigAddListener.java
rename to opendj-admin/src/main/java/org/opends/server/config/spi/ConfigAddListener.java
index d73b357..92cabc7 100644
--- a/opendj-admin/src/main/java/org/opends/server/api/ConfigAddListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigAddListener.java
@@ -23,11 +23,11 @@
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
  */
-package org.opends.server.api;
+package org.opends.server.config.spi;
 
 import org.forgerock.i18n.LocalizableMessageBuilder;
 import org.forgerock.opendj.ldap.Entry;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.admin.server.ConfigChangeResult;
 
 /**
  * This interface defines the methods that a Directory Server component should
diff --git a/opendj-admin/src/main/java/org/opends/server/api/ConfigChangeListener.java b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigChangeListener.java
similarity index 95%
rename from opendj-admin/src/main/java/org/opends/server/api/ConfigChangeListener.java
rename to opendj-admin/src/main/java/org/opends/server/config/spi/ConfigChangeListener.java
index d84f0d7..08ddf30 100644
--- a/opendj-admin/src/main/java/org/opends/server/api/ConfigChangeListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigChangeListener.java
@@ -23,9 +23,9 @@
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
  */
-package org.opends.server.api;
+package org.opends.server.config.spi;
 
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.admin.server.ConfigChangeResult;
 import org.forgerock.i18n.LocalizableMessageBuilder;
 import org.forgerock.opendj.ldap.Entry;
 
diff --git a/opendj-admin/src/main/java/org/opends/server/api/ConfigDeleteListener.java b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigDeleteListener.java
similarity index 95%
rename from opendj-admin/src/main/java/org/opends/server/api/ConfigDeleteListener.java
rename to opendj-admin/src/main/java/org/opends/server/config/spi/ConfigDeleteListener.java
index a68d098..5a22d47 100644
--- a/opendj-admin/src/main/java/org/opends/server/api/ConfigDeleteListener.java
+++ b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigDeleteListener.java
@@ -23,9 +23,9 @@
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
  */
-package org.opends.server.api;
+package org.opends.server.config.spi;
 
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.admin.server.ConfigChangeResult;
 import org.forgerock.i18n.LocalizableMessageBuilder;
 import org.forgerock.opendj.ldap.Entry;
 
diff --git a/opendj-admin/src/main/java/org/opends/server/config/ConfigException.java b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigException.java
similarity index 98%
rename from opendj-admin/src/main/java/org/opends/server/config/ConfigException.java
rename to opendj-admin/src/main/java/org/opends/server/config/spi/ConfigException.java
index fcb155a..332c916 100644
--- a/opendj-admin/src/main/java/org/opends/server/config/ConfigException.java
+++ b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigException.java
@@ -23,7 +23,7 @@
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
  */
-package org.opends.server.config;
+package org.opends.server.config.spi;
 
 import org.forgerock.i18n.LocalizableException;
 import org.forgerock.i18n.LocalizableMessage;
diff --git a/opendj-admin/src/main/java/org/opends/server/config/ConfigurationRepository.java b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigurationRepository.java
similarity index 96%
rename from opendj-admin/src/main/java/org/opends/server/config/ConfigurationRepository.java
rename to opendj-admin/src/main/java/org/opends/server/config/spi/ConfigurationRepository.java
index 801ad01..36f9f5c 100644
--- a/opendj-admin/src/main/java/org/opends/server/config/ConfigurationRepository.java
+++ b/opendj-admin/src/main/java/org/opends/server/config/spi/ConfigurationRepository.java
@@ -23,15 +23,13 @@
  *
  *      Copyright 2013 ForgeRock AS.
  */
-package org.opends.server.config;
+package org.opends.server.config.spi;
 
 import java.util.List;
 import java.util.Set;
+
 import org.forgerock.opendj.ldap.DN;
 import org.forgerock.opendj.ldap.Entry;
-import org.opends.server.api.ConfigAddListener;
-import org.opends.server.api.ConfigChangeListener;
-import org.opends.server.api.ConfigDeleteListener;
 
 /**
  * Provides configuration entries and listener registration on the entries.
diff --git a/opendj-admin/src/main/java/org/opends/server/api/package-info.java b/opendj-admin/src/main/java/org/opends/server/config/spi/package-info.java
similarity index 97%
rename from opendj-admin/src/main/java/org/opends/server/api/package-info.java
rename to opendj-admin/src/main/java/org/opends/server/config/spi/package-info.java
index 6a59dbc..9f1d67f 100644
--- a/opendj-admin/src/main/java/org/opends/server/api/package-info.java
+++ b/opendj-admin/src/main/java/org/opends/server/config/spi/package-info.java
@@ -40,5 +40,5 @@
  * effects or that does not work properly across different Directory
  * Server versions.
  */
-package org.opends.server.api;
+package org.opends.server.config.spi;
 
diff --git a/opendj-admin/src/main/java/org/opends/server/types/AddressMask.java b/opendj-admin/src/main/java/org/opends/server/types/AddressMask.java
index 06309d1..01a942b 100644
--- a/opendj-admin/src/main/java/org/opends/server/types/AddressMask.java
+++ b/opendj-admin/src/main/java/org/opends/server/types/AddressMask.java
@@ -35,7 +35,7 @@
 import java.util.Collection;
 
 import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * This class defines an address mask, which can be used to perform efficient
diff --git a/opendj-admin/src/main/java/org/opends/server/types/DirectoryEnvironmentConfig.java b/opendj-admin/src/main/java/org/opends/server/types/DirectoryEnvironmentConfig.java
deleted file mode 100644
index 654b202..0000000
--- a/opendj-admin/src/main/java/org/opends/server/types/DirectoryEnvironmentConfig.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2008-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2013 ForgeRock AS.
- */
-package org.opends.server.types;
-
-/**
- * This class provides a set of properties that may control various aspects of
- * the server environment. Note that these properties may only be altered before
- * the Directory Server is started. Any attempt to change an environment
- * configuration property while the server is running will be rejected.
- */
-public final class DirectoryEnvironmentConfig {
-
-    // TODO : implements
-}
diff --git a/opendj-admin/src/main/java/org/opends/server/util/EmbeddedUtils.java b/opendj-admin/src/main/java/org/opends/server/util/EmbeddedUtils.java
deleted file mode 100644
index f78b9b9..0000000
--- a/opendj-admin/src/main/java/org/opends/server/util/EmbeddedUtils.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2008 Sun Microsystems, Inc.
- */
-package org.opends.server.util;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.config.ConfigException;
-import org.opends.server.types.DirectoryEnvironmentConfig;
-import org.opends.server.types.InitializationException;
-
-/**
- * This class provides a number of utility methods for using OpenDS in an
- * embedded manner (i.e., running within the same JVM as another application and
- * controlled by that application).
- */
-public final class EmbeddedUtils {
-    /**
-     * Indicates whether the Directory Server is currently running.
-     *
-     * @return {@code true} if the server is currently running, or {@code false}
-     *         if not.
-     */
-    public static boolean isRunning() {
-        throw new RuntimeException("not implemented");
-    }
-
-    /**
-     * Attempts to start the Directory Server.
-     *
-     * @param config
-     *            The environment configuration to use for the server.
-     * @throws ConfigException
-     *             If a configuration problem is detected during the server
-     *             initialization or startup process.
-     * @throws InitializationException
-     *             If the Directory Server is already running, or if an error
-     *             occurs during server initialization or startup.
-     */
-    public static void startServer(DirectoryEnvironmentConfig config) throws ConfigException, InitializationException {
-        throw new RuntimeException("not implemented");
-    }
-
-    /**
-     * Attempts to stop the Directory Server.
-     *
-     * @param className
-     *            The name of the class that initiated the shutdown.
-     * @param reason
-     *            A message explaining the reason for the shutdown.
-     */
-    public static void stopServer(String className, LocalizableMessage reason) {
-        throw new RuntimeException("not implemented");
-    }
-
-    /**
-     * Attempts to restart the Directory Server. This will perform an in-core
-     * restart in which the existing server instance will be shut down, a new
-     * instance will be created, and it will be reinitialized and restarted.
-     *
-     * @param className
-     *            The name of the class that initiated the restart.
-     * @param reason
-     *            A message explaining the reason for the retart.
-     * @param config
-     *            The environment configuration to use for the new server
-     *            instance.
-     */
-    public static void restartServer(String className, LocalizableMessage reason, DirectoryEnvironmentConfig config) {
-        throw new RuntimeException("not implemented");
-    }
-
-    /**
-     * Sets up a number of internal server data structures to ensure that they
-     * are properly initialized for use. This is necessary if server libraries
-     * are going to be used without the server running (e.g., to facilitate use
-     * in an LDAP client API, for DN processing, etc.). This will have no effect
-     * if the server has already been initialized for client use.
-     */
-    public static void initializeForClientUse() {
-        throw new RuntimeException("not implemented");
-    }
-
-    private EmbeddedUtils() {
-        // no implementation required.
-    }
-
-
-}
diff --git a/opendj-admin/src/main/java/org/opends/server/util/package-info.java b/opendj-admin/src/main/java/org/opends/server/util/package-info.java
deleted file mode 100644
index b0616a3..0000000
--- a/opendj-admin/src/main/java/org/opends/server/util/package-info.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
- */
-/**
- * Contains implementations for various Directory Server utility classes and
- * methods which may be used throughout the server but do not necessarily fit in
- * elsewhere.  Notable utility classes include:
- * <BR>
- * <UL>
- *   <LI>
- *     StaticUtils.java -- a set of static methods that may be called to perform
- *     all kinds of useful operations on data (e.g., get a stack trace from an
- *     exception, or convert the contents of a byte array to a readable form).
- *   </LI>
- *   <LI>
- *     Base64.java -- provides a mechanism for performing base64 encoding and
- *     decoding.
- *   </LI>
- *   <LI>
- *     DynamicConstants.java -- a set of constants that are actually generated
- *     automatically at build time and reflect information about the time and
- *     conditions under which the server was built.
- *   </LI>
- *   <LI>
- *     TimeThread.java -- provides a thread that will periodically retrieve
- *     the current time and format it in several common methods in an attempt to
- *     minimize the need to have multiple calls to
- *     <CODE>System.currentTimeMillis()</CODE> or <CODE>new Date()</CODE>
- *     whenever the time is needed.  This thread updates internal variables
- *     several times each second, which should be sufficient for cases in which
- *     high-resolution timing is not required.
- *   </LI>
- * </UL>
- */
-package org.opends.server.util;
-
diff --git a/opendj-admin/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java b/opendj-admin/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java
index becb591..32f2082 100644
--- a/opendj-admin/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java
+++ b/opendj-admin/src/test/java/org/forgerock/opendj/config/ConfigurationMock.java
@@ -144,7 +144,7 @@
          */
         @SuppressWarnings("unchecked")
         private <T> Object getDefaultValue(ManagedObjectDefinition<?, ?> definition,
-                Method getPropertyDefMethod, @SuppressWarnings("unused") Class<T> propertyReturnClass)
+                Method getPropertyDefMethod, Class<T> propertyReturnClass)
                 throws Exception {
             PropertyDefinition<T> propertyDefinition = (PropertyDefinition<T>) getPropertyDefMethod.invoke(definition);
             DefaultBehaviorProvider<T> defaultBehaviorProvider = (DefaultBehaviorProvider<T>) propertyDefinition
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/AdminTestCase.java b/opendj-admin/src/test/java/org/opends/server/admin/AdminTestCase.java
index 3a138a0..52a1f79 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/AdminTestCase.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/AdminTestCase.java
@@ -33,12 +33,13 @@
 import org.forgerock.opendj.ldif.LDIF;
 import org.opends.server.admin.server.ServerManagedObject;
 import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.config.ConfigurationRepository;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.testng.annotations.Test;
 
 /**
  * An abstract class that all admin unit tests should extend.
  */
+@SuppressWarnings("javadoc")
 @Test(groups = { "precommit", "admin" }, singleThreaded = true)
 public abstract class AdminTestCase extends ConfigTestCase {
 
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java b/opendj-admin/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java
index e9fab8c..c3fa2e8 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/ClassPropertyDefinitionTest.java
@@ -131,7 +131,6 @@
             { "java.lang.Runnable", "java.lang.String", Number.class, Number.class }, };
     }
 
-    @SuppressWarnings("unused")
     @Test(dataProvider = "loadClassesIllegal", expectedExceptions = { IllegalPropertyValueException.class })
     public <T> void testLoadClassIllegal(String interfaceName, String loadClassName, Class<T> instanceOfClass,
             Class<?> expectedClass) {
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfg.java b/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfg.java
index 31d6766..fbe3e84 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfg.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfg.java
@@ -32,7 +32,7 @@
 import org.opends.server.admin.server.ConfigurationAddListener;
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.server.ConfigurationDeleteListener;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * A server-side interface for querying Test Parent settings.
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfgDefn.java b/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfgDefn.java
index c138ebb..ab68c16 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfgDefn.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/TestParentCfgDefn.java
@@ -41,7 +41,7 @@
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.server.ConfigurationDeleteListener;
 import org.opends.server.admin.server.ServerManagedObject;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * An interface for querying the Test Parent managed object definition meta
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java b/opendj-admin/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java
index 51031c1..dcd5085 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/server/AdminTestCaseUtils.java
@@ -35,7 +35,7 @@
 import org.opends.server.admin.ManagedObjectPath;
 import org.opends.server.admin.RelationDefinition;
 import org.opends.server.admin.SingletonRelationDefinition;
-import org.opends.server.config.ConfigException;
+import org.opends.server.config.spi.ConfigException;
 
 /**
  * This class defines some utility functions which can be used by test cases
@@ -61,6 +61,7 @@
      *
      * @param <S>
      *            The type of server configuration to be decoded.
+     * @param context The server management context.
      * @param definition
      *            The required definition of the required managed object.
      * @param entry
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/server/AggregationServerTest.java b/opendj-admin/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
index d87ceb7..1edf139 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/server/AggregationServerTest.java
@@ -58,11 +58,10 @@
 import org.opends.server.admin.TestParentCfg;
 import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
 import org.opends.server.admin.condition.Conditions;
-import org.opends.server.api.ConfigChangeListener;
-import org.opends.server.api.ConfigDeleteListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigChangeListener;
+import org.opends.server.config.spi.ConfigDeleteListener;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/server/ConstraintTest.java b/opendj-admin/src/test/java/org/opends/server/admin/server/ConstraintTest.java
index ae44610..18299b3 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/server/ConstraintTest.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/server/ConstraintTest.java
@@ -44,12 +44,11 @@
 import org.opends.server.admin.TestChildCfg;
 import org.opends.server.admin.TestChildCfgDefn;
 import org.opends.server.admin.TestParentCfg;
-import org.opends.server.api.ConfigAddListener;
-import org.opends.server.api.ConfigChangeListener;
-import org.opends.server.api.ConfigDeleteListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigAddListener;
+import org.opends.server.config.spi.ConfigChangeListener;
+import org.opends.server.config.spi.ConfigDeleteListener;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java b/opendj-admin/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
index dade4fb..2ba1721 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/server/DefaultBehaviorTest.java
@@ -48,10 +48,9 @@
 import org.opends.server.admin.TestCfg;
 import org.opends.server.admin.TestChildCfg;
 import org.opends.server.admin.TestParentCfg;
-import org.opends.server.api.ConfigAddListener;
-import org.opends.server.api.ConfigChangeListener;
-import org.opends.server.config.ConfigurationRepository;
-import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.config.spi.ConfigAddListener;
+import org.opends.server.config.spi.ConfigChangeListener;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/server/ListenerTest.java b/opendj-admin/src/test/java/org/opends/server/admin/server/ListenerTest.java
index dda5322..135de3f 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/server/ListenerTest.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/server/ListenerTest.java
@@ -39,11 +39,11 @@
 import org.opends.server.admin.PropertyDefinitionsOptions;
 import org.opends.server.admin.TestCfg;
 import org.opends.server.admin.TestParentCfg;
-import org.opends.server.api.ConfigAddListener;
-import org.opends.server.api.ConfigChangeListener;
-import org.opends.server.api.ConfigDeleteListener;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
+import org.opends.server.config.spi.ConfigAddListener;
+import org.opends.server.config.spi.ConfigChangeListener;
+import org.opends.server.config.spi.ConfigDeleteListener;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
diff --git a/opendj-admin/src/test/java/org/opends/server/admin/server/MockConstraint.java b/opendj-admin/src/test/java/org/opends/server/admin/server/MockConstraint.java
index 0ac64e9..ac132b1 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/server/MockConstraint.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/server/MockConstraint.java
@@ -32,8 +32,8 @@
 import org.forgerock.opendj.ldap.DN;
 import org.opends.server.admin.Constraint;
 import org.opends.server.admin.client.ClientConstraintHandler;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.ConfigurationRepository;
+import org.opends.server.config.spi.ConfigException;
+import org.opends.server.config.spi.ConfigurationRepository;
 import org.testng.Assert;
 
 /**

--
Gitblit v1.10.0