mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
14.53.2014 23ab7b85e3631cb4c75a6f9277c1d1aa7a7bfbd6
opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/AbstractBuildMojo.java
File was deleted
opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/GenerateConfigMojo.java
New file
@@ -0,0 +1,448 @@
/*
 * 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 2013 ForgeRock AS.
 */
package org.forgerock.opendj.maven;
import java.io.File;
import java.io.FileFilter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.JarURLConnection;
import java.net.URL;
import java.util.Enumeration;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import javax.xml.transform.Source;
import javax.xml.transform.Templates;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.URIResolver;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
/**
 * Generate configuration classes from XML definition files for OpenDJ server.
 * <p>
 * There is a single goal that generate java sources, manifest files, I18N
 * messages and cli/ldap profiles. Resources will be looked for in the following
 * places depending on whether the plugin is executing for the core config or an
 * extension:
 * <table border="1">
 * <tr>
 * <th></th>
 * <th>Location</th>
 * </tr>
 * <tr>
 * <th align="left">XSLT stylesheets</th>
 * <td>Internal: /config/stylesheets</td>
 * </tr>
 * <tr>
 * <th align="left">XML core definitions</th>
 * <td>Internal: /config/xml</td>
 * </tr>
 * <tr>
 * <th align="left">XML extension definitions</th>
 * <td>${basedir}/src/main/java</td>
 * </tr>
 * <tr>
 * <th align="left">Generated Java APIs</th>
 * <td>${project.build.directory}/generated-sources/config</td>
 * </tr>
 * <tr>
 * <th align="left">Generated I18N messages</th>
 * <td>${project.build.outputDirectory}/config/messages</td>
 * </tr>
 * <tr>
 * <th align="left">Generated profiles</th>
 * <td>${project.build.outputDirectory}/config/profiles/${profile}</td>
 * </tr>
 * <tr>
 * <th align="left">Generated manifest</th>
 * <td>${project.build.outputDirectory}/META-INF/services/org.forgerock.opendj.
 * config.AbstractManagedObjectDefinition</td>
 * </tr>
 * </table>
 *
 * @Checkstyle:ignoreFor 3
 * @goal generate
 * @phase generate-sources
 * @requiresDependencyResolution compile+runtime
 */
public final class GenerateConfigMojo extends AbstractMojo {
    private static interface StreamSourceFactory {
        StreamSource newStreamSource() throws IOException;
    }
    /**
     * The Maven Project.
     *
     * @parameter property="project"
     * @required
     * @readonly
     */
    private MavenProject project;
    /**
     * Package name for which artifacts are generated.
     * <p>
     * This relative path is used to locate xml definition files and to locate
     * generated artifacts.
     *
     * @parameter
     * @required
     */
    private String packageName;
    /**
     * Package name for which artifacts are generated.
     * <p>
     * This relative path is used to locate xml definition files and to locate
     * generated artifacts.
     *
     * @parameter default-value="true"
     * @required
     */
    private Boolean isExtension;
    private final Map<String, StreamSourceFactory> componentDescriptors =
            new LinkedHashMap<String, StreamSourceFactory>();
    private TransformerFactory stylesheetFactory;
    private Templates stylesheetMetaJava;
    private Templates stylesheetServerJava;
    private Templates stylesheetClientJava;
    private Templates stylesheetMetaPackageInfo;
    private Templates stylesheetServerPackageInfo;
    private Templates stylesheetClientPackageInfo;
    private Templates stylesheetProfileLDAP;
    private Templates stylesheetProfileCLI;
    private Templates stylesheetMessages;
    private Templates stylesheetManifest;
    private final List<Future<?>> tasks = new LinkedList<Future<?>>();
    private final ExecutorService executor = Executors.newCachedThreadPool();
    private final URIResolver resolver = new URIResolver() {
        @Override
        public synchronized Source resolve(final String href, final String base)
                throws TransformerException {
            if (href.endsWith(".xsl")) {
                final String stylesheet;
                if (href.startsWith("../")) {
                    stylesheet = "/config/stylesheets/" + href.substring(3);
                } else {
                    stylesheet = "/config/stylesheets/" + href;
                }
                getLog().debug("#### Resolved stylesheet " + href + " to " + stylesheet);
                return new StreamSource(getClass().getResourceAsStream(stylesheet));
            } else if (href.endsWith(".xml")) {
                if (href.startsWith("org/forgerock/opendj/server/config/")) {
                    final String coreXML = "/config/xml/" + href;
                    getLog().debug("#### Resolved core XML definition " + href + " to " + coreXML);
                    return new StreamSource(getClass().getResourceAsStream(coreXML));
                } else {
                    final String extXML = getXMLDirectory() + "/" + href;
                    getLog().debug(
                            "#### Resolved extension XML definition " + href + " to " + extXML);
                    return new StreamSource(new File(extXML));
                }
            } else {
                throw new TransformerException("Unable to resolve URI " + href);
            }
        }
    };
    @Override
    public final void execute() throws MojoExecutionException {
        if (getPackagePath() == null) {
            throw new MojoExecutionException("<packagePath> must be set.");
        } else if (!isXMLPackageDirectoryValid()) {
            throw new MojoExecutionException("The XML definition directory \""
                    + getXMLPackageDirectory() + "\" does not exist.");
        } else if (getClass().getResource(getStylesheetDirectory()) == null) {
            throw new MojoExecutionException("The XSLT stylesheet directory \""
                    + getStylesheetDirectory() + "\" does not exist.");
        }
        // Validate and transform.
        try {
            initializeStylesheets();
            loadXMLDescriptors();
            executeValidateXMLDefinitions();
            executeTransformXMLDefinitions();
            getLog().info(
                    "Adding source directory \"" + getGeneratedSourcesDirectory()
                            + "\" to build path...");
            project.addCompileSourceRoot(getGeneratedSourcesDirectory());
        } catch (final Exception e) {
            throw new MojoExecutionException("XSLT configuration transformation failed", e);
        } finally {
            executor.shutdown();
        }
    }
    private void createTransformTask(final StreamSource input, final StreamResult output,
            final Templates stylesheet, final ExecutorService executor, final String... parameters)
            throws Exception {
        final Transformer transformer = stylesheet.newTransformer();
        transformer.setURIResolver(resolver);
        for (int i = 0; i < parameters.length; i += 2) {
            transformer.setParameter(parameters[i], parameters[i + 1]);
        }
        final Future<Void> future = executor.submit(new Callable<Void>() {
            @Override
            public Void call() throws Exception {
                transformer.transform(input, output);
                return null;
            }
        });
        tasks.add(future);
    }
    private void createTransformTask(final StreamSource input, final String outputFileName,
            final Templates stylesheet, final String... parameters) throws Exception {
        final File outputFile = new File(outputFileName);
        outputFile.getParentFile().mkdirs();
        final StreamResult output = new StreamResult(outputFile);
        createTransformTask(input, output, stylesheet, executor, parameters);
    }
    private void executeTransformXMLDefinitions() throws Exception {
        getLog().info("Transforming XML definitions...");
        /*
         * The manifest is a single file containing the concatenated output of
         * many transformations. Therefore we must ensure that output is
         * serialized by using a single threaded executor.
         */
        final ExecutorService sequentialExecutor = Executors.newSingleThreadExecutor();
        final File manifestFile = new File(getGeneratedManifestFile());
        manifestFile.getParentFile().mkdirs();
        final FileOutputStream manifestFileOutputStream = new FileOutputStream(manifestFile);
        final StreamResult manifest = new StreamResult(manifestFileOutputStream);
        /*
         * Generate Java classes and resources for each XML definition.
         */
        final String javaDir = getGeneratedSourcesDirectory() + "/" + getPackagePath() + "/";
        final String metaDir = javaDir + "meta/";
        final String serverDir = javaDir + "server/";
        final String clientDir = javaDir + "client/";
        final String ldapProfileDir =
                getGeneratedProfilesDirectory("ldap") + "/" + getPackagePath() + "/meta/";
        final String cliProfileDir =
                getGeneratedProfilesDirectory("cli") + "/" + getPackagePath() + "/meta/";
        final String i18nDir = getGeneratedMessagesDirectory() + "/" + getPackagePath() + "/meta/";
        for (final Map.Entry<String, StreamSourceFactory> entry : componentDescriptors.entrySet()) {
            final String meta = metaDir + entry.getKey() + "CfgDefn.java";
            createTransformTask(entry.getValue().newStreamSource(), meta, stylesheetMetaJava);
            final String server = serverDir + entry.getKey() + "Cfg.java";
            createTransformTask(entry.getValue().newStreamSource(), server, stylesheetServerJava);
            final String client = clientDir + entry.getKey() + "CfgClient.java";
            createTransformTask(entry.getValue().newStreamSource(), client, stylesheetClientJava);
            final String ldap = ldapProfileDir + entry.getKey() + "CfgDefn.properties";
            createTransformTask(entry.getValue().newStreamSource(), ldap, stylesheetProfileLDAP);
            final String cli = cliProfileDir + entry.getKey() + "CfgDefn.properties";
            createTransformTask(entry.getValue().newStreamSource(), cli, stylesheetProfileCLI);
            final String i18n = i18nDir + entry.getKey() + "CfgDefn.properties";
            createTransformTask(entry.getValue().newStreamSource(), i18n, stylesheetMessages);
            createTransformTask(entry.getValue().newStreamSource(), manifest, stylesheetManifest,
                    sequentialExecutor);
        }
        // Generate package-info.java files.
        final Map<String, Templates> profileMap = new LinkedHashMap<String, Templates>();
        profileMap.put("meta", stylesheetMetaPackageInfo);
        profileMap.put("server", stylesheetServerPackageInfo);
        profileMap.put("client", stylesheetClientPackageInfo);
        for (final Map.Entry<String, Templates> entry : profileMap.entrySet()) {
            final StreamSource source;
            if (isExtension) {
                source = new StreamSource(new File(getXMLPackageDirectory() + "/Package.xml"));
            } else {
                source =
                        new StreamSource(getClass().getResourceAsStream(
                                "/" + getXMLPackageDirectory() + "/Package.xml"));
            }
            final String profile = javaDir + "/" + entry.getKey() + "/package-info.java";
            createTransformTask(source, profile, entry.getValue(), "type", entry.getKey());
        }
        // Wait for all transformations to complete and cleanup.
        for (final Future<?> task : tasks) {
            task.get();
        }
        sequentialExecutor.shutdown();
        manifestFileOutputStream.close();
    }
    private void executeValidateXMLDefinitions() {
        // TODO:
        getLog().info("Validating XML definitions...");
    }
    private String getBaseDir() {
        return project.getBasedir().toString();
    }
    private String getGeneratedManifestFile() {
        return project.getBuild().getOutputDirectory()
                + "/META-INF/services/org.forgerock.opendj.config.AbstractManagedObjectDefinition";
    }
    private String getGeneratedMessagesDirectory() {
        return project.getBuild().getOutputDirectory() + "/config/messages";
    }
    private String getGeneratedProfilesDirectory(final String profileName) {
        return project.getBuild().getOutputDirectory() + "/config/profiles/" + profileName;
    }
    private String getGeneratedSourcesDirectory() {
        return project.getBuild().getDirectory() + "/generated-sources/config";
    }
    private String getPackagePath() {
        return packageName.replace('.', '/');
    }
    private String getStylesheetDirectory() {
        return "/config/stylesheets";
    }
    private String getXMLDirectory() {
        if (isExtension) {
            return getBaseDir() + "/src/main/java";
        } else {
            return "config/xml";
        }
    }
    private String getXMLPackageDirectory() {
        return getXMLDirectory() + "/" + getPackagePath();
    }
    private void initializeStylesheets() throws TransformerConfigurationException {
        getLog().info("Loading XSLT stylesheets...");
        stylesheetFactory = TransformerFactory.newInstance();
        stylesheetFactory.setURIResolver(resolver);
        stylesheetMetaJava = loadStylesheet("metaMO.xsl");
        stylesheetMetaPackageInfo = loadStylesheet("package-info.xsl");
        stylesheetServerJava = loadStylesheet("serverMO.xsl");
        stylesheetServerPackageInfo = loadStylesheet("package-info.xsl");
        stylesheetClientJava = loadStylesheet("clientMO.xsl");
        stylesheetClientPackageInfo = loadStylesheet("package-info.xsl");
        stylesheetProfileLDAP = loadStylesheet("ldapMOProfile.xsl");
        stylesheetProfileCLI = loadStylesheet("cliMOProfile.xsl");
        stylesheetMessages = loadStylesheet("messagesMO.xsl");
        stylesheetManifest = loadStylesheet("manifestMO.xsl");
    }
    private boolean isXMLPackageDirectoryValid() {
        if (isExtension) {
            return new File(getXMLPackageDirectory()).isDirectory();
        } else {
            // Not an extension, so always valid.
            return true;
        }
    }
    private Templates loadStylesheet(final String stylesheet)
            throws TransformerConfigurationException {
        final Source xslt =
                new StreamSource(getClass().getResourceAsStream(
                        getStylesheetDirectory() + "/" + stylesheet));
        return stylesheetFactory.newTemplates(xslt);
    }
    private void loadXMLDescriptors() throws IOException {
        getLog().info("Loading XML descriptors...");
        final String parentPath = getXMLPackageDirectory();
        if (isExtension) {
            final File dir = new File(parentPath);
            dir.listFiles(new FileFilter() {
                @Override
                public boolean accept(final File path) {
                    final String name = path.getName();
                    if (path.isFile() && name.endsWith("Configuration.xml")) {
                        final String key =
                                name.substring(0, name.length() - "Configuration.xml".length());
                        componentDescriptors.put(key, new StreamSourceFactory() {
                            @Override
                            public StreamSource newStreamSource() {
                                return new StreamSource(path);
                            }
                        });
                    }
                    return true; // Don't care about the result.
                }
            });
        } else {
            final URL dir = getClass().getClassLoader().getResource(parentPath);
            final JarURLConnection connection = (JarURLConnection) dir.openConnection();
            final JarFile jar = connection.getJarFile();
            final Enumeration<JarEntry> entries = jar.entries();
            while (entries.hasMoreElements()) {
                final JarEntry entry = entries.nextElement();
                final String name = entry.getName();
                if (name.startsWith(parentPath) && name.endsWith("Configuration.xml")) {
                    final int startPos = name.lastIndexOf('/') + 1;
                    final int endPos = name.length() - "Configuration.xml".length();
                    final String key = name.substring(startPos, endPos);
                    componentDescriptors.put(key, new StreamSourceFactory() {
                        @Override
                        public StreamSource newStreamSource() throws IOException {
                            return new StreamSource(jar.getInputStream(entry));
                        }
                    });
                }
            }
        }
        getLog().info("Found " + componentDescriptors.size() + " XML descriptors");
    }
}
opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/OpendjConfigMojo.java
File was deleted
opendj-config-maven-plugin/src/main/resources/config/stylesheets/abbreviations.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/admin-cli.xsd
opendj-config-maven-plugin/src/main/resources/config/stylesheets/admin-ldap.xsd
opendj-config-maven-plugin/src/main/resources/config/stylesheets/admin-preprocessor.xsd
opendj-config-maven-plugin/src/main/resources/config/stylesheets/admin.xsd
opendj-config-maven-plugin/src/main/resources/config/stylesheets/catalog.xml
opendj-config-maven-plugin/src/main/resources/config/stylesheets/cliMOProfile.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/clientMO.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/conditions.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/java-utilities.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/ldapMOProfile.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/manifestMO.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/messagesMO.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/metaMO.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/package-info.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/preprocessor.xsl
File was renamed from opendj-config/src/main/resources/config/stylesheets/preprocessor.xsl
@@ -27,15 +27,14 @@
<xsl:stylesheet version="1.0" xmlns:adm="http://opendj.forgerock.org/admin"
  xmlns:admpp="http://opendj.forgerock.org/admin-preprocessor"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exsl="http://exslt.org/common"
  xmlns:file="xalan://java.io.File">
  xmlns:exsl="http://exslt.org/common">
  <xsl:import href="java-utilities.xsl" />
  <xsl:output method="xml" indent="yes" />
  <!--
    Global parameter: the absolute path of the base directory where
    XML managed object definitions can be found.
  -->
  <xsl:param name="base-dir" select="'src/main/java'" />
  <xsl:param name="base-dir" select="''" />
  <!-- 
    Get an absolute URI from a package, object name, and suffix.
  -->
@@ -58,10 +57,7 @@
    <!--
      Get the absolute path.
    -->
    <xsl:variable name="base-file" select="file:new($base-dir)" />
    <xsl:variable name="base-dir-uri" select="file:toURI($base-file)" />
    <xsl:value-of
      select="concat($base-dir-uri, '/', $rpath, '/', $java-name, $suffix)" />
    <xsl:value-of select="concat($base-dir, $rpath, '/', $java-name, $suffix)" />
  </xsl:template>
  <!--
    Get the URI of the named package definition.
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/aci.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/aggregation.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/attribute-type.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/boolean.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/dn.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/duration.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/enumeration.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/extensible-matching-rule-type.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/integer.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/ip-address-mask.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/ip-address.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/java-class.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/oid.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/password.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/size.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/property-types/string.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/serverMO.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/text-utilities.xsl
opendj-config-maven-plugin/src/main/resources/config/stylesheets/xml.xsd
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AESPasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AccessControlHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AccessLogFilteringCriteriaConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AccessLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AccountStatusNotificationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AdministrationConnectorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AlertHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AnonymousSASLMechanismHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeCleanupPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeSyntaxConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeValuePasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AuthenticationPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/Base64PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BlindTrustManagerProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BlowfishPasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CancelExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CertificateAttributeSyntaxConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CertificateMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ChangeNumberControlPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CharacterSetPasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ClearPasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ClientConnectionMonitorProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CollationMatchingRuleConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CollectiveAttributeSubentriesVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ConfigFileHandlerBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ConnectionHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CountryStringAttributeSyntaxConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CramMD5SASLMechanismHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CryptPasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CryptoManagerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DebugLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DebugTargetConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DictionaryPasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DigestMD5SASLMechanismHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DirectoryStringAttributeSyntaxConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DseeCompatAccessControlHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DynamicGroupImplementationConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/EntityTagVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/EntryCacheConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/EntryCacheMonitorProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/EntryDNVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/EntryUUIDPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/EntryUUIDVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ErrorLogAccountStatusNotificationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ErrorLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ExactMatchIdentityMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ExtensionConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ExternalChangelogDomainConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ExternalSASLMechanismHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FIFOEntryCacheConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedAccessLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedAuditLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedDebugLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedErrorLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedHTTPAccessLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedKeyManagerProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedTrustManagerProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileCountLogRetentionPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileSystemEntryCacheConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FingerprintCertificateMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FixedTimeLogRotationPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FractionalLDIFImportPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FreeDiskSpaceLogRetentionPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GSSAPISASLMechanismHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GetConnectionIdExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GetSymmetricKeyExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GlobalConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GoverningStructureRuleVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GroupImplementationConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/HTTPAccessLogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/HTTPConnectionHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/HasSubordinatesVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/IdentityMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/IsMemberOfVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/JMXAlertHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/JMXConnectionHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/JPEGAttributeSyntaxConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/KeyManagerProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPAttributeDescriptionListPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPConnectionHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDIFConnectionHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LastModPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LengthBasedPasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalDBBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalDBIndexConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalDBVLVIndexConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LogPublisherConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LogRetentionPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LogRotationPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MD5PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MatchingRuleConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemberVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemoryUsageMonitorProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MonitorProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NetworkGroupPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NullBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NumSubordinatesVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PBKDF2PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PKCS11KeyManagerProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/Package.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ParallelWorkQueueConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordExpirationTimeVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordGeneratorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordModifyExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordPolicyImportPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordPolicyStateExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordPolicySubentryVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PlainSASLMechanismHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluginRootConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ProfilerPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/QOSPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RC4PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RandomPasswordGeneratorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ReferentialIntegrityPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RegularExpressionIdentityMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RepeatedCharactersPasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ReplicationDomainConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ReplicationServerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ReplicationSynchronizationProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RequestFilteringQOSPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ResourceLimitsQOSPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootDNConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootDNUserConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootDSEBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SASLMechanismHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SHA1PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SMTPAccountStatusNotificationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SMTPAlertHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SNMPConnectionHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SaltedMD5PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SaltedSHA1PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SaltedSHA256PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SaltedSHA384PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SaltedSHA512PasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SambaPasswordPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SevenBitCleanPluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SimilarityBasedPasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SizeLimitLogRetentionPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SizeLimitLogRotationPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SoftReferenceEntryCacheConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/StackTraceMonitorProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/StartTLSExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/StaticGroupImplementationConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/StructuralObjectClassVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SubjectAttributeToUserAttributeCertificateMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SubjectDNToUserAttributeCertificateMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SubjectEqualsDNCertificateMapperConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SubschemaSubentryVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SynchronizationProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SystemInfoMonitorProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TelephoneNumberAttributeSyntaxConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TimeLimitLogRotationPolicyConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TraditionalWorkQueueConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TripleDESPasswordStorageSchemeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TrustManagerProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/UniqueAttributePluginConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/UniqueCharactersPasswordValidatorConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/UserDefinedVirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/VersionMonitorProviderConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/VirtualAttributeConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/VirtualStaticGroupImplementationConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WhoAmIExtendedOperationHandlerConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkQueueConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowConfiguration.xml
opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml
opendj-server-example-plugin/pom.xml
@@ -33,7 +33,7 @@
    <version>3.0.0-SNAPSHOT</version>
  </parent>
  <artifactId>opendj-server-example-plugin</artifactId>
  <name>Example OpenDJ Server Plugin</name>
  <name>OpenDJ Server Example Plugin</name>
  <description> 
    An example OpenDJ Server plugin illustrating how custom components may be developed for OpenDJ.
  </description>
@@ -91,8 +91,6 @@
            </goals>
            <configuration>
              <packageName>com.example.opendj</packageName>
              <xslDir>config/stylesheets</xslDir>
              <xmlDefinitionsRootDir>${basedir}/src/main/java</xmlDefinitionsRootDir>
            </configuration>
          </execution>
        </executions>
opendj-server-example-plugin/src/main/java/com/example/opendj/ExamplePlugin.java
@@ -26,26 +26,24 @@
 */
package com.example.opendj;
import static com.example.opendj.ExamplePluginMessages.*;
import java.util.List;
import java.util.Set;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.config.server.ConfigChangeResult;
import org.forgerock.opendj.config.server.ConfigException;
import org.forgerock.opendj.config.server.ConfigurationChangeListener;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.server.config.meta.PluginCfgDefn.PluginType;
import org.opends.server.types.InitializationException;
import com.example.opendj.server.ExamplePluginCfg;
/**
 * The example plugin implementation class. This plugin will output the
 * configured message to the error log during server start up.
 */
public class ExamplePlugin implements ConfigurationChangeListener<ExamplePluginCfg> {
    // FIXME: fill in the remainder of this class once the server plugin API is migrated.
    // The current configuration.
    @SuppressWarnings("unused")
    private ExamplePluginCfg config;
    /**
@@ -56,72 +54,12 @@
    }
    /**
     * Performs any initialization necessary for this plugin. This will be
     * called as soon as the plugin has been loaded and before it is registered
     * with the server.
     *
     * @param pluginTypes
     *            The set of plugin types that indicate the ways in which this
     *            plugin will be invoked.
     * @param configuration
     *            The configuration for this plugin.
     * @throws ConfigException
     *             If the provided entry does not contain a valid configuration
     *             for this plugin.
     * @throws InitializationException
     *             If a problem occurs while initializing the plugin that is not
     *             related to the server configuration.
     */
    @Override()
    public void initializePlugin(Set<PluginType> pluginTypes, ExamplePluginCfg configuration)
            throws ConfigException, InitializationException {
        // This plugin may only be used as a server startup plugin.
        for (PluginType t : pluginTypes) {
            switch (t) {
            case STARTUP:
                // This is fine.
                break;
            default:
                LocalizableMessage message = SEVERE_ERR_INITIALIZE_PLUGIN.get(String.valueOf(t));
                throw new ConfigException(message);
            }
        }
        // Register change listeners. These are not really necessary for
        // this plugin since it is only used during server start-up.
        configuration.addExampleChangeListener(this);
        // Save the configuration.
        this.config = configuration;
    }
    /**
     * Performs any processing that should be done when the Directory Server is
     * in the process of starting. This method will be called after virtually
     * all other initialization has been performed but before the connection
     * handlers are started.
     *
     * @return The result of the startup plugin processing.
     * {@inheritDoc}
     */
    @Override
    public PluginResult.Startup doStartup() {
        // Log the provided message.
        LocalizableMessage message = NOTICE_DO_STARTUP.get(String.valueOf(config.getMessage()));
        logError(message);
        return PluginResult.Startup.continueStartup();
    }
    public ConfigChangeResult applyConfigurationChange(ExamplePluginCfg config) {
    public ConfigChangeResult applyConfigurationChange(final ExamplePluginCfg config) {
        // The new configuration has already been validated.
        // Log a message to say that the configuration has changed. This
        // isn't necessary, but we'll do it just to show that the change
        // has taken effect.
        LocalizableMessage message =
                NOTICE_APPLY_CONFIGURATION_CHANGE.get(String.valueOf(this.config.getMessage()),
                        String.valueOf(config.getMessage()));
        logError(message);
        // Update the configuration.
        this.config = config;
@@ -129,11 +67,16 @@
        return new ConfigChangeResult(ResultCode.SUCCESS, false);
    }
    public boolean isConfigurationChangeAcceptable(ExamplePluginCfg config,
            List<LocalizableMessage> messages) {
        // The only thing that can be validated here is the plugin's
        // message. However, it is always going to be valid, so let's
        // always return true.
    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isConfigurationChangeAcceptable(final ExamplePluginCfg config,
            final List<LocalizableMessage> messages) {
        /*
         * The only thing that can be validated here is the plugin's message.
         * However, it is always going to be valid, so let's always return true.
         */
        return true;
    }
}
opendj-server/pom.xml
@@ -33,7 +33,7 @@
    <version>3.0.0-SNAPSHOT</version>
  </parent>
  <artifactId>opendj-server</artifactId>
  <name>OpenDJ LDAP Directory Server</name>
  <name>OpenDJ Server</name>
  <description> 
    This module includes the core functionality of the OpenDJ LDAP Directory Server.
  </description>
pom.xml
@@ -92,13 +92,15 @@
    <module>opendj-config-maven-plugin</module>
    <module>opendj-core</module>
    <module>opendj-grizzly</module>
   <!-- <module>opendj-config</module> -->
    <module>opendj-config</module>
    <module>opendj-ldap-sdk</module>
    <module>opendj-ldap-toolkit</module>
    <module>opendj-ldap-sdk-examples</module>
    <module>opendj-rest2ldap</module>
    <module>opendj-rest2ldap-servlet</module>
    <module>opendj-server2x-adapter</module>
    <module>opendj-server</module>
    <module>opendj-server-example-plugin</module>
  </modules>
  <properties>
    <mavenRepoSnapshots>http://maven.forgerock.org/repo/snapshots</mavenRepoSnapshots>