directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1045264 - in /directory/studio/trunk/plugins/apacheds.configuration.v2: ./ src/main/java/org/apache/directory/studio/apacheds/configuration/v2/actions/ src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ src/main/ja...
Date Mon, 13 Dec 2010 17:55:57 GMT
Author: pamarcelot
Date: Mon Dec 13 17:55:56 2010
New Revision: 1045264

URL: http://svn.apache.org/viewvc?rev=1045264&view=rev
Log:
Handling of 'save' and 'save as' actions.
Load is still limited to new default configuration files (handling for other types of inputs needs to be done).

Added:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/NewServerConfigurationInput.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/configuration/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/configuration/v2/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/configuration/v2/config.ldif
Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml
    directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/actions/OpenConfigurationAction.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorPage.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml?rev=1045264&r1=1045263&r2=1045264&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml Mon Dec 13 17:55:56 2010
@@ -26,8 +26,7 @@
             default="false"
             icon="resources/icons/editor.gif"
             id="%Editor_ServerConfigurationEditor_id"
-            name="%Editor_ServerConfigurationEditor_name"
-            filenames="config.ldif">
+            name="%Editor_ServerConfigurationEditor_name">
          <contentTypeBinding
                contentTypeId="%ContentType_ServerConfiguration_id">
          </contentTypeBinding>

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml?rev=1045264&r1=1045263&r2=1045264&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml Mon Dec 13 17:55:56 2010
@@ -118,13 +118,15 @@
  org.apache.directory.shared.ldap;bundle-version="${org.apache.directory.shared.validversion}",
  org.apache.directory.shared.ldap.schema;bundle-version="${org.apache.directory.shared.validversion}",
  org.apache.directory.studio.common.core,
+ org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
  org.eclipse.core.contenttype,
  org.eclipse.core.runtime,
  org.eclipse.core.resources,
  org.eclipse.ui,
- org.eclipse.ui.forms</Require-Bundle>
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide</Require-Bundle>
             <Export-Package>org.apache.directory.studio.apacheds.configuration.v2*</Export-Package>
             <Import-Package>!</Import-Package>
             <Private-Package>!</Private-Package>
@@ -197,6 +199,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.directory.studio</groupId>
+      <artifactId>common.ui</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.studio</groupId>
       <artifactId>connection.core</artifactId>
       <scope>provided</scope>
     </dependency>

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/actions/OpenConfigurationAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/actions/OpenConfigurationAction.java?rev=1045264&r1=1045263&r2=1045264&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/actions/OpenConfigurationAction.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/actions/OpenConfigurationAction.java Mon Dec 13 17:55:56 2010
@@ -33,6 +33,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
+import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
+import org.apache.directory.studio.apacheds.configuration.v2.editor.NewServerConfigurationInput;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ServerConfigurationEditor;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ServerConfigurationInput;
 import org.eclipse.jface.action.IAction;
@@ -61,8 +63,7 @@ public class OpenConfigurationAction imp
             IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
             try
             {
-                page.openEditor( new ServerConfigurationInput(),
-                    ServerConfigurationEditor.ID );
+                page.openEditor( new NewServerConfigurationInput(), ServerConfigurationEditor.ID );
             }
             catch ( PartInitException e )
             {

Added: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/NewServerConfigurationInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/NewServerConfigurationInput.java?rev=1045264&view=auto
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/NewServerConfigurationInput.java (added)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/NewServerConfigurationInput.java Mon Dec 13 17:55:56 2010
@@ -0,0 +1,88 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.v2.editor;
+
+
+import org.apache.directory.server.config.beans.ConfigBean;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+
+/**
+ * This class represents the Non Existing Server Configuration Input.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class NewServerConfigurationInput implements IEditorInput
+{
+    /**
+     * {@inheritDoc}
+     */
+    public String getToolTipText()
+    {
+        return "New ApacheDS 2.0 configuration file";
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName()
+    {
+        return "New ApacheDS 2.0 configuration file";
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean exists()
+    {
+        return true;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ImageDescriptor getImageDescriptor()
+    {
+        return null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public IPersistableElement getPersistable()
+    {
+        return null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object getAdapter( Class adapter )
+    {
+        return null;
+    }
+}

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java?rev=1045264&r1=1045263&r2=1045264&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java Mon Dec 13 17:55:56 2010
@@ -20,21 +20,41 @@
 package org.apache.directory.studio.apacheds.configuration.v2.editor;
 
 
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+
+import org.apache.directory.server.config.ConfigWriter;
 import org.apache.directory.server.config.beans.ConfigBean;
+import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
 import org.apache.directory.studio.apacheds.configuration.v2.jobs.LoadConfigurationRunnable;
 import org.apache.directory.studio.common.core.jobs.StudioJob;
 import org.apache.directory.studio.common.core.jobs.StudioRunnableWithProgress;
+import org.apache.directory.studio.common.ui.CommonUIUtils;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.IPathEditorInput;
 import org.eclipse.ui.IPersistableElement;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SaveAsDialog;
 import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.part.FileEditorInput;
 
 
 /**
@@ -61,10 +81,19 @@ public class ServerConfigurationEditor e
     {
         super.init( site, input );
         setPartName( input.getName() );
+        
+        readConfiguration();
+    }
 
-        System.out.println( ID );
 
-        // Creating and scheduling the job to delete the server
+    /**
+     * Reads the configuration
+     */
+    private void readConfiguration()
+    {
+        IEditorInput input = getEditorInput();
+
+        // Creating and scheduling the job to load the configuration
         StudioJob<StudioRunnableWithProgress> job = new StudioJob<StudioRunnableWithProgress>(
             new LoadConfigurationRunnable( this ) );
         job.schedule();
@@ -93,6 +122,99 @@ public class ServerConfigurationEditor e
      */
     public void doSave( IProgressMonitor monitor )
     {
+        if ( dirty )
+        {
+            monitor.beginTask( "Saving the server configuration", IProgressMonitor.UNKNOWN );
+
+            try
+            {
+                IEditorInput input = getEditorInput();
+                String inputClassName = input.getClass().getName();
+                boolean success = false;
+                if ( input instanceof FileEditorInput )
+                // FileEditorInput class is used when the file is opened
+                // from a project in the workspace.
+                {
+                    // Saving the ServerConfiguration to disk
+                    saveConfiguration( ( FileEditorInput ) input, monitor );
+                    success = true;
+                }
+                else if ( input instanceof IPathEditorInput )
+                {
+                    // Saving the ServerConfiguration to disk
+                    saveConfiguration( ( ( IPathEditorInput ) input ).getPath().toFile() );
+                    success = true;
+                }
+                else if ( inputClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" ) //$NON-NLS-1$
+                    || inputClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) ) //$NON-NLS-1$
+                // The class 'org.eclipse.ui.internal.editors.text.JavaFileEditorInput'
+                // is used when opening a file from the menu File > Open... in Eclipse 3.2.x
+                // The class 'org.eclipse.ui.ide.FileStoreEditorInput' is used when
+                // opening a file from the menu File > Open... in Eclipse 3.3.x
+                {
+                    // Saving the ServerConfiguration to disk
+                    saveConfiguration( input.getToolTipText() );
+                    success = true;
+                }
+                else if ( input instanceof NewServerConfigurationInput )
+                {
+                    // The 'ServerConfigurationEditorInput' class is used when a
+                    // new Server Configuration File is created.
+
+                    // We are saving this as if it is a "Save as..." action.
+                    success = doSaveAs( monitor );
+                }
+
+                setDirty( !success );
+                monitor.done();
+            }
+            catch ( Exception e )
+            {
+                e.printStackTrace();
+            }
+        }
+    }
+
+
+    /**
+     * Saves the configuration.
+     *
+     * @param fei
+     *      the file editor input
+     * @param monitor
+     *      the monitor
+     * @throws Exception
+     */
+    private void saveConfiguration( FileEditorInput fei, IProgressMonitor monitor ) throws Exception
+    {
+        fei.getFile().setContents( new ByteArrayInputStream( getConfigWriter().writeToString().getBytes() ), true,
+            true, monitor );
+    }
+
+
+    /**
+     * Saves the configuration.
+     *
+     * @param file
+     *      the file
+     * @throws Exception
+     */
+    private void saveConfiguration( File file ) throws Exception
+    {
+        getConfigWriter().writeToFile( file );
+    }
+
+
+    /**
+     * Saves the configuration.
+     *
+     * @param path
+     *      the path
+     * @throws Exception
+     */
+    private void saveConfiguration( String path ) throws Exception
+    {
+        saveConfiguration( new File( path ) );
     }
 
 
@@ -101,6 +223,138 @@ public class ServerConfigurationEditor e
      */
     public void doSaveAs()
     {
+        try
+        {
+            getSite().getWorkbenchWindow().run( false, false, new IRunnableWithProgress()
+            {
+                public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException
+                {
+                    try
+                    {
+                        monitor
+                            .beginTask( "Saving The Server Configuration", IProgressMonitor.UNKNOWN );
+                        boolean success = doSaveAs( monitor );
+                        setDirty( !success );
+                        monitor.done();
+                    }
+                    catch ( Exception e )
+                    {
+                        // TODO handle the exception
+                    }
+                }
+            } );
+        }
+        catch ( Exception e )
+        {
+            // TODO handle the exception
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Performs the "Save as..." action.
+     *
+     * @param monitor
+     *      the monitor to use
+     * @throws Exception
+     */
+    private boolean doSaveAs( IProgressMonitor monitor ) throws Exception
+    {
+        // detect IDE or RCP:
+        // check if perspective org.eclipse.ui.resourcePerspective is available
+        boolean isIDE = CommonUIUtils.isIDEEnvironment();
+
+        if ( isIDE )
+        {
+            // Asking the user for the location where to 'save as' the file
+            SaveAsDialog dialog = new SaveAsDialog( getSite().getShell() );
+            if ( !( getEditorInput() instanceof NewServerConfigurationInput ) )
+            {
+                dialog.setOriginalFile( ResourcesPlugin.getWorkspace().getRoot().getFile(
+                    new Path( getEditorInput().getToolTipText() ) ) );
+            }
+            if ( dialog.open() != Dialog.OK )
+            {
+                return false;
+            }
+
+            // Getting if the resulting file
+            IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile( dialog.getResult() );
+
+            // Creating the file if it does not exist
+            if ( !file.exists() )
+            {
+                file.create( new ByteArrayInputStream( "".getBytes() ), true, null ); //$NON-NLS-1$
+            }
+
+            // Creating the new input for the editor
+            FileEditorInput fei = new FileEditorInput( file );
+
+            // Saving the file to disk
+            saveConfiguration( fei, monitor );
+
+            // Setting the new input to the editor
+            setInput( fei );
+        }
+        else
+        {
+            Shell shell = getSite().getShell();
+            boolean canOverwrite = false;
+            String path = null;
+
+            while ( !canOverwrite )
+            {
+                // Open FileDialog
+                FileDialog dialog = new FileDialog( shell, SWT.SAVE );
+                path = dialog.open();
+                if ( path == null )
+                {
+                    return false;
+                }
+
+                // Check whether file exists and if so, confirm overwrite
+                final File externalFile = new File( path );
+                if ( externalFile.exists() )
+                {
+                    String question = NLS.bind(
+                        "The file \"{0}\" already exists. Do you want to replace the existing file?", path ); //$NON-NLS-1$
+                    MessageDialog overwriteDialog = new MessageDialog( shell, "Question", null, question, //$NON-NLS-1$
+                        MessageDialog.QUESTION, new String[]
+                            { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 0 );
+                    int overwrite = overwriteDialog.open();
+                    switch ( overwrite )
+                    {
+                        case 0: // Yes
+                            canOverwrite = true;
+                            break;
+                        case 1: // No
+                            break;
+                        case 2: // Cancel
+                        default:
+                            return false;
+                    }
+                }
+                else
+                {
+                    canOverwrite = true;
+                }
+            }
+
+            // Saving the file to disk
+            saveConfiguration( path );
+
+            // Creating the new input for the editor
+            PathEditorInput newInput = new PathEditorInput( new Path( path ) );
+
+            // Setting the new input to the editor
+            setInput( newInput );
+        }
+
+        // Updating the title and tooltip texts
+        setPartName( getEditorInput().getName() );
+
+        return true;
     }
 
 
@@ -148,12 +402,12 @@ public class ServerConfigurationEditor e
 
 
     /**
-     * Sets the configuration bean.
+     * Sets the configuration.
      *
      * @param configBean
      *      the configuration bean
      */
-    public void setConfigBean( ConfigBean configBean )
+    public void setConfiguration( ConfigBean configBean )
     {
         this.configBean = configBean;
     }
@@ -165,9 +419,9 @@ public class ServerConfigurationEditor e
      * @param configBean
      *      the loaded configuration bean
      */
-    public void configBeanLoaded( ConfigBean configBean )
+    public void configurationLoaded( ConfigBean configBean )
     {
-        setConfigBean( configBean );
+        setConfiguration( configBean );
 
         hideLoadingPageAndDisplayConfigPages();
     }
@@ -200,6 +454,18 @@ public class ServerConfigurationEditor e
         setActivePage( 0 );
     }
 
+
+    /**
+     * Gets the configuration writer.
+     *
+     * @return
+     *      the configuration writer
+     * @throws Exception
+     */
+    private ConfigWriter getConfigWriter() throws Exception
+    {
+        return new ConfigWriter( ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager(), configBean );
+    }
 }
 
 /**

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorPage.java?rev=1045264&r1=1045263&r2=1045264&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorPage.java Mon Dec 13 17:55:56 2010
@@ -122,7 +122,7 @@ public abstract class ServerConfiguratio
         if ( configBean == null )
         {
             configBean = new ConfigBean();
-            getServerConfigurationEditor().setConfigBean( configBean );
+            getServerConfigurationEditor().setConfiguration( configBean );
         }
 
         return configBean;

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java?rev=1045264&r1=1045263&r2=1045264&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java Mon Dec 13 17:55:56 2010
@@ -21,26 +21,21 @@
 package org.apache.directory.studio.apacheds.configuration.v2.jobs;
 
 
-import java.io.File;
 import java.util.List;
 
 import org.apache.directory.server.config.ConfigPartitionReader;
+import org.apache.directory.server.config.ReadOnlyConfigurationPartition;
 import org.apache.directory.server.config.beans.ConfigBean;
-import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
-import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.loader.ldif.JarLdifSchemaLoader;
-import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
-import org.apache.directory.shared.ldap.schema.loader.ldif.SingleLdifSchemaLoader;
-import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
-import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
 import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
+import org.apache.directory.studio.apacheds.configuration.v2.editor.NewServerConfigurationInput;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ServerConfigurationEditor;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.common.core.jobs.StudioRunnableWithProgress;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
 
 
 /**
@@ -53,9 +48,6 @@ public class LoadConfigurationRunnable i
     /** The associated editor */
     private ServerConfigurationEditor editor;
 
-    /** The configuration bean */
-    private ConfigBean configBean;
-
 
     /**
      * Creates a new instance of StartLdapServerRunnable.
@@ -102,17 +94,30 @@ public class LoadConfigurationRunnable i
      */
     public void run( StudioProgressMonitor monitor )
     {
+        IEditorInput input = editor.getEditorInput();
+
+        ConfigBean configBean = null;
         try
         {
-            initConfigBean();
+            // If the input is a NewServerConfigurationInput, then we only 
+            // need to get the server configuration and return
+            if ( input instanceof NewServerConfigurationInput )
+            {
+                configBean = getNewDefaultConfiguration();
+            }
 
-            Display.getDefault().asyncExec( new Runnable()
+            if ( configBean != null )
             {
-                public void run()
+                final ConfigBean finalConfigBean = configBean;
+
+                Display.getDefault().asyncExec( new Runnable()
+                {
+                    public void run()
                 {
-                    editor.configBeanLoaded( configBean );
+                    editor.configurationLoaded( finalConfigBean );
                 }
-            } );
+                } );
+            }
         }
         catch ( Exception e )
         {
@@ -122,10 +127,17 @@ public class LoadConfigurationRunnable i
     }
 
 
-    public void initConfigBean() throws Exception
+    /**
+     * Gets a new default configuration.
+     *
+     * @return
+     *      a new default configuration
+     * @throws Exception
+     */
+    public ConfigBean getNewDefaultConfiguration() throws Exception
     {
         long t1 = System.currentTimeMillis();
-        
+
         SchemaManager schemaManager = ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager();
 
         long t2 = System.currentTimeMillis();
@@ -139,24 +151,22 @@ public class LoadConfigurationRunnable i
             throw new Exception( "Schema load failed : " + LdapExceptionUtils.printErrors( errors ) );
         }
 
-        SingleFileLdifPartition configPartition = new SingleFileLdifPartition(
-            "/Users/pajbam/Development/Apache/ApacheDS/apacheds/server-config/src/main/resources/config.ldif" );
-        configPartition.setId( "config" );
-        configPartition.setSuffix( new DN( "ou=config" ) );
-        configPartition.setSchemaManager( schemaManager );
-
-        configPartition.initialize();
-        ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition, new File(
-            "/Users/pajbam/Development/Apache/ApacheDS/apacheds/server-config/src/main/resources/" ) );
+        ReadOnlyConfigurationPartition configurationPartition = new ReadOnlyConfigurationPartition(
+            ApacheDS2ConfigurationPlugin.class.getResourceAsStream( "config.ldif" ), schemaManager );
+        configurationPartition.initialize();
+
+        ConfigPartitionReader cpReader = new ConfigPartitionReader( configurationPartition );
 
         t1 = System.currentTimeMillis();
 
-        configBean = cpReader.readConfig( new DN( "ou=config" ) );
+        ConfigBean configBean = cpReader.readConfig();
 
         t2 = System.currentTimeMillis();
 
         System.out.println( "Time = " + ( t2 - t1 ) + "ms" );
 
         //            System.out.println( configBean );
+
+        return configBean;
     }
 }

Added: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/configuration/v2/config.ldif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/configuration/v2/config.ldif?rev=1045264&view=auto
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/configuration/v2/config.ldif (added)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/resources/org/apache/directory/studio/apacheds/configuration/v2/config.ldif Mon Dec 13 17:55:56 2010
@@ -0,0 +1,862 @@
+version: 1
+dn: ou=config
+ou: config
+objectclass: top
+objectclass: organizationalUnit
+
+dn: ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-directoryService
+ads-directoryserviceid: default
+ads-dsreplicaid: 1
+ads-dssyncperiodmillis: 15000
+ads-dsmaxpdusize: 2000000
+ads-dsallowanonymousaccess: TRUE
+ads-dsaccesscontrolenabled: FALSE
+ads-dsdenormalizeopattrsenabled: FALSE
+ads-servers: changePasswordServer
+ads-servers: dnsServer
+ads-servers: httpServer
+ads-servers: kerberosServer
+ads-servers: ldapServer
+ads-servers: ntpServer
+ads-partitions: example
+ads-partitions: system
+ads-interceptors: aciAuthorizationInterceptor
+ads-interceptors: authenticationInterceptor
+ads-interceptors: collectiveAttributeInterceptor
+ads-interceptors: defaultAuthorizationInterceptor
+ads-interceptors: eventInterceptor
+ads-interceptors: exceptionInterceptor
+ads-interceptors: keyDerivationInterceptor
+ads-interceptors: normalizationInterceptor
+ads-interceptors: operationalAttributeInterceptor
+ads-interceptors: passwordHashingInterceptor
+ads-interceptors: referralInterceptor
+ads-interceptors: schemaInterceptor
+ads-interceptors: subentryInterceptor
+ads-interceptors: triggerInterceptor
+ads-enabled: TRUE
+
+dn: ads-changeLogId=defaultChangeLog,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-changeLog
+ads-changeLogId: defaultChangeLog
+ads-changeLogExposed: FALSE
+
+dn: ads-journalId=defaultJournal,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-journal
+ads-journalId: defaultJournal
+ads-journalFileName: Journal.txt
+ads-journalWorkingDir: /
+ads-journalRotation: 2
+
+dn: ou=interceptors,ads-directoryServiceId=default,ou=config
+ou: interceptors
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-interceptorId=aciAuthorizationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 4
+ads-interceptorclassname: org.apache.directory.server.core.authz.AciAuthorizationInterceptor
+ads-interceptorid: aciAuthorizationInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+objectclass: ads-authenticationInterceptor
+ads-interceptororder: 2
+ads-interceptorclassname: org.apache.directory.server.core.authn.AuthenticationInterceptor
+ads-interceptorid: authenticationInterceptor
+ads-enabled: TRUE
+
+dn: ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ou: authenticators
+objectclass: top
+objectclass: organizationalUnit
+
+dn: ads-authenticatorid=anonymousauthenticator,ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ads-authenticatorid: anonymousauthenticator
+objectclass: top
+objectclass: ads-base
+objectClass: ads-authenticator
+objectClass: ads-anonymousAuthenticator
+
+dn: ads-authenticatorid=simpleauthenticator,ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ads-authenticatorid: simpleauthenticator
+objectclass: top
+objectclass: ads-base
+objectClass: ads-authenticator
+objectClass: ads-simpleAuthenticator
+
+dn: ads-authenticatorid=strongauthenticator,ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ads-authenticatorid: strongauthenticator
+objectclass: top
+objectclass: ads-base
+objectClass: ads-authenticator
+objectClass: ads-strongAuthenticator
+
+dn: ads-interceptorId=collectiveAttributeInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 12
+ads-interceptorclassname: org.apache.directory.server.core.collective.CollectiveAttributeInterceptor
+ads-interceptorid: collectiveAttributeInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=defaultAuthorizationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 5
+ads-interceptorclassname: org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor
+ads-interceptorid: defaultAuthorizationInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=eventInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 13
+ads-interceptorclassname: org.apache.directory.server.core.event.EventInterceptor
+ads-interceptorid: eventInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=exceptionInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 6
+ads-interceptorclassname: org.apache.directory.server.core.exception.ExceptionInterceptor
+ads-interceptorid: exceptionInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=keyDerivationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-enabled: FALSE
+ads-interceptororder: 8
+ads-interceptorclassname: org.apache.directory.server.core.kerberos.KeyDerivationInterceptor
+ads-interceptorid: keyDerivationInterceptor
+
+dn: ads-interceptorId=normalizationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 1
+ads-interceptorclassname: org.apache.directory.server.core.normalization.NormalizationInterceptor
+ads-interceptorid: normalizationInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=operationalAttributeInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 7
+ads-interceptorclassname: org.apache.directory.server.core.operational.OperationalAttributeInterceptor
+ads-interceptorid: operationalAttributeInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=passwordHashingInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-enabled: TRUE
+ads-interceptororder: 9
+ads-interceptorclassname: org.apache.directory.server.core.hash.SshaPasswordHashingInterceptor
+ads-interceptorid: passwordHashingInterceptor
+
+dn: ads-interceptorId=referralInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 3
+ads-interceptorclassname: org.apache.directory.server.core.referral.ReferralInterceptor
+ads-interceptorid: referralInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=schemaInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 10
+ads-interceptorclassname: org.apache.directory.server.core.schema.SchemaInterceptor
+ads-interceptorid: schemaInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=subentryInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 11
+ads-interceptorclassname: org.apache.directory.server.core.subtree.SubentryInterceptor
+ads-interceptorid: subentryInterceptor
+ads-enabled: TRUE
+
+dn: ads-interceptorId=triggerInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-interceptor
+ads-interceptororder: 14
+ads-interceptorclassname: org.apache.directory.server.core.trigger.TriggerInterceptor
+ads-interceptorid: triggerInterceptor
+ads-enabled: TRUE
+
+dn: ads-pwdId=pwdPolicy,ads-directoryServiceId=default,ou=config
+objectClass: top
+objectClass: ads-base
+objectClass: ads-passwordPolicy
+ads-pwdId: pwdPolicy
+ads-pwdSafeModify: FALSE
+ads-pwdMaxAge: 0
+ads-pwdFailureCountInterval: 30
+ads-pwdAttribute: userPassword
+ads-pwdMaxFailure: 5
+ads-pwdLockout: TRUE
+ads-pwdMustChange: FALSE
+ads-pwdLockoutDuration: 0
+ads-pwdMinLength: 5
+ads-pwdInHistory: 5
+ads-pwdExpireWarning: 600
+ads-pwdMinAge: 0
+ads-pwdAllowUserChange: TRUE
+ads-pwdGraceAuthNLimit: 5
+ads-pwdCheckQuality: 2
+ads-enabled: TRUE
+
+dn: ou=partitions,ads-directoryServiceId=default,ou=config
+ou: partitions
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectClass: ads-base
+objectclass: ads-partition
+objectclass: ads-jdbmPartition
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.1
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.2
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.3
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.4
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.5
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.6
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.7
+ads-indexes: objectClass
+ads-indexes: ou
+ads-indexes: uid
+ads-partitionSuffix: ou=system
+ads-jdbmpartitionoptimizerenabled: TRUE
+ads-partitioncachesize: 100
+ads-partitionsynconwrite: TRUE
+ads-partitionid: system
+ads-enabled: TRUE
+ads-contextEntry: dn: ou=system\n
+ objectClass: top\n
+ objectClass: organizationalUnit\n
+ ou: system\n
+ description: The System context entry
+
+dn: ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ou: indexes
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.1,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.1
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.2,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.2
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.3,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.3
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.4,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.4
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.5,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.5
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.6,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.6
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.7,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.7
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=objectClass,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: objectClass
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=ou,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: ou
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=uid,ou=indexes,ads-partitionId=system,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: uid
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectClass: ads-base
+objectclass: ads-partition
+objectclass: ads-jdbmPartition
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.1
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.2
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.3
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.4
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.5
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.6
+ads-indexes: 1.3.6.1.4.1.18060.0.4.1.2.7
+ads-indexes: dc
+ads-indexes: krb5PrincipalName
+ads-indexes: objectClass
+ads-indexes: ou
+ads-indexes: uid
+ads-partitionSuffix: dc=example,dc=com
+ads-jdbmpartitionoptimizerenabled: TRUE
+ads-partitioncachesize: 100
+ads-partitionsynconwrite: TRUE
+ads-partitionid: example
+ads-enabled: TRUE
+
+dn: ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ou: indexes
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.1,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.1
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.2,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.2
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.3,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.3
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.4,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.4
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.5,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.5
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.6,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.6
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=1.3.6.1.4.1.18060.0.4.1.2.7,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: 1.3.6.1.4.1.18060.0.4.1.2.7
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=dc,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: dc
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=krb5PrincipalName,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: krb5PrincipalName
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=objectClass,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: objectClass
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=ou,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: ou
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-indexAttributeId=uid,ou=indexes,ads-partitionId=example,ou=partitions,ads-directoryServiceId=default,ou=config
+ads-indexattributeid: uid
+ads-indexcachesize: 100
+objectclass: ads-index
+objectclass: ads-jdbmIndex
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ou=servers,ads-directoryServiceId=default,ou=config
+ou: servers
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-serverId=changePasswordServer,ou=servers,ads-directoryServiceId=default,ou=config
+objectclass: ads-server
+objectclass: ads-changePasswordServer
+objectclass: ads-dsBasedServer
+objectclass: ads-base
+objectclass: top
+ads-serverid: changePasswordServer
+ads-chgPwdServicePrincipal: kadmin/changepw@EXAMPLE.COM
+ads-enabled: FALSE
+ads-krballowableclockskew: 300000
+ads-krbEmptyAddressesAllowed: TRUE
+ads-krbEncryptionTypes: des-cbc-md5
+ads-krbPrimaryRealm: EXAMPLE.COM
+ads-searchBaseDN: ou=users,dc=example,dc=com
+ads-transports: tcp
+ads-transports: udp
+
+dn: ou=transports,ads-serverId=changePasswordServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: transports
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-transportId=tcp,ou=transports,ads-serverId=changePasswordServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 60464
+ads-transportbacklog: 50
+ads-transportnbthreads: 2
+ads-transportid: tcp
+objectclass: ads-transport
+objectclass: ads-tcpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-transportId=udp,ou=transports,ads-serverId=changePasswordServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 60464
+ads-transportbacklog: 50
+ads-transportnbthreads: 2
+ads-transportid: udp
+objectclass: ads-transport
+objectclass: ads-udpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-serverId=dnsServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-serverid: dnsServer
+ads-enabled: FALSE
+objectclass: ads-server
+objectclass: ads-dnsServer
+objectclass: ads-dsBasedServer
+objectclass: ads-base
+objectclass: top
+ads-transports: tcp
+ads-transports: udp
+
+dn: ou=transports,ads-serverId=dnsServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: transports
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-transportId=tcp,ou=transports,ads-serverId=dnsServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 8053
+ads-transportid: tcp
+objectclass: ads-transport
+objectclass: ads-tcpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-transportId=udp,ou=transports,ads-serverId=dnsServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 8053
+ads-transportid: udp
+objectclass: ads-transport
+objectclass: ads-udpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-serverId=httpServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-serverid: httpServer
+ads-enabled: FALSE
+objectclass: ads-server
+objectclass: ads-httpServer
+objectclass: ads-base
+objectclass: top
+ads-transports: http
+ads-transports: https
+
+dn: ou=transports,ads-serverId=httpServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: transports
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-transportid=http,ou=transports,ads-serverId=httpServer,ou=servers,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-transport
+objectclass: ads-tcpTransport
+ads-transportid: http
+ads-systemport: 8080
+ads-transportaddress: 0.0.0.0
+ads-enabled: TRUE
+
+dn: ads-transportid=https,ou=transports,ads-serverId=httpServer,ou=servers,ads-directoryServiceId=default,ou=config
+objectclass: top
+objectclass: ads-base
+objectclass: ads-transport
+objectclass: ads-tcpTransport
+ads-transportid: https
+ads-transportaddress: 0.0.0.0
+ads-systemport: 8443
+ads-enabled: TRUE
+
+dn: ou=httpWebApps,ads-serverId=httpServer,ou=servers,ads-directoryServiceId=default,ou=config
+objectclass: organizationalUnit
+objectclass: top
+ou: httpWebApps
+
+dn: ads-id=testapp,ou=httpWebApps,ads-serverId=httpServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-httpwarfile: /path/to/foo/war
+ads-httpappctxpath: /foo
+ads-id: testapp
+objectclass: ads-httpWebApp
+objectclass: ads-base
+objectclass: top
+ads-enabled: FALSE
+
+dn: ads-serverId=kerberosServer,ou=servers,ads-directoryServiceId=default,ou=config
+objectclass: ads-server
+objectclass: ads-kdcServer
+objectclass: ads-dsBasedServer
+objectclass: ads-base
+objectclass: top
+ads-serverid: kerberosServer
+ads-enabled: FALSE
+ads-krbAllowableClockSkew: 300000
+ads-krbBodyChecksumVerified: TRUE
+ads-krbEmptyAddressesAllowed: TRUE
+ads-krbEncryptionTypes: des-cbc-md5
+ads-krbForwardableAllowed: TRUE
+ads-krbKdcPrincipal: krbtgt/EXAMPLE.COM@EXAMPLE.COM
+ads-krbmaximumrenewablelifetime: 604800000
+ads-krbMaximumTicketLifetime: 86400000
+ads-krbPaEncTimestampRequired: TRUE
+ads-krbPostdatedAllowed: TRUE
+ads-krbPrimaryRealm: EXAMPLE.COM
+ads-krbProxiableAllowed: TRUE
+ads-krbRenewableAllowed: TRUE
+ads-searchBaseDN: ou=users,dc=example,dc=com
+ads-transports: tcp
+ads-transports: udp
+
+dn: ou=transports,ads-serverId=kerberosServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: transports
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-transportid=tcp,ou=transports,ads-serverId=kerberosServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 60088
+ads-transportbacklog: 50
+ads-transportnbthreads: 4
+ads-transportaddress: 0.0.0.0
+ads-transportid: tcp
+objectclass: ads-transport
+objectClass: ads-base
+objectclass: ads-tcpTransport
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-transportid=udp,ou=transports,ads-serverId=kerberosServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 60088
+ads-transportbacklog: 50
+ads-transportnbthreads: 4
+ads-transportaddress: 0.0.0.0
+ads-transportid: udp
+objectclass: ads-transport
+objectclass: ads-udpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+objectclass: ads-server
+objectclass: ads-ldapServer
+objectclass: ads-dsBasedServer
+objectclass: ads-base
+objectclass: top
+ads-serverId: ldapServer
+ads-confidentialityRequired: FALSE
+ads-maxSizeLimit: 1000
+ads-maxTimeLimit: 15000
+ads-saslHost: ldap.example.com
+ads-saslPrincipal: ldap/ldap.example.com@EXAMPLE.COM
+ads-saslRealms: example.com
+ads-saslRealms: apache.org
+ads-searchBaseDN: ou=users,ou=system
+ads-enabled: TRUE
+ads-enableReplProvider: FALSE
+ads-transports: ldap
+ads-transports: ldaps
+ads-saslmechhandlers: CRAM-MD5
+ads-saslmechhandlers: DIGEST-MD5
+ads-saslmechhandlers: GSS-SPNEGO
+ads-saslmechhandlers: GSSAPI
+ads-saslmechhandlers: NTLM
+ads-saslmechhandlers: SIMPLE
+ads-extendedophandlers: gracefulShutdownHandler
+ads-extendedophandlers: starttlshandler
+ads-extendedophandlers: storedprochandler
+
+dn: ou=transports,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: transports
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-transportid=ldap,ou=transports,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 10389
+ads-transportenablessl: FALSE
+ads-transportbacklog: 50
+ads-transportnbthreads: 8
+ads-transportaddress: 0.0.0.0
+ads-transportid: ldap
+objectclass: ads-transport
+objectclass: ads-tcpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-transportid=ldaps,ou=transports,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 10636
+ads-transportenablessl: TRUE
+ads-transportaddress: 0.0.0.0
+ads-transportid: ldaps
+objectclass: ads-transport
+objectclass: ads-tcpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ou=extendedOpHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: extendedOpHandlers
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-extendedOpId=gracefulShutdownHandler,ou=extendedOpHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-extendedOpId: gracefulShutdownHandler
+ads-extendedOpHandlerclass: org.apache.directory.server.ldap.handlers.extended.GracefulShutdownHandler
+objectclass: ads-extendedOpHandler
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-extendedOpId=starttlshandler,ou=extendedOpHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-extendedOpId: starttlshandler
+ads-extendedOpHandlerclass: org.apache.directory.server.ldap.handlers.extended.StartTlsHandler
+objectclass: ads-extendedOpHandler
+objectclass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-extendedOpId=storedprochandler,ou=extendedOpHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-enabled: FALSE
+ads-extendedOpId: storedprochandler
+ads-extendedOpHandlerclass: org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler
+objectclass: ads-extendedOpHandler
+objectclass: ads-base
+objectclass: top
+
+dn: ou=saslMechHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: saslMechHandlers
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-saslMechName=CRAM-MD5,ou=saslMechHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-saslMechClassName: org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler
+objectclass: ads-saslMechHandler
+objectclass: ads-base
+objectclass: top
+ads-saslMechName: CRAM-MD5
+ads-enabled: TRUE
+
+dn: ads-saslMechName=DIGEST-MD5,ou=saslMechHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-saslMechClassName: org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler
+objectclass: ads-saslMechHandler
+objectclass: ads-base
+objectclass: top
+ads-saslMechName: DIGEST-MD5
+ads-enabled: TRUE
+
+dn: ads-saslMechName=GSS-SPNEGO,ou=saslMechHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-saslMechClassName: org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler
+objectclass: ads-saslMechHandler
+objectclass: ads-base
+objectclass: top
+ads-saslMechName: GSS-SPNEGO
+ads-ntlmMechProvider: com.foo.Bar
+ads-enabled: TRUE
+
+dn: ads-saslMechName=GSSAPI,ou=saslMechHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-saslMechClassName: org.apache.directory.server.ldap.handlers.bind.gssapi.GssapiMechanismHandler
+objectclass: ads-saslMechHandler
+objectclass: ads-base
+objectclass: top
+ads-saslMechName: GSSAPI
+ads-enabled: TRUE
+
+dn: ads-saslMechName=NTLM,ou=saslMechHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-saslMechClassName: org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler
+objectclass: ads-saslMechHandler
+objectclass: ads-base
+objectclass: top
+ads-saslMechName: NTLM
+ads-ntlmMechProvider: com.foo.Bar
+ads-enabled: TRUE
+
+dn: ads-saslMechName=SIMPLE,ou=saslMechHandlers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-saslMechClassName: org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler
+objectclass: ads-saslMechHandler
+objectclass: ads-base
+objectclass: top
+ads-saslMechName: SIMPLE
+ads-enabled: TRUE
+
+dn: ads-serverId=ntpServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-serverid: ntpServer
+ads-enabled: FALSE
+objectclass: ads-server
+objectclass: ads-ntpServer
+objectclass: ads-base
+objectclass: top
+ads-transports: tcp
+ads-transports: udp
+
+dn: ou=transports,ads-serverId=ntpServer,ou=servers,ads-directoryServiceId=default,ou=config
+ou: transports
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ads-transportId=tcp,ou=transports,ads-serverId=ntpServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 60123
+ads-transportid: tcp
+objectclass: ads-transport
+objectclass: ads-tcpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE
+
+dn: ads-transportId=udp,ou=transports,ads-serverId=ntpServer,ou=servers,ads-directoryServiceId=default,ou=config
+ads-systemport: 60123
+ads-transportnbthreads: 1
+ads-transportid: udp
+objectclass: ads-transport
+objectclass: ads-udpTransport
+objectClass: ads-base
+objectclass: top
+ads-enabled: TRUE



Mime
View raw message