directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1668692 [8/16] - in /directory/studio/trunk: ./ eclipse-target-platform/ features/ features/apacheds.feature/ features/ldapbrowser.feature/ features/ldifeditor.feature/ features/rcp.feature/ features/schemaeditor.feature/ helps/ helps/apac...
Date Mon, 23 Mar 2015 17:59:06 GMT
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.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/ServerConfigurationEditorUtils.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java Mon Mar 23 17:59:02 2015
@@ -23,13 +23,26 @@ package org.apache.directory.studio.apac
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.util.List;
+import java.util.UUID;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
+import org.apache.directory.api.ldap.model.csn.CsnFactory;
 import org.apache.directory.api.ldap.model.entry.DefaultEntry;
+import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.ldif.LdifEntry;
+import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.ldap.model.schema.SchemaManager;
 import org.apache.directory.server.config.ConfigWriter;
+import org.apache.directory.server.core.api.CacheService;
+import org.apache.directory.server.core.api.DnFactory;
+import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition;
+import org.apache.directory.server.core.partition.ldif.AbstractLdifPartition;
+import org.apache.directory.server.core.partition.ldif.LdifPartition;
+import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
 import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
+import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPluginConstants;
 import org.apache.directory.studio.apacheds.configuration.v2.jobs.EntryBasedConfigurationPartition;
 import org.apache.directory.studio.apacheds.configuration.v2.jobs.PartitionsDiffComputer;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
@@ -83,7 +96,7 @@ public class ServerConfigurationEditorUt
      * @throws Exception
      */
     public static IEditorInput saveAs( IProgressMonitor monitor, Shell shell, IEditorInput input,
-        ConfigWriter configWriter, boolean newInput )
+        ConfigWriter configWriter, Configuration configuration, boolean newInput )
         throws Exception
     {
         // detect IDE or RCP:
@@ -119,7 +132,7 @@ public class ServerConfigurationEditorUt
             }
             else
             {
-                dialog.setOriginalName( "config.ldif" ); //$NON-NLS-1$
+                dialog.setOriginalName( ApacheDS2ConfigurationPluginConstants.CONFIG_LDIF );
             }
 
             // Open the dialog
@@ -141,7 +154,8 @@ public class ServerConfigurationEditorUt
             FileEditorInput fei = new FileEditorInput( file );
 
             // Saving the file to disk
-            saveConfiguration( fei, configWriter, monitor );
+            File configFile = fei.getPath().toFile();
+            saveConfiguration( configFile, configWriter, configuration );
 
             return fei;
         }
@@ -189,7 +203,7 @@ public class ServerConfigurationEditorUt
             }
 
             // Saving the file to disk
-            saveConfiguration( path, configWriter );
+            saveConfiguration( new File(path), configWriter, configuration );
 
             // Checking if a new input is required
             if ( newInput )
@@ -298,25 +312,6 @@ public class ServerConfigurationEditorUt
      * Saves the configuration.
      *
      * @param input
-     *      the file editor input
-     * @param configWriter
-     *      the configuration writer
-     * @param monitor
-     *      the monitor
-     * @throws Exception
-     */
-    public static void saveConfiguration( FileEditorInput input, ConfigWriter configWriter, IProgressMonitor monitor )
-        throws Exception
-    {
-        input.getFile().setContents( new ByteArrayInputStream( configWriter.writeToString().getBytes() ), true,
-            true, monitor );
-    }
-
-
-    /**
-     * Saves the configuration.
-     *
-     * @param input
      *      the connection server configuration input
      * @param configWriter
      *      the configuration writer
@@ -338,6 +333,9 @@ public class ServerConfigurationEditorUt
         SchemaManager schemaManager = ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager();
         EntryBasedConfigurationPartition newconfigurationPartition = new EntryBasedConfigurationPartition(
             schemaManager );
+        CacheService cacheService = new CacheService();
+        cacheService.initialize( null );
+        newconfigurationPartition.setCacheService( cacheService );
         newconfigurationPartition.initialize();
         List<LdifEntry> convertedLdifEntries = configWriter.getConvertedLdifEntries();
         for ( LdifEntry ldifEntry : convertedLdifEntries )
@@ -405,24 +403,114 @@ public class ServerConfigurationEditorUt
      *      the configuration writer
      * @throws Exception
      */
-    public static void saveConfiguration( File file, ConfigWriter configWriter ) throws Exception
+    public static void saveConfiguration( File file, ConfigWriter configWriter, Configuration configuration )
+        throws Exception
+    {
+        SchemaManager schemaManager = ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager();
+
+        CacheService cacheService = new CacheService();
+        cacheService.initialize( null );
+
+        DnFactory dnFactory = null;
+
+        CsnFactory csnFactory = new CsnFactory( 0 );
+
+        if ( file != null )
+        {
+            // create partiton
+            AbstractLdifPartition configPartition;
+            if ( file.getName().equals( ApacheDS2ConfigurationPluginConstants.OU_CONFIG_LDIF ) )
+            {
+                File confDir = file.getParentFile();
+                if ( file.exists() )
+                {
+                    FileUtils.deleteDirectory( confDir );
+                }
+                configPartition = createMultiFileConfiguration( confDir, schemaManager, dnFactory, cacheService );
+            }
+            else
+            {
+                if ( file.exists() )
+                {
+                    file.delete();
+                }
+                configPartition = createSingleFileConfiguration( file, schemaManager, dnFactory, cacheService );
+            }
+
+            // write entries to partition
+            List<LdifEntry> convertedLdifEntries = configWriter.getConvertedLdifEntries();
+            for ( LdifEntry ldifEntry : convertedLdifEntries )
+            {
+                Entry entry = new DefaultEntry( schemaManager, ldifEntry.getEntry() );
+                if ( entry.get( SchemaConstants.ENTRY_CSN_AT ) == null )
+                {
+                    entry.add( SchemaConstants.ENTRY_CSN_AT, csnFactory.newInstance().toString() );
+                }
+                if ( entry.get( SchemaConstants.ENTRY_UUID_AT ) == null )
+                {
+                    String uuid = UUID.randomUUID().toString();
+                    entry.add( SchemaConstants.ENTRY_UUID_AT, uuid );
+                }
+                configPartition.add( new AddOperationContext( null, entry ) );
+            }
+        }
+    }
+
+
+    private static SingleFileLdifPartition createSingleFileConfiguration( File configFile, SchemaManager schemaManager,
+        DnFactory dnFactory, CacheService cacheService ) throws Exception
     {
-        configWriter.writeToFile( file );
+        SingleFileLdifPartition configPartition = new SingleFileLdifPartition( schemaManager, dnFactory );
+        configPartition.setId( "config" );
+        configPartition.setPartitionPath( configFile.toURI() );
+        configPartition.setSuffixDn( new Dn( schemaManager, "ou=config" ) );
+        configPartition.setSchemaManager( schemaManager );
+        configPartition.setCacheService( cacheService );
+        configPartition.initialize();
+        return configPartition;
     }
 
 
-    /**
-     * Saves the configuration.
-     *
-     * @param path
-     *      the path
-     * @param configWriter
-     *      the configuration writer
-     * @throws Exception
-     */
-    public static void saveConfiguration( String path, ConfigWriter configWriter ) throws Exception
+    private static LdifPartition createMultiFileConfiguration( File confDir, SchemaManager schemaManager, DnFactory dnFactory,
+        CacheService cacheService ) throws Exception
     {
-        saveConfiguration( new File( path ), configWriter );
+        LdifPartition configPartition = new LdifPartition( schemaManager, dnFactory );
+        configPartition.setId( "config" );
+        configPartition.setPartitionPath( confDir.toURI() );
+        configPartition.setSuffixDn( new Dn( schemaManager, "ou=config" ) );
+        configPartition.setSchemaManager( schemaManager );
+        configPartition.setCacheService( cacheService );
+        configPartition.initialize();
+        return configPartition;
+    }
+
+
+    // TODO: somthing link this should be used in future to only write changes to partition
+    private static List<LdifEntry> computeModifications( ConfigWriter configWriter,
+        AbstractBTreePartition originalPartition ) throws Exception
+    {
+        // Creating a new configuration partition
+        SchemaManager schemaManager = ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager();
+        EntryBasedConfigurationPartition newconfigurationPartition = new EntryBasedConfigurationPartition(
+            schemaManager );
+        CacheService cacheService = new CacheService();
+        cacheService.initialize( null );
+        newconfigurationPartition.setCacheService( cacheService );
+        newconfigurationPartition.initialize();
+        List<LdifEntry> convertedLdifEntries = configWriter.getConvertedLdifEntries();
+        for ( LdifEntry ldifEntry : convertedLdifEntries )
+        {
+            newconfigurationPartition.addEntry( new DefaultEntry( schemaManager, ldifEntry.getEntry() ) );
+        }
+
+        // Comparing both partitions to get the list of modifications to be applied
+        PartitionsDiffComputer partitionsDiffComputer = new PartitionsDiffComputer();
+        partitionsDiffComputer.setOriginalPartition( originalPartition );
+        partitionsDiffComputer.setDestinationPartition( newconfigurationPartition );
+        List<LdifEntry> modificationsList = partitionsDiffComputer.computeModifications( new String[]
+            { SchemaConstants.ALL_USER_ATTRIBUTES } );
+
+        return modificationsList;
     }
 
 

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties Mon Mar 23 17:59:02 2015
@@ -21,10 +21,12 @@ ErrorPage.CouldNotOpenEditor=Could not o
 ErrorPage.Details=Details
 ErrorPage.ErrorOpeningEditor=Error opening the editor
 
+KerberosServerPage.Address=Address:
 KerberosServerPage.AllowableClockSkew=Allowable Clock Skew (ms):
 KerberosServerPage.AllowEmptyAddresses=Allow Empty Addresses
 KerberosServerPage.AllowForwadableAddresses=Allow Forwardable Addresses
 KerberosServerPage.AllowPostdatedTickets=Allow Postdated Tickets
+KerberosServerPage.AllowProxiableTickets=Allow Proxiable Tickets
 KerberosServerPage.AllowRenewableTickets=Allow Renewable Tickets
 KerberosServerPage.AtLeastOneEncryptionTypeMustBeSelected=At least one encryption type must be selected.
 KerberosServerPage.EnableKerberosChangePassword=Enable Kerberos Change Password Server
@@ -37,38 +39,47 @@ KerberosServerPage.MaxRenewableLifetime=
 KerberosServerPage.MaxTicketLifetime=Max. Ticket Lifetime (ms):
 KerberosServerPage.Port=Port:
 KerberosServerPage.PrimaryKdcRealm=Primary KDC Realm:
-KerberosServerPage.RequirePreAuthentication=Require Pre-Authentication\nBy Encrypted TimeStamp
+KerberosServerPage.RequirePreAuthentication=Require Pre-Authentication By Encrypted TimeStamp
 KerberosServerPage.SearchBaseDn=Search Base Dn:
 KerberosServerPage.TicketSettings=Ticket Settings
 KerberosServerPage.VerifyBodyChecksum=Verify Body Checksum
 
 LdapLdapsServersPage.Add=Add...
+LdapLdapsServersPage.Address=Address:
 LdapLdapsServersPage.Advanced=Advanced
+LdapLdapsServersPage.AtLeastOneCipherMustBeSelected=At least one Cipher must be selected.
+LdapLdapsServersPage.BackLogSize=BackLog Size:
 LdapLdapsServersPage.Browse=Browse...
-LdapLdapsServersPage.CipherSuite=Cipher Suite:
+LdapLdapsServersPage.CiphersSuite=Ciphers Suite:
 LdapLdapsServersPage.Delete=Delete
 LdapLdapsServersPage.Edit=Edit...
 LdapLdapsServersPage.EnableLdapServer=Enable LDAP Server
 LdapLdapsServersPage.EnableLdapsServer=Enable LDAPS Server
+LdapLdapsServersPage.EnabledProtocols=Enabled Protocols:
 LdapLdapsServersPage.EnableServerSidePasswordHashing=Enable server-side password hashing
 LdapLdapsServersPage.EnableTls=Enable TLS
 LdapLdapsServersPage.HashingMethod=Hashing Method:
 LdapLdapsServersPage.Keystore=Keystore:
 LdapLdapsServersPage.LdapLdapsServers=LDAP/LDAPS Servers
 LdapLdapsServersPage.Limits=Limits
+LdapLdapsServersPage.MaxPduSize=Max PDU Size (bytes):
 LdapLdapsServersPage.MaxSizeLimit=Max Size Limit (entries):
 LdapLdapsServersPage.MaxTimeLimit=Max Time Limit (ms):
+LdapLdapsServersPage.NbThreads=NbThreads:
+LdapLdapsServersPage.NeedClientAuth=Require Client Auth
 LdapLdapsServersPage.Password=Password:
 LdapLdapsServersPage.Port=Port:
 LdapLdapsServersPage.Provider=Provider:
 LdapLdapsServersPage.SaslHost=SASL Host:
 LdapLdapsServersPage.SaslPrincipal=SASL Principal:
+LdapLdapsServersPage.SaslRealms=SASL Realms:
 LdapLdapsServersPage.SaslSettings=SASL Settings
 LdapLdapsServersPage.SearchBaseDn=Search Base Dn:
 LdapLdapsServersPage.ShowPassword=Show password
+LdapLdapsServersPage.SslAdvancedSettings=SSL Advanced Settings
 LdapLdapsServersPage.SslStartTlsKeystore=SSL/Start TLS Keystore
-LdapLdapsServersPage.SslStartTlsCipherSuites=SSL/Start TLS Cipher Suites
 LdapLdapsServersPage.SupportedAuthenticationMechanisms=Supported Authentication Mechanisms
+LdapLdapsServersPage.WantClientAuth=Request Client Auth
 
 LoadingPage.LoadingConfiguration=Loading Configuration
 LoadingPage.LoadingConfigurationEllipsis=Loading Configuration...
@@ -82,6 +93,7 @@ OverviewPage.AdvancedOptionsConfiguratio
 OverviewPage.AdvancedPartitionsConfiguration=Advanced Partitions configuration...
 OverviewPage.AllowAnonymousAccess=Allow Anonymous Access
 OverviewPage.EnableAccessControl=Enable Access Control
+OverviewPage.EnableHiddenPassword=Enable Hidden Password
 OverviewPage.EnableKerberosChangePasswordServer=Enable Kerberos Change Password Server
 OverviewPage.EnableKerberosServer=Enable Kerberos Server
 OverviewPage.EnableLdapServer=Enable LDAP Server

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties Mon Mar 23 17:59:02 2015
@@ -21,10 +21,12 @@ ErrorPage.CouldNotOpenEditor=Der Editor
 ErrorPage.Details=Details
 ErrorPage.ErrorOpeningEditor=Fehler beim \u00D6ffnen des Editors
 
+KerberosServerPage.Address=Adressen:
 KerberosServerPage.AllowableClockSkew=Erlaubter Zeitversatz (ms):
 KerberosServerPage.AllowEmptyAddresses=Leere Adressen erlauben
 KerberosServerPage.AllowForwadableAddresses=Weiterreichbare Adressen erlauben
 KerberosServerPage.AllowPostdatedTickets=Nachdatierte Tickets erlauben
+KerberosServerPage.AllowProxiableTickets=Proxy Tickets erlauben
 KerberosServerPage.AllowRenewableTickets=Erneuerbare Tickets erlauben
 KerberosServerPage.AtLeastOneEncryptionTypeMustBeSelected=Bitte zumindest ein Verschl\u00FCsselungsverfahren ausw\u00E4hlen.
 KerberosServerPage.EnableKerberosChangePassword=Kerberos Change Password Server aktivieren
@@ -37,36 +39,47 @@ KerberosServerPage.MaxRenewableLifetime=
 KerberosServerPage.MaxTicketLifetime=Max. Ticket Lebenszeit (ms):
 KerberosServerPage.Port=Port:
 KerberosServerPage.PrimaryKdcRealm=Prim\u00E4re KDC Dom\u00E4ne:
-KerberosServerPage.RequirePreAuthentication=Vorauthentifizierung mit\n verschl\u00FCsseltem Zeitstempel
+KerberosServerPage.RequirePreAuthentication=Vorauthentifizierung mit verschl\u00FCsseltem Zeitstempel
 KerberosServerPage.SearchBaseDn=Suchbasis DN:
 KerberosServerPage.TicketSettings=Ticket Einstellungen
 KerberosServerPage.VerifyBodyChecksum=Ticket Checksumme verifizieren
 
 LdapLdapsServersPage.Add=Hinzuf\u00FCgen...
+LdapLdapsServersPage.Address=Adressen:
 LdapLdapsServersPage.Advanced=Erweitert
+LdapLdapsServersPage.AtLeastOneCipherMustBeSelected=Bitte zumindest eine Chiffre ausw\u00E4hlen.
+LdapLdapsServersPage.BackLogSize=BackLog Gr\u00F6\u00DFe:
 LdapLdapsServersPage.Browse=Browsen...
+LdapLdapsServersPage.CiphersSuite=Chiffren:
 LdapLdapsServersPage.Delete=L\u00F6schen
 LdapLdapsServersPage.Edit=Bearbeiten...
 LdapLdapsServersPage.EnableLdapServer=LDAP Server aktivieren
 LdapLdapsServersPage.EnableLdapsServer=LDAPS Server aktivieren
+LdapLdapsServersPage.EnabledProtocols=Aktivierte Protokolle:
 LdapLdapsServersPage.EnableServerSidePasswordHashing=Passworte serverseitig hashen
 LdapLdapsServersPage.EnableTls=TLS aktivieren
 LdapLdapsServersPage.HashingMethod=Hash Methode:
-LdapLdapsServersPage.Keystore=Keystore:
+LdapLdapsServersPage.Keystore=Schl\u00FCsselspeicher:
 LdapLdapsServersPage.LdapLdapsServers=LDAP/LDAPS Server
 LdapLdapsServersPage.Limits=Begrenzungen
+LdapLdapsServersPage.MaxPduSize=Max. PDU Gr\u00F6\u00DFe (Bytes):
 LdapLdapsServersPage.MaxSizeLimit=Max. Anzahl (Eintra\u00E4ge):
 LdapLdapsServersPage.MaxTimeLimit=Max. Zeit (ms):
+LdapLdapsServersPage.NbThreads=Threads Anzahl:
+LdapLdapsServersPage.NeedClientAuth=Client Authentifizierung erforderlich
 LdapLdapsServersPage.Password=Passwort:
 LdapLdapsServersPage.Port=Port:
 LdapLdapsServersPage.Provider=Provider:
 LdapLdapsServersPage.SaslHost=SASL Host:
 LdapLdapsServersPage.SaslPrincipal=SASL Principal:
+LdapLdapsServersPage.SaslRealms=SASL Realms:
 LdapLdapsServersPage.SaslSettings=SASL Einstellungen
 LdapLdapsServersPage.SearchBaseDn=Suchbasis DN:
 LdapLdapsServersPage.ShowPassword=Passwort anzeigen
-LdapLdapsServersPage.SslStartTlsKeystore=SSL/Start TLS Keystore
+LdapLdapsServersPage.SslAdvancedSettings=Erweiterte SSL Einstellungen
+LdapLdapsServersPage.SslStartTlsKeystore=SSL/Start TLS Schl\u00FCsselspeicher:
 LdapLdapsServersPage.SupportedAuthenticationMechanisms=Unterst\u00FCtzte Autentifizierungsmechanismen
+LdapLdapsServersPage.WantClientAuth=Client Authentifizierung fordern
 
 LoadingPage.LoadingConfiguration=Konfiguration wird geladen
 LoadingPage.LoadingConfigurationEllipsis=Konfiguration wird geladen...
@@ -80,6 +93,7 @@ OverviewPage.AdvancedOptionsConfiguratio
 OverviewPage.AdvancedPartitionsConfiguration=Erweiterte Partitionseinstellungen...
 OverviewPage.AllowAnonymousAccess=Anonymen Zugriff erlauben
 OverviewPage.EnableAccessControl=Zugriffskontrolle aktivieren
+OverviewPage.EnableHiddenPassword=Verstecktes Password aktivieren
 OverviewPage.EnableKerberosChangePasswordServer=Kerberos Change Password Server aktivieren
 OverviewPage.EnableKerberosServer=Kerberos Server aktivieren
 OverviewPage.EnableLdapServer=LDAP Server aktivieren
@@ -104,9 +118,9 @@ PartitionDetailsPage.Edit=Bearbeiten...
 PartitionDetailsPage.EnableOptimzer=Optimierer aktivieren
 PartitionDetailsPage.Id=ID:
 PartitionDetailsPage.IndexedAttributes=Indizierte Attribute
-PartitionDetailsPage.PartitionsGeneralDetails=Partitions-General-Details
+PartitionDetailsPage.PartitionsGeneralDetails=Allgemeine Einstellungen
 PartitionDetailsPage.SetIndexedAttributesOfPartition=Indizierte Attribute der Partition.
-PartitionDetailsPage.SetPropertiesOfPartition=Eigenschaften der Partition.
+PartitionDetailsPage.SetPropertiesOfPartition=Allgemeine Eigenschaften der Partition festlegen.
 PartitionDetailsPage.SynchronizationOnWrite=Beim Schreiben synchronisieren
 PartitionDetailsPage.Value=Wert
 
@@ -129,7 +143,7 @@ PasswordPoliciesPage.PasswordPolicies=Pa
 
 ReplicationPage.Replication=Replikation
 
-ServerConfigurationEditor.SavingServerConfiguration=Server Configuration speichern
+ServerConfigurationEditor.SavingServerConfiguration=Server Konfiguration speichern
 
 ServerConfigurationEditorPage.DefaultWithValue=(Default: {0})
 

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties Mon Mar 23 17:59:02 2015
@@ -21,10 +21,12 @@ ErrorPage.CouldNotOpenEditor=Impossible
 ErrorPage.Details=Détails
 ErrorPage.ErrorOpeningEditor=Erreur à l'ouverture de l'éditeur
 
+KerberosServerPage.Address=Adresse:
 KerberosServerPage.AllowableClockSkew=Désynchronisation d'horloge autorisée (ms):
 KerberosServerPage.AllowEmptyAddresses=Autoriser les adresses vides
 KerberosServerPage.AllowForwadableAddresses=Autoriser le renvoi d'adresses
 KerberosServerPage.AllowPostdatedTickets=Autoriser les tickets post-datés
+KerberosServerPage.AllowProxiableTickets=Autoriser les tickets délégués
 KerberosServerPage.AllowRenewableTickets=Autoriser les tickets renouvelables
 KerberosServerPage.AtLeastOneEncryptionTypeMustBeSelected=Au moins un type d'encryption doit être sélectionné.
 KerberosServerPage.EnableKerberosChangePassword=Activer le serveur Kerberos Change Password
@@ -37,36 +39,47 @@ KerberosServerPage.MaxRenewableLifetime=
 KerberosServerPage.MaxTicketLifetime=Durée de vie maximale d'un ticket (ms):
 KerberosServerPage.Port=Port:
 KerberosServerPage.PrimaryKdcRealm=KDC Realm primaire:
-KerberosServerPage.RequirePreAuthentication=Pré-Authentification obligatoire\npar horodatage encrypté
+KerberosServerPage.RequirePreAuthentication=Pré-Authentification obligatoire par horodatage encrypté
 KerberosServerPage.SearchBaseDn=DN de base de recherche:
 KerberosServerPage.TicketSettings=Réglages de ticket
 KerberosServerPage.VerifyBodyChecksum=Vérifier la somme de contrôle du corps
 
 LdapLdapsServersPage.Add=Ajouter...
+LdapLdapsServersPage.Address=Adresse:
 LdapLdapsServersPage.Advanced=Avancé
+LdapLdapsServersPage.AtLeastOneCipherMustBeSelected=Au moins un Cipher doit être sélectionné.
+LdapLdapsServersPage.BackLogSize=Taille BackLog:
 LdapLdapsServersPage.Browse=Parcourir...
+LdapLdapsServersPage.CiphersSuite=Ciphers authorisés:
 LdapLdapsServersPage.Delete=Supprimer
 LdapLdapsServersPage.Edit=Editer...
 LdapLdapsServersPage.EnableLdapServer=Activer le serveur LDAP
 LdapLdapsServersPage.EnableLdapsServer=Activer le serveur LDAPS
+LdapLdapsServersPage.EnabledProtocols=Protocoles Authoriséss:
 LdapLdapsServersPage.EnableServerSidePasswordHashing=Activer le hachage du mot passe coté serveur
 LdapLdapsServersPage.EnableTls=Activer TLS
 LdapLdapsServersPage.HashingMethod=Méthod de hachage:
 LdapLdapsServersPage.Keystore=Magasin de clé:
 LdapLdapsServersPage.LdapLdapsServers=Serveurs LDAP/LDAPS
 LdapLdapsServersPage.Limits=Limites
+LdapLdapsServersPage.MaxPduSize=Limite de taille des PDUs (octets):
 LdapLdapsServersPage.MaxSizeLimit=Limite de taille max (entrées):
 LdapLdapsServersPage.MaxTimeLimit=Limite de temps max (ms):
+LdapLdapsServersPage.NbThreads=Nombre de Threads:
+LdapLdapsServersPage.NeedClientAuth=Authentification Client Exigée
 LdapLdapsServersPage.Password=Mot de passe:
 LdapLdapsServersPage.Port=Port:
 LdapLdapsServersPage.Provider=Fournisseur:
 LdapLdapsServersPage.SaslHost=Hôte SASL:
 LdapLdapsServersPage.SaslPrincipal=SASL Principal:
+LdapLdapsServersPage.SaslRealms=SASL Realms:
 LdapLdapsServersPage.SaslSettings=Réglages SASL
 LdapLdapsServersPage.SearchBaseDn=Search Base Dn:
 LdapLdapsServersPage.ShowPassword=Show password
+LdapLdapsServersPage.SslAdvancedSettings=SSL Options Avancées
 LdapLdapsServersPage.SslStartTlsKeystore=Magasin de clé SSL/Start TLS
 LdapLdapsServersPage.SupportedAuthenticationMechanisms=Méchanismes d'authentification supportés
+LdapLdapsServersPage.WantClientAuth=Authentification Client Demandée
 
 LoadingPage.LoadingConfiguration=Chargement de la configuration
 LoadingPage.LoadingConfigurationEllipsis=Chargement de la configuration...
@@ -80,6 +93,7 @@ OverviewPage.AdvancedOptionsConfiguratio
 OverviewPage.AdvancedPartitionsConfiguration=Configuration avancée des partitions...
 OverviewPage.AllowAnonymousAccess=Autoriser l'accès anonyme
 OverviewPage.EnableAccessControl=Activer le contrôle d'accès
+OverviewPage.EnableHiddenPassword=Masquer les mots de passe
 OverviewPage.EnableKerberosChangePasswordServer=Activer le serveur Kerberos Change Password
 OverviewPage.EnableKerberosServer=Activer le serveur Kerberos
 OverviewPage.EnableLdapServer=Activer le serveur LDAP

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.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/EntryBasedConfigurationPartition.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java Mon Mar 23 17:59:02 2015
@@ -29,6 +29,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.partition.ldif.AbstractLdifPartition;
 
@@ -43,10 +44,8 @@ public class EntryBasedConfigurationPart
     /**
      * Creates a new instance of ReadOnlyConfigurationPartition.
      *
-     * @param inputStream
-     *      the input stream
-     * @param schemaManager
-     *      the schema manager
+     * @param inputStream the input stream
+     * @param schemaManager the schema manager
      */
     public EntryBasedConfigurationPartition( SchemaManager schemaManager )
     {
@@ -60,7 +59,7 @@ public class EntryBasedConfigurationPart
     protected void doInit() throws InvalidNameException, Exception
     {
         setId( "config" ); //$NON-NLS-1$
-        setSuffixDn( new Dn( "ou=config" ) ); //$NON-NLS-1$
+        setSuffixDn( new Dn( ServerDNConstants.CONFIG_DN ) ); //$NON-NLS-1$
 
         super.doInit();
     }
@@ -69,8 +68,7 @@ public class EntryBasedConfigurationPart
     /**
      * Adds the given entry.
      *
-     * @param entry
-     *      the entry
+     * @param entry the entry
      * @throws Exception
      */
     public void addEntry( Entry entry ) throws Exception

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=1668692&r1=1668691&r2=1668692&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 Mar 23 17:59:02 2015
@@ -24,11 +24,13 @@ package org.apache.directory.studio.apac
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 
 import javax.naming.directory.SearchResult;
 
+import org.apache.directory.api.ldap.model.constants.LdapConstants;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.entry.AttributeUtils;
 import org.apache.directory.api.ldap.model.entry.DefaultEntry;
@@ -39,10 +41,18 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.ldap.model.schema.SchemaManager;
 import org.apache.directory.server.config.ConfigPartitionReader;
+import org.apache.directory.server.config.ConfigPartitionInitializer;
 import org.apache.directory.server.config.ReadOnlyConfigurationPartition;
 import org.apache.directory.server.config.beans.ConfigBean;
+import org.apache.directory.server.core.api.CacheService;
+import org.apache.directory.server.core.api.DnFactory;
+import org.apache.directory.server.core.api.InstanceLayout;
+import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition;
+import org.apache.directory.server.core.partition.ldif.LdifPartition;
 import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
+import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPluginConstants;
+import org.apache.directory.studio.apacheds.configuration.v2.editor.Configuration;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ConnectionServerConfigurationInput;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.NewServerConfigurationInput;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ServerConfigurationEditor;
@@ -57,11 +67,14 @@ import org.apache.directory.studio.ldapb
 import org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPathEditorInput;
 import org.eclipse.ui.part.FileEditorInput;
+import org.osgi.framework.Bundle;
 
 
 /**
@@ -78,8 +91,7 @@ public class LoadConfigurationRunnable i
     /**
      * Creates a new instance of LoadConfigurationRunnable.
      * 
-     * @param editor
-     *            the editor
+     * @param editor the editor
      */
     public LoadConfigurationRunnable( ServerConfigurationEditor editor )
     {
@@ -124,25 +136,31 @@ public class LoadConfigurationRunnable i
 
         try
         {
-            final ConfigBean configBean = getConfiguration( input, monitor );
-            if ( configBean != null )
+            final Configuration configuration = getConfiguration( input, monitor );
+            
+            if ( configuration != null )
             {
                 Display.getDefault().asyncExec( new Runnable()
                 {
                     public void run()
                     {
-                        editor.configurationLoaded( configBean );
+                        editor.configurationLoaded( configuration );
                     }
                 } );
             }
         }
         catch ( Exception e )
         {
+            ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                new Status( Status.ERROR, "org.apache.directory.studio.apacheds.configuration.v2", 
+                    e.getMessage() ) );
+
             // Reporting the error to the monitor
             monitor.reportError( e );
 
             // Reporting the error to the editor
             final Exception exception = e;
+            
             Display.getDefault().asyncExec( new Runnable()
             {
                 public void run()
@@ -157,24 +175,25 @@ public class LoadConfigurationRunnable i
     /**
      * Gets the configuration from the input.
      * 
-     * @param input
-     *      the editor input
-     * @param monitor
-     *      the studio progress monitor
-     * @return
-     *      the configuration
-     * @throws Exception
+     * @param input the editor input
+     * @param monitor the studio progress monitor
+     * @return the configuration
+     * @throws Exception If the configuration wasn't correctly read
      */
-    public ConfigBean getConfiguration( IEditorInput input, StudioProgressMonitor monitor ) throws Exception
+    public Configuration getConfiguration( IEditorInput input, StudioProgressMonitor monitor ) throws Exception
     {
         String inputClassName = input.getClass().getName();
+        
         // If the input is a NewServerConfigurationInput, then we only 
         // need to get the server configuration and return
         if ( input instanceof NewServerConfigurationInput )
         {
-            InputStream is = ApacheDS2ConfigurationPlugin.class.getResourceAsStream( "config.ldif" ); //$NON-NLS-1$
-            return readConfiguration( is );
+            Bundle bundle = Platform.getBundle( "org.apache.directory.server.config" );
+            URL resource = bundle.getResource( "config.ldif" );
+            InputStream is = resource.openStream();
+            return readSingleFileConfiguration( is );
         }
+
         // If the input is a ConnectionServerConfigurationInput, then we 
         // read the server configuration from the selected connection
         if ( input instanceof ConnectionServerConfigurationInput )
@@ -185,13 +204,13 @@ public class LoadConfigurationRunnable i
         // The 'FileEditorInput' class is used when the file is opened
         // from a project in the workspace.
         {
-            InputStream is = ( ( FileEditorInput ) input ).getFile().getContents();
-            return readConfiguration( is );
+            File file = ( ( FileEditorInput ) input ).getFile().getLocation().toFile();
+            return readConfiguration( file );
         }
         else if ( input instanceof IPathEditorInput )
         {
-            InputStream is = new FileInputStream( new File( ( ( IPathEditorInput ) input ).getPath().toOSString() ) );
-            return readConfiguration( is );
+            File file = ( ( IPathEditorInput ) input ).getPath().toFile();
+            return readConfiguration( file );
         }
         else if ( inputClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" ) //$NON-NLS-1$
             || inputClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) ) //$NON-NLS-1$
@@ -201,8 +220,8 @@ public class LoadConfigurationRunnable i
         // opening a file from the menu File > Open... in Eclipse 3.3.x
         {
             // We use the tooltip to get the full path of the file
-            InputStream is = new FileInputStream( new File( input.getToolTipText() ) );
-            return readConfiguration( is );
+            File file = new File( input.getToolTipText() );
+            return readConfiguration( file );
         }
 
         return null;
@@ -212,45 +231,83 @@ public class LoadConfigurationRunnable i
     /**
      * Reads the configuration from the given input stream.
      *
-     * @param is
-     *      the input stream
-     * @return
-     *      the associated configuration bean
-     * @throws Exception
+     * @param is the input stream
+     * @return the associated configuration bean
+     * @throws Exception if we weren't able to load the configuration
      */
-    public static ConfigBean readConfiguration( InputStream is ) throws Exception
+    public static Configuration readConfiguration( File file ) throws Exception
     {
-        if ( is != null )
+        if ( file != null )
         {
-            // Creating a partition associated from the input stream
-            ReadOnlyConfigurationPartition configurationPartition = new ReadOnlyConfigurationPartition( is,
-                ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager() );
-            configurationPartition.initialize();
-
-            // Reading the configuration partition
-            return readConfiguration( configurationPartition );
-
+            if(file.getName().equals( ApacheDS2ConfigurationPluginConstants.CONFIG_LDIF )) {
+                return readSingleFileConfiguration( file );
+            }
+            else if(file.getName().equals( ApacheDS2ConfigurationPluginConstants.OU_CONFIG_LDIF )) {
+                return readMultiFileConfigureation( file.getParentFile() );
+            }
         }
 
         return null;
     }
 
 
+    private static Configuration readSingleFileConfiguration( File configLdifFile ) throws Exception
+    {
+        InputStream is = new FileInputStream( configLdifFile );
+
+        // Reading the configuration partition
+        return readSingleFileConfiguration( is );
+    }
+
+
+    private static Configuration readSingleFileConfiguration( InputStream is ) throws Exception
+    {
+        // Creating a partition associated from the input stream
+        ReadOnlyConfigurationPartition configurationPartition = new ReadOnlyConfigurationPartition( is,
+            ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager() );
+        CacheService cacheService = new CacheService();
+        cacheService.initialize( null );
+        configurationPartition.setCacheService( cacheService );
+
+        configurationPartition.initialize();
+
+        // Reading the configuration partition
+        return readConfiguration( configurationPartition );
+    }
+
+
+    private static Configuration readMultiFileConfigureation( File confDirectory ) throws Exception
+    {
+        InstanceLayout instanceLayout = new InstanceLayout( confDirectory.getParentFile() );
+
+        CacheService cacheService = new CacheService();
+        cacheService.initialize( null );
+
+        SchemaManager schemaManager = ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager();
+
+        DnFactory dnFactory = null;
+
+        ConfigPartitionInitializer init = new ConfigPartitionInitializer( instanceLayout, dnFactory, cacheService, schemaManager );
+        LdifPartition configurationPartition = init.initConfigPartition();
+
+        return readConfiguration( configurationPartition );
+    }
+
+
     /**
      * Reads the configuration from the given partition.
      *
-     * @param partition
-     *      the configuration partition
-     * @return
-     *      the associated configuration bean
-     * @throws LdapException
+     * @param partition the configuration partition
+     * @return the associated configuration bean
+     * @throws LdapException if we weren't able to load the configuration
      */
-    private static ConfigBean readConfiguration( AbstractBTreePartition partition ) throws LdapException
+    private static Configuration readConfiguration( AbstractBTreePartition partition ) throws LdapException
     {
         if ( partition != null )
         {
             ConfigPartitionReader cpReader = new ConfigPartitionReader( partition );
-            return cpReader.readConfig();
+            ConfigBean configBean = cpReader.readConfig();
+            return new Configuration( configBean, partition );
         }
 
         return null;
@@ -260,16 +317,12 @@ public class LoadConfigurationRunnable i
     /**
      * Reads the configuration from the given connection.
      *
-     * @param input
-     *      the editor input
-     * @param monitor 
-     *      the studio progress monitor
-     * @return
-     *      the associated configuration bean
-     * @throws Exception
+     * @param input the editor input
+     * @param monitor the studio progress monitor
+     * @return the associated configuration bean
+     * @throws Exception if we weren't able to load the configuration
      */
-    private ConfigBean readConfiguration( ConnectionServerConfigurationInput input,
-        StudioProgressMonitor monitor ) throws Exception
+    private Configuration readConfiguration( ConnectionServerConfigurationInput input, StudioProgressMonitor monitor ) throws Exception
     {
         if ( input != null )
         {
@@ -282,6 +335,9 @@ public class LoadConfigurationRunnable i
             // Creating and initializing the configuration partition
             EntryBasedConfigurationPartition configurationPartition = new EntryBasedConfigurationPartition(
                 schemaManager );
+            CacheService cacheService = new CacheService();
+            cacheService.initialize( null );
+            configurationPartition.setCacheService( cacheService );
             configurationPartition.initialize();
 
             // Opening the connection
@@ -289,8 +345,9 @@ public class LoadConfigurationRunnable i
 
             // Creating the search parameter
             SearchParameter configSearchParameter = new SearchParameter();
-            configSearchParameter.setSearchBase( new Dn( "ou=config" ) ); //$NON-NLS-1$
-            configSearchParameter.setFilter( "(objectClass=*)" ); //$NON-NLS-1$
+            configSearchParameter.setSearchBase( new Dn( ServerDNConstants.CONFIG_DN ) ); //$NON-NLS-1$
+            //configSearchParameter.setSearchBase( new Dn( "ou=config" ) ); //$NON-NLS-1$
+            configSearchParameter.setFilter( LdapConstants.OBJECT_CLASS_STAR ); //$NON-NLS-1$
             configSearchParameter.setScope( SearchScope.OBJECT );
             configSearchParameter.setReturningAttributes( SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
 
@@ -313,11 +370,15 @@ public class LoadConfigurationRunnable i
                 configEntry = new DefaultEntry( schemaManager, AttributeUtils.toEntry(
                     searchResult.getAttributes(), new Dn( searchResult.getNameInNamespace() ) ) );
             }
+            
             enumeration.close();
 
             // Verifying we found the 'ou=config' base entry
             if ( configEntry == null )
             {
+                ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                    new Status( Status.ERROR, "org.apache.directory.studio.apacheds.configuration.v2", 
+                        Messages.getString( "LoadConfigurationRunnable.UnableToFindConfigBaseEntry" ) ) );
                 throw new LdapNoSuchObjectException(
                     Messages.getString( "LoadConfigurationRunnable.UnableToFindConfigBaseEntry" ) ); //$NON-NLS-1$
             }
@@ -362,6 +423,7 @@ public class LoadConfigurationRunnable i
                     // Adding the children to the list of entries
                     entries.add( childEntry );
                 }
+                
                 childrenEnumeration.close();
             }
 
@@ -388,6 +450,7 @@ public class LoadConfigurationRunnable i
         if ( connection != null && !connection.getConnectionWrapper().isConnected() )
         {
             connection.getConnectionWrapper().connect( monitor );
+            
             if ( connection.getConnectionWrapper().isConnected() )
             {
                 connection.getConnectionWrapper().bind( monitor );
@@ -400,6 +463,7 @@ public class LoadConfigurationRunnable i
                 {
                     listener.connectionOpened( connection, monitor );
                 }
+                
                 ConnectionEventRegistry.fireConnectionOpened( connection, input );
             }
         }

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/Messages.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/Messages.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/Messages.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/Messages.java Mon Mar 23 17:59:02 2015
@@ -26,18 +26,23 @@ import java.util.ResourceBundle;
 import org.eclipse.osgi.util.NLS;
 
 
+/**
+ * This class get messages from the resources file.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class Messages extends NLS
 {
-    private static final String BUNDLE_NAME = "org.apache.directory.studio.apacheds.configuration.v2.jobs.messages"; //$NON-NLS-1$
-
-    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
-
-    private Messages()
-    {
-    }
-
-
+    /** The resource name */
+    private static final ResourceBundle RESOURCE_BUNDLE = 
+        ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );
+    
+    /**
+     * Get back a message from the resource file given a key
+     * 
+     * @param key The key associated with the message
+     * @return The found message
+     */
     public static String getString( String key )
     {
         try

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.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/PartitionsDiffComputer.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java Mon Mar 23 17:59:02 2015
@@ -24,6 +24,8 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.directory.api.ldap.model.constants.LdapConstants;
+import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.entry.Attribute;
 import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.api.ldap.model.entry.DefaultModification;
@@ -45,8 +47,17 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.api.partition.Partition;
+import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
+import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPluginConstants;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 
 
+/**
+ * A class used to computer a difference between two partitions.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class PartitionsDiffComputer
 {
     /** The original partition */
@@ -56,11 +67,20 @@ public class PartitionsDiffComputer
     private Partition destinationPartition;
 
 
+    /**
+     * Creates an instance of the PartitionsDiffComputer class
+     */
     public PartitionsDiffComputer()
     {
     }
 
 
+    /**
+     * Creates an instance of the PartitionsDiffComputer class, with an original partition
+     * and a distination partition
+     * @param originalPartition The original partition
+     * @param destinationPartition The destination partition
+     */
     public PartitionsDiffComputer( Partition originalPartition, Partition destinationPartition )
     {
         this.originalPartition = originalPartition;
@@ -68,21 +88,40 @@ public class PartitionsDiffComputer
     }
 
 
+    /**
+     * Compute the difference between two partitions
+     * @return The list of modified entries
+     * @throws Exception If the comparison has filed
+     */
     public List<LdifEntry> computeModifications() throws Exception
     {
         // Using the original partition suffix as base 
         // '*' for all user attributes, '+' for all operational attributes
         return computeModifications( originalPartition.getSuffixDn(), new String[]
-            { "*", "+" } ); //$NON-NLS-1$ //$NON-NLS-2$
+            { SchemaConstants.ALL_USER_ATTRIBUTES, SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES } );
     }
 
 
+    /**
+     * Compute the difference between two partitions
+     * @param attributeIds The list of attributes to compare
+     * @return The list of modified entries
+     * @throws Exception If the comparison has filed
+     */
     public List<LdifEntry> computeModifications( String[] attributeIds ) throws Exception
     {
         return computeModifications( originalPartition.getSuffixDn(), attributeIds );
     }
 
 
+    /**
+     * Compare two partitions, checking a list of attributes
+     * 
+     * @param baseDn The base DN for the partitions
+     * @param attributeIds The list of attributes to check
+     * @return The list of modifications
+     * @throws Exception If the comparison has filed
+     */
     public List<LdifEntry> computeModifications( Dn baseDn, String[] attributeIds ) throws Exception
     {
         // Checking partitions
@@ -102,34 +141,34 @@ public class PartitionsDiffComputer
         // Checking the original partition
         if ( originalPartition == null )
         {
-            throw new PartitionsDiffException( "The original partition must not be 'null'." ); //$NON-NLS-1$
+            throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.OriginalPartitionIsNull" ) );
         }
         else
         {
             if ( !originalPartition.isInitialized() )
             {
-                throw new PartitionsDiffException( "The original partition must be intialized." ); //$NON-NLS-1$
+                throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.OriginalPartitionNotInitialized" ) );
             }
             else if ( originalPartition.getSuffixDn() == null )
             {
-                throw new PartitionsDiffException( "The original suffix is null." ); //$NON-NLS-1$
+                throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.OriginalSuffixIsNull" ) );
             }
         }
 
         // Checking the destination partition
         if ( destinationPartition == null )
         {
-            throw new PartitionsDiffException( "The destination partition must not be 'null'." ); //$NON-NLS-1$
+            throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.DestinationPartitionIsNull" ) );
         }
         else
         {
             if ( !destinationPartition.isInitialized() )
             {
-                throw new PartitionsDiffException( "The destination partition must be intialized." ); //$NON-NLS-1$
+                throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.DestinationPartitionNotInitialized" ) );
             }
             else if ( destinationPartition.getSuffixDn() == null )
             {
-                throw new PartitionsDiffException( "The destination suffix is null." ); //$NON-NLS-1$
+                throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.DestinationPartitionIsNull" ) );
             }
         }
     }
@@ -138,13 +177,10 @@ public class PartitionsDiffComputer
     /**
      * Compare the two partitions.
      *
-     * @param baseDn
-     *      the base Dn
-     * @param attributeIds
-     *      the IDs of the attributes
-     * @return
-     *      a list containing LDIF entries with all modifications
-     * @throws Exception
+     * @param baseDn the base Dn
+     * @param attributeIds the IDs of the attributes
+     * @return a list containing LDIF entries with all modifications
+     * @throws Exception If the operation failed
      */
     public List<LdifEntry> comparePartitions( Dn baseDn, String[] attributeIds ) throws PartitionsDiffException
     {
@@ -154,11 +190,11 @@ public class PartitionsDiffComputer
         try
         {
             // Looking up the original base entry
-            Entry originalBaseEntry = originalPartition
-                .lookup( new LookupOperationContext( null, baseDn, attributeIds ) );
+            Entry originalBaseEntry = originalPartition.lookup( new LookupOperationContext( null, baseDn, attributeIds ) );
+            
             if ( originalBaseEntry == null )
             {
-                throw new PartitionsDiffException( "Unable to find the base entry in the original partition." ); //$NON-NLS-1$
+                throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.PartitionNotFound" ) );
             }
 
             // Creating the list containing all the original entries to be processed
@@ -179,6 +215,7 @@ public class PartitionsDiffComputer
                 // Looking for the equivalent entry in the destination partition
                 Entry destinationEntry = destinationPartition.lookup( new LookupOperationContext( null, originalEntry
                     .getDn(), attributeIds ) );
+                
                 if ( destinationEntry != null )
                 {
                     // Setting the changetype to delete
@@ -197,6 +234,7 @@ public class PartitionsDiffComputer
 
                 // Checking if modifications occurred on the original entry
                 ChangeType modificationEntryChangeType = modificationEntry.getChangeType();
+                
                 if ( modificationEntryChangeType != ChangeType.None )
                 {
                     if ( modificationEntryChangeType == ChangeType.Delete
@@ -211,7 +249,7 @@ public class PartitionsDiffComputer
                 // Creating a search operation context to get the children of the current entry
                 SearchOperationContext soc = new SearchOperationContext( null, originalEntry.getDn(),
                     SearchScope.ONELEVEL,
-                    FilterParser.parse( originalPartition.getSchemaManager(), "(objectClass=*)" ), attributeIds ); //$NON-NLS-1$
+                    FilterParser.parse( originalPartition.getSchemaManager(), LdapConstants.OBJECT_CLASS_STAR ), attributeIds ); //$NON-NLS-1$
                 soc.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
 
                 // Looking for the children of the current entry
@@ -231,9 +269,13 @@ public class PartitionsDiffComputer
             // Looking up the destination base entry
             Entry destinationBaseEntry = destinationPartition
                 .lookup( new LookupOperationContext( null, baseDn, attributeIds ) );
+            
             if ( destinationBaseEntry == null )
             {
-                throw new PartitionsDiffException( "Unable to find the base entry in the destination partition." ); //$NON-NLS-1$
+                ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                    new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                        Messages.getString( "PartitionDiffComputer.PartitionNotFound" ) ) );
+                throw new PartitionsDiffException( Messages.getString( "PartitionDiffComputer.PartitionNotFound" ) );
             }
 
             // Creating the list containing all the destination entries to be processed
@@ -250,6 +292,7 @@ public class PartitionsDiffComputer
                 // Looking for the equivalent entry in the destination partition
                 Entry originalEntry = originalPartition.lookup( new LookupOperationContext( null, destinationEntry
                     .getDn(), attributeIds ) );
+
                 // We're only looking for new entries, modified or removed 
                 // entries have already been computed
                 if ( originalEntry == null )
@@ -288,7 +331,10 @@ public class PartitionsDiffComputer
         }
         catch ( Exception e )
         {
-            // e.printStackTrace();
+            ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                    Messages.getString( "PartitionDiffComputer.ComparePartitions" ) ) );
+
             throw new PartitionsDiffException( e );
         }
 
@@ -299,12 +345,9 @@ public class PartitionsDiffComputer
     /**
      * Compares the two given entries.
      *
-     * @param originalEntry
-     *      the original entry
-     * @param destinationEntry
-     *      the destination entry
-     * @param modificationEntry
-     *      the modification LDIF entry holding the modifications 
+     * @param originalEntry the original entry
+     * @param destinationEnt the destination entry
+     * @param modificationEntry the modification LDIF entry holding the modifications 
      *      between both entries
      */
     private void compareEntries( Entry originalEntry, Entry destinationEntry, LdifEntry modificationEntry )
@@ -365,7 +408,13 @@ public class PartitionsDiffComputer
                         }
                         catch ( LdapInvalidAttributeValueException liave )
                         {
-                            // TODO : handle the exception
+                            ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                                new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                                    Messages.getString( "PartitionDiffComputer.InvalidAttributeException" ) ) );
+
+                            ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                                new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                                    liave.getLocalizedMessage() ) );
                         }
                     }
 
@@ -379,12 +428,9 @@ public class PartitionsDiffComputer
     /**
      * Compares the two given attributes.
      *
-     * @param originalAttribute
-     *      the original attribute
-     * @param destinationAttribute
-     *      the destination attribute
-     * @param modificationEntry
-     *      the modification LDIF entry holding the modifications 
+     * @param originalAttribute the original attribute
+     * @param destinationAttribute the destination attribute
+     * @param modificationEntry the modification LDIF entry holding the modifications 
      *      between both attributes
      */
     private void compareAttributes( Attribute originalAttribute, Attribute destinationAttribute,
@@ -410,7 +456,13 @@ public class PartitionsDiffComputer
                 }
                 catch ( LdapInvalidAttributeValueException liave )
                 {
-                    // TODO : handle the exception
+                    ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                        new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                            Messages.getString( "PartitionDiffComputer.InvalidAttributeException" ) ) );
+
+                    ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                        new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                            liave.getLocalizedMessage() ) );
                 }
 
                 modificationEntry.addModification( modification );
@@ -436,7 +488,13 @@ public class PartitionsDiffComputer
                 }
                 catch ( LdapInvalidAttributeValueException liave )
                 {
-                    // TODO : handle the exception
+                    ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                        new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                            Messages.getString( "PartitionDiffComputer.InvalidAttributeException" ) ) );
+
+                    ApacheDS2ConfigurationPlugin.getDefault().getLog().log( 
+                        new Status( IStatus.ERROR, ApacheDS2ConfigurationPluginConstants.PLUGIN_ID, 
+                            liave.getLocalizedMessage() ) );
                 }
 
                 modificationEntry.addModification( modification );
@@ -448,8 +506,7 @@ public class PartitionsDiffComputer
     /**
      * Gets the original partition.
      *
-     * @return
-     *      the original partition
+     * @return the original partition
      */
     public Partition getOriginalPartition()
     {
@@ -460,8 +517,7 @@ public class PartitionsDiffComputer
     /**
      * Sets the original partition.
      *
-     * @param originalPartition
-     *      the original partition
+     * @param originalPartition the original partition
      */
     public void setOriginalPartition( Partition originalPartition )
     {
@@ -472,8 +528,7 @@ public class PartitionsDiffComputer
     /**
      * Gets the destination partition.
      *
-     * @return
-     *      the destination partition
+     * @return the destination partition
      */
     public Partition getDestinationPartition()
     {
@@ -484,8 +539,7 @@ public class PartitionsDiffComputer
     /**
      * Sets the destination partition.
      *
-     * @param destinationPartition
-     *      the destination partition
+     * @param destinationPartition the destination partition
      */
     public void setDestinationPartition( Partition destinationPartition )
     {

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffException.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/PartitionsDiffException.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffException.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffException.java Mon Mar 23 17:59:02 2015
@@ -43,10 +43,8 @@ public class PartitionsDiffException ext
     /**
      * Constructs a new PartitionsDiffException with the specified detail message and cause.
      *
-     * @param message
-     *      the message
-     * @param cause
-     *      the cause
+     * @param message the message
+     * @param cause the cause
      */
     public PartitionsDiffException( String message, Throwable cause )
     {
@@ -57,8 +55,7 @@ public class PartitionsDiffException ext
     /**
      * Constructs a new PartitionsDiffException with the specified detail message.
      *
-     * @param message
-     *      the message
+     * @param message the message
      */
     public PartitionsDiffException( String message )
     {
@@ -70,8 +67,7 @@ public class PartitionsDiffException ext
      * Constructs a new exception with the specified cause and a detail message 
      * of <code>(cause==null ? null : cause.toString())</code>
      *
-     * @param cause
-     *      the cause
+     * @param cause the cause
      */
     public PartitionsDiffException( Throwable cause )
     {

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/SaveConfigurationRunnable.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/SaveConfigurationRunnable.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/SaveConfigurationRunnable.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/SaveConfigurationRunnable.java Mon Mar 23 17:59:02 2015
@@ -21,6 +21,8 @@
 package org.apache.directory.studio.apacheds.configuration.v2.jobs;
 
 
+import java.io.File;
+
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ConnectionServerConfigurationInput;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.NewServerConfigurationInput;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ServerConfigurationEditor;
@@ -31,7 +33,6 @@ import org.eclipse.core.runtime.IProgres
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPathEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
 
 
 /**
@@ -48,8 +49,7 @@ public class SaveConfigurationRunnable i
     /**
      * Creates a new instance of SaveConfigurationRunnable.
      * 
-     * @param editor
-     *            the editor
+     * @param editor the editor
      */
     public SaveConfigurationRunnable( ServerConfigurationEditor editor )
     {
@@ -100,16 +100,7 @@ public class SaveConfigurationRunnable i
                 IEditorInput input = editor.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
-                    ServerConfigurationEditorUtils.saveConfiguration( ( FileEditorInput ) input,
-                        editor.getConfigWriter(),
-                        monitor );
-                    success = true;
-                }
+
                 // If the input is a ConnectionServerConfigurationInput, then we 
                 // read the server configuration from the selected connection
                 if ( input instanceof ConnectionServerConfigurationInput )
@@ -122,8 +113,9 @@ public class SaveConfigurationRunnable i
                 else if ( input instanceof IPathEditorInput )
                 {
                     // Saving the ServerConfiguration to disk
-                    ServerConfigurationEditorUtils
-                        .saveConfiguration( ( ( IPathEditorInput ) input ).getPath().toFile(), editor.getConfigWriter() );
+                    File file = ( ( IPathEditorInput ) input ).getPath().toFile();
+                    ServerConfigurationEditorUtils.saveConfiguration( file, editor.getConfigWriter(),
+                        editor.getConfiguration() );
                     success = true;
                 }
                 else if ( inputClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" ) //$NON-NLS-1$
@@ -134,7 +126,9 @@ public class SaveConfigurationRunnable i
                 // opening a file from the menu File > Open... in Eclipse 3.3.x
                 {
                     // Saving the ServerConfiguration to disk
-                    ServerConfigurationEditorUtils.saveConfiguration( input.getToolTipText(), editor.getConfigWriter() );
+                    File file = new File( input.getToolTipText() );
+                    ServerConfigurationEditorUtils.saveConfiguration( file, editor.getConfigWriter(),
+                        editor.getConfiguration() );
                     success = true;
                 }
                 else if ( input instanceof NewServerConfigurationInput )

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/messages.properties?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/messages.properties (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/messages.properties Mon Mar 23 17:59:02 2015
@@ -22,3 +22,13 @@ LoadConfigurationRunnable.UnableToLoadCo
 SaveConfigurationRunnable.SaveConfiguration=Save Configuration
 SaveConfigurationRunnable.SavingServerConfiguration=Saving server configuration
 SaveConfigurationRunnable.UnableToSaveConfiguration=Unable to save configuration.
+
+PartitionDiffComputer.InvalidAttributeException=Invalid Attribute Value.
+PartitionDiffComputer.ComparePartitions=Failure while comparing two partitions.
+PartitionDiffComputer.PartitionNotFound=Unable to find the base entry in the destination partition.
+PartitionDiffComputer.DestinationSuffixIsNull=The destination suffix is null.
+PartitionDiffComputer.DestinationPartitionNotInitialized=The destination partition must be intialized.
+PartitionDiffComputer.DestinationPartitionIsNull=The destination partition must not be 'null'.
+PartitionDiffComputer.OriginalPartitionIsNull=The original partition must not be 'null'.
+PartitionDiffComputer.OriginalPartitionNotInitialized=The original partition must be intialized.
+PartitionDiffComputer.OriginalSuffixIsNull=The original suffix is null.

Modified: directory/studio/trunk/plugins/apacheds.configuration/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/pom.xml?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/pom.xml (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/pom.xml Mon Mar 23 17:59:02 2015
@@ -24,262 +24,12 @@
     <groupId>org.apache.directory.studio</groupId>
     <artifactId>parent-plugins</artifactId>
     <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../</relativePath>
   </parent>
   
-  <artifactId>apacheds.configuration</artifactId>
+  <artifactId>org.apache.directory.studio.apacheds.configuration</artifactId>
   <name>Apache Directory Studio ApacheDS Configuration</name>
-  <packaging>jar</packaging>
+  <packaging>eclipse-plugin</packaging>
 
   <description />
-  
-  <build>
-    <resources>
-      <resource>
-        <directory>.</directory>
-        <includes>
-          <include>plugin.xml</include>
-          <include>plugin*.properties</include>
-          <include>about.ini</include>
-          <include>studio.png</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>resources</directory>
-        <targetPath>resources</targetPath>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-      </resource>
-      <resource>
-        <directory>src/main/java</directory>
-        <includes>
-          <include>**/*.properties</include>
-        </includes>
-      </resource>
-    </resources>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-eclipse-plugin</artifactId>
-        <configuration>
-          <skip>false</skip>
-          <pde>true</pde>
-          <additionalProjectnatures>
-            <projectnature>org.eclipse.pde.PluginNature</projectnature>
-            <projectnature>org.eclipse.jdt.core.javanature</projectnature>
-          </additionalProjectnatures>
-          <classpathContainers>
-            <classpathContainer>org.eclipse.pde.core.requiredPlugins</classpathContainer>
-          </classpathContainers>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.directory.studio</groupId>
-        <artifactId>studio-maven-plugin</artifactId>
-        <configuration>
-          <skip>false</skip>
-          <createManifest>true</createManifest>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>prepare-jar-package</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
-            <addMavenDescriptor>false</addMavenDescriptor>
-          </archive>
-        </configuration>
-      </plugin>
-     <!-- MANIFEST.MF Generation -->
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>META-INF</manifestLocation>
-          <instructions>            
-            <Bundle-SymbolicName>${project.groupId}.${project.artifactId};singleton:=true</Bundle-SymbolicName>
-            <Bundle-Localization>plugin</Bundle-Localization>
-            <Eclipse-LazyStart>true</Eclipse-LazyStart>
-            <Bundle-Activator>org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPlugin</Bundle-Activator>
-            <Require-Bundle>org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.validversion}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.validversion}",
- org.apache.directory.studio.common.ui,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.jface.text,
- org.eclipse.ui,
- org.eclipse.ui.editors,
- org.eclipse.ui.forms,
- org.eclipse.ui.ide,
- org.dom4j.dom4j;bundle-version="${org.dom4j.version}"</Require-Bundle>
-            <Export-Package>org.apache.directory.studio.apacheds.configuration.*</Export-Package>
-            <Import-Package>!*</Import-Package>
-          </instructions>
-        </configuration>
-        <executions>
-          <execution>
-            <id>generate-manifest</id>
-            <phase>process-classes</phase>
-            <goals>
-              <goal>manifest</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <!-- No tests to run -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.rat</groupId>
-          <artifactId>apache-rat-plugin</artifactId>
-          <configuration>
-            <excludeSubProjects>false</excludeSubProjects>
-            <excludes>
-              <!-- MAVEN_DEFAULT_EXCLUDES -->
-              <exclude>**/target/**/*</exclude>
-              <exclude>**/cobertura.ser</exclude>
-              <!-- ECLIPSE_DEFAULT_EXCLUDES -->
-              <exclude>**/.classpath</exclude>
-              <exclude>**/.project</exclude>
-              <exclude>**/.settings/**/*</exclude>
-              <!-- IDEA_DEFAULT_EXCLUDES -->
-              <exclude>**/*.iml</exclude>
-              <exclude>**/*.ipr</exclude>
-              <exclude>**/*.iws</exclude>
-              <!-- MANIFEST_MF_EXCLUDES -->
-              <exclude>**/MANIFEST.MF</exclude>
-              <!-- Missing license header in dependency reduced pom, see http://jira.codehaus.org/browse/MSHADE-48 -->
-              <exclude>**/dependency-reduced-pom.xml</exclude>
-              <!-- GITIGNORE_EXCLUDES -->
-              <exclude>**/.gitignore</exclude>
-              <!-- ABOUT_EXCLUDES -->
-              <exclude>**/about.ini</exclude>
-              <exclude>**/about_files/*</exclude>
-              <!-- LOG_FILES_EXCLUDES -->
-              <exclude>**/*.log</exclude>
-              <exclude>**/*.vm</exclude>
-              <!-- OTHER_EXCLUDES -->
-              <exclude>src/main/resources/org/apache/directory/studio/apacheds/configuration/spring-beans.dtd</exclude>
-            </excludes>
-          </configuration>
-         </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-
-  <dependencies>
-  	<!-- Apache Directory Studio library plugins dependencies -->
-    <dependency>
-      <groupId>org.apache.directory.api</groupId>
-      <artifactId>api-ldap-model</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.directory.api</groupId>
-      <artifactId>api-util</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.directory.studio</groupId>
-      <artifactId>org.dom4j.dom4j</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    
-  	<!-- Apache Directory Studio plugins dependencies -->
-    <dependency>
-      <groupId>org.apache.directory.studio</groupId>
-      <artifactId>common.ui</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    
-	<!-- Eclipse plugins dependencies -->
-    <dependency>
-      <groupId>org.eclipse.swt.gtk.linux</groupId>
-      <artifactId>x86</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.core</groupId>
-      <artifactId>contenttype</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.core</groupId>
-      <artifactId>resources</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.core</groupId>
-      <artifactId>jobs</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse</groupId>
-      <artifactId>jface</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.ui</groupId>
-      <artifactId>editors</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.ui</groupId>
-      <artifactId>forms</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.ui</groupId>
-      <artifactId>ide</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.ui</groupId>
-      <artifactId>workbench</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.core</groupId>
-      <artifactId>runtime</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.equinox</groupId>
-      <artifactId>common</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.equinox</groupId>
-      <artifactId>registry</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.core</groupId>
-      <artifactId>commands</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse</groupId>
-      <artifactId>osgi</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
 </project>

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/Messages.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/Messages.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/Messages.java Mon Mar 23 17:59:02 2015
@@ -24,18 +24,23 @@ import java.util.MissingResourceExceptio
 import java.util.ResourceBundle;
 
 
+/**
+ * This class get messages from the resources file.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class Messages
 {
-    private static final String BUNDLE_NAME = "org.apache.directory.studio.apacheds.configuration.messages"; //$NON-NLS-1$
-
-    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
-
-    private Messages()
-    {
-    }
-
-
+    /** The resource name */
+    private static final ResourceBundle RESOURCE_BUNDLE = 
+        ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );
+    
+    /**
+     * Get back a message from the resource file given a key
+     * 
+     * @param key The key associated with the message
+     * @return The found message
+     */
     public static String getString( String key )
     {
         try

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/Messages.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/Messages.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/Messages.java Mon Mar 23 17:59:02 2015
@@ -24,18 +24,23 @@ import java.util.MissingResourceExceptio
 import java.util.ResourceBundle;
 
 
+/**
+ * This class get messages from the resources file.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class Messages
 {
-    private static final String BUNDLE_NAME = "org.apache.directory.studio.apacheds.configuration.editor.messages"; //$NON-NLS-1$
-
-    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
-
-    private Messages()
-    {
-    }
-
-
+    /** The resource name */
+    private static final ResourceBundle RESOURCE_BUNDLE = 
+        ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );
+    
+    /**
+     * Get back a message from the resource file given a key
+     * 
+     * @param key The key associated with the message
+     * @return The found message
+     */
     public static String getString( String key )
     {
         try

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/Messages.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/Messages.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/Messages.java Mon Mar 23 17:59:02 2015
@@ -24,18 +24,23 @@ import java.util.MissingResourceExceptio
 import java.util.ResourceBundle;
 
 
+/**
+ * This class get messages from the resources file.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class Messages
 {
-    private static final String BUNDLE_NAME = "org.apache.directory.studio.apacheds.configuration.editor.v154.messages"; //$NON-NLS-1$
-
-    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
-
-    private Messages()
-    {
-    }
-
-
+    /** The resource name */
+    private static final ResourceBundle RESOURCE_BUNDLE = 
+        ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );
+    
+    /**
+     * Get back a message from the resource file given a key
+     * 
+     * @param key The key associated with the message
+     * @return The found message
+     */
     public static String getString( String key )
     {
         try

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/dialogs/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/dialogs/Messages.java?rev=1668692&r1=1668691&r2=1668692&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/dialogs/Messages.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/dialogs/Messages.java Mon Mar 23 17:59:02 2015
@@ -24,18 +24,23 @@ import java.util.MissingResourceExceptio
 import java.util.ResourceBundle;
 
 
+/**
+ * This class get messages from the resources file.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class Messages
 {
-    private static final String BUNDLE_NAME = "org.apache.directory.studio.apacheds.configuration.editor.v154.dialogs.messages"; //$NON-NLS-1$
-
-    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
-
-    private Messages()
-    {
-    }
-
-
+    /** The resource name */
+    private static final ResourceBundle RESOURCE_BUNDLE = 
+        ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );
+    
+    /**
+     * Get back a message from the resource file given a key
+     * 
+     * @param key The key associated with the message
+     * @return The found message
+     */
     public static String getString( String key )
     {
         try



Mime
View raw message