You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2015/04/01 03:01:43 UTC

svn commit: r1670531 [1/14] - in /directory/studio/trunk/plugins/openldap.config.editor: ./ resources/icons/ src/main/java/org/apache/directory/studio/openldap/config/ src/main/java/org/apache/directory/studio/openldap/config/actions/ src/main/java/org...

Author: elecharny
Date: Wed Apr  1 01:01:42 2015
New Revision: 1670531

URL: http://svn.apache.org/r1670531
Log:
Re-injected the plugin, using the most recent version

Added:
    directory/studio/trunk/plugins/openldap.config.editor/resources/icons/attribute.gif   (with props)
    directory/studio/trunk/plugins/openldap.config.editor/resources/icons/database.gif   (with props)
    directory/studio/trunk/plugins/openldap.config.editor/resources/icons/export.gif   (with props)
    directory/studio/trunk/plugins/openldap.config.editor/resources/icons/import.gif   (with props)
    directory/studio/trunk/plugins/openldap.config.editor/resources/icons/index.png   (with props)
    directory/studio/trunk/plugins/openldap.config.editor/resources/icons/information.gif   (with props)
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/ExpandedLdifUtils.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginUtils.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapSchemaLoader.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorExportConfigurationAction.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorImportConfigurationAction.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenDirectoryConfigurationAction.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/AbstractServerConfigurationInput.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/DirectoryServerConfigurationInput.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/OptionsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/AbstractDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/BerkeleyDbDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabaseTypeEnum.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabaseWrapper.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/MdbDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/NullDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/RelayDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractOverlayDialogConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbConfigurationDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/IndexDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialogConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayType.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PurgeTimeSpan.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationConsumerDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationOptionsDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationSaslDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RwmMappingDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ValueSortingValueDialog.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/AccessLogOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/AuditLogOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/MemberOfOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/PasswordPolicyOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/ReferentialIntegrityOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/RewriteRemapOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/SyncProvOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/overlays/ValueSortingOverlayConfigurationBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfigLockDetectEnum.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndex.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndexTypeEnum.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMdbConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOf.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOfDanglingReferenceBehaviorEnum.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcModuleList.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcRefintConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcRwmConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcRwmMapValue.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcRwmMapValueTypeEnum.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcValSortConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcValSortMethodEnum.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcValSortValue.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/io/ConfigurationUtils.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/widgets/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/widgets/IndicesWidget.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/widgets/LockDetectWidget.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/resources/org/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/resources/org/apache/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/resources/org/apache/directory/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/resources/org/apache/directory/studio/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/resources/org/apache/directory/studio/openldap/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/resources/org/apache/directory/studio/openldap/config/
    directory/studio/trunk/plugins/openldap.config.editor/src/main/resources/org/apache/directory/studio/openldap/config/openldapconfig.ldif
    directory/studio/trunk/plugins/openldap.config.editor/src/test/java/org/apache/directory/studio/openldap/config/
    directory/studio/trunk/plugins/openldap.config.editor/src/test/java/org/apache/directory/studio/openldap/config/editor/
    directory/studio/trunk/plugins/openldap.config.editor/src/test/java/org/apache/directory/studio/openldap/config/editor/dialogs/
    directory/studio/trunk/plugins/openldap.config.editor/src/test/java/org/apache/directory/studio/openldap/config/editor/dialogs/PurgeTimeSpanTest.java
    directory/studio/trunk/plugins/openldap.config.editor/src/test/java/org/apache/directory/studio/openldap/config/model/
    directory/studio/trunk/plugins/openldap.config.editor/src/test/java/org/apache/directory/studio/openldap/config/model/OlcValSortValueParserTest.java
Removed:
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/BdbDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabaseType.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/HdbDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/NoneDatabaseSpecificDetailsBlock.java
Modified:
    directory/studio/trunk/plugins/openldap.config.editor/pom-first.xml
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/Messages.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPlugin.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginConstants.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenConfigurationAction.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ConnectionServerConfigurationInput.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ErrorPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/LoadingPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/OverviewPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditor.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorUtils.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationInput.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesMasterDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/FrontendDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/LdifDatabaseSpecificDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/AccessLogOverlayDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/AuditLogOverlayDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/ChainOverlayDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/DistProcOverlayDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/OverlayType.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/OverlaysMasterDetailsBlock.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/OverlaysPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/PBindAccessOverlayDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/PasswordPolicyOverlayDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/overlays/SyncProvOverlayDetailsPage.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/EntryBasedConfigurationPartition.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/LoadConfigurationRunnable.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/AuxiliaryObjectClass.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAccessLogConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAuditlogConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcChainConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDatabaseConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDistProcConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcFrontendConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcGlobal.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcHdbConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLDAPConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLdifConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMonitorConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcNullConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcOverlayConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcPBindConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcPPolicyConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcRelayConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcSchemaConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcSyncProvConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OpenLdapConfiguration.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/io/ConfigurationException.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/io/ConfigurationReader.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/io/ConfigurationWriter.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/io/SaveConfigurationRunnable.java

Modified: directory/studio/trunk/plugins/openldap.config.editor/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/pom-first.xml?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/pom-first.xml (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/pom-first.xml Wed Apr  1 01:01:42 2015
@@ -51,9 +51,8 @@
 
             <Import-Package>org.apache.directory.api.ldap.model.name,
  org.apache.directory.server.core.api.interceptor.context,
- org.apache.directory.api.ldap.schema.manager.impl,
- net.sf.ehcache,
- org.slf4j</Import-Package> 
+ org.apache.directory.api.ldap.schema.manager.impl
+ </Import-Package> 
             
             <Require-Bundle>org.apache.directory.server.core.api;bundle-version="${org.apache.directory.server.bundleversion}",
  org.apache.directory.server.ldif.partition;bundle-version="${org.apache.directory.server.bundleversion}",
@@ -61,18 +60,25 @@
  org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.extras.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.studio.openldap.common.ui,
+ org.apache.directory.studio.openldap.syncrepl,
  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.apache.directory.studio.ldapbrowser.common,
  org.apache.directory.studio.ldapbrowser.core,
  org.eclipse.core.runtime,
  org.eclipse.core.resources,
  org.eclipse.ui,
  org.eclipse.ui.editors,
  org.eclipse.ui.forms,
- org.eclipse.ui.ide</Require-Bundle>
+ org.eclipse.ui.ide,
+ org.apache.servicemix.bundles.antlr,
+ net.sf.ehcache,
+ slf4j.api</Require-Bundle>
           </instructions>
         </configuration>
         <executions>

Added: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/attribute.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/resources/icons/attribute.gif?rev=1670531&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/attribute.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/database.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/resources/icons/database.gif?rev=1670531&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/database.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/export.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/resources/icons/export.gif?rev=1670531&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/export.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/import.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/resources/icons/import.gif?rev=1670531&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/import.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/index.png
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/resources/icons/index.png?rev=1670531&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/index.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/information.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/resources/icons/information.gif?rev=1670531&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/plugins/openldap.config.editor/resources/icons/information.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/ExpandedLdifUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/ExpandedLdifUtils.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/ExpandedLdifUtils.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/ExpandedLdifUtils.java Wed Apr  1 01:01:42 2015
@@ -0,0 +1,356 @@
+/*
+ *  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.openldap.config;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
+import org.apache.directory.api.ldap.model.ldif.LdifEntry;
+import org.apache.directory.api.ldap.model.ldif.LdifReader;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.util.tree.DnNode;
+import org.apache.directory.studio.openldap.config.model.io.ConfigurationException;
+import org.apache.directory.studio.openldap.config.model.io.ConfigurationUtils;
+
+/**
+ * This class implements an reader for an expanded LDIF format.
+ * <p>
+ * This format consists in a hierarchy ldif files, each one representing an entry,
+ * and hierarchically organized in associated directories.
+ * <p>
+ * NOTE: This implementation is specific to the OpenLDAP "slapd.d" directory.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class ExpandedLdifUtils 
+{
+    /** The LDIF file extension (.ldif) */
+    private static final String LDIF_FILE_EXTENSION = ".ldif";
+
+    /** A filter used to pick all the LDIF files */
+    private static FileFilter ldifFileFilter = new FileFilter()
+    {
+        public boolean accept( File dir )
+        {
+            if ( dir.getName().endsWith( LDIF_FILE_EXTENSION ) )
+            {
+                return dir.isFile();
+            }
+            else
+            {
+                return false;
+            }
+        }
+    };
+
+
+    /**
+     * Reads the given directory location.
+     *
+     * @param directory the directory
+     * @return the corresponding node hierarchy
+     * @throws IOException if an error occurred
+     */
+    public static DnNode<Entry> read( File directory ) throws IOException, LdapException
+    {
+        DnNode<Entry> tree = new DnNode<Entry>();
+
+        readDirectory( directory, Dn.EMPTY_DN, tree );
+
+        return tree;
+    }
+
+
+    /**
+     * Reads the given directory.
+     *
+     * @param directory the directory
+     * @param tree the tree
+     * @return the corresponding node
+     * @throws IOException
+     * @throws LdapException
+     */
+    private static void readDirectory( File directory, Dn parentDn, DnNode<Entry> tree ) throws IOException,
+        LdapException
+    {
+        if ( directory != null )
+        {
+            // Checking if the directory exists
+            if ( !directory.exists() )
+            {
+                throw new IOException( "Location '" + directory + "' does not exist." );
+            }
+
+            // Checking if the directory is a directory
+            if ( !directory.isDirectory() )
+            {
+                throw new IOException( "Location '" + directory + "' is not a directory." );
+            }
+
+            // Checking if the directory is readable
+            if ( !directory.canRead() )
+            {
+                throw new IOException( "Directory '" + directory + "' can not be read." );
+            }
+
+            // Getting the array of ldif files
+            File[] ldifFiles = directory.listFiles( ldifFileFilter );
+
+            if ( ( ldifFiles != null ) && ( ldifFiles.length != 0 ) )
+            {
+                LdifReader ldifReader = new LdifReader();
+
+                // Looping on LDIF files
+                for ( File ldifFile : ldifFiles )
+                {
+                    // Checking if the LDIF file is a file
+                    if ( !ldifFile.isFile() )
+                    {
+                        throw new IOException( "Location '" + ldifFile + "' is not a file." );
+                    }
+
+                    // Checking if the LDIF file is readable
+                    if ( !ldifFile.canRead() )
+                    {
+                        throw new IOException( "LDIF file '" + ldifFile + "' can not be read." );
+                    }
+
+                    // Computing the DN of the entry
+                    Dn entryDn = parentDn.add( stripExtension( ldifFile.getName() ) );
+
+                    // Reading the LDIF file
+                    List<LdifEntry> ldifEntries = null;
+
+                    try
+                    {
+                        ldifEntries = ldifReader.parseLdifFile( ldifFile.getAbsolutePath() );
+                    }
+                    finally
+                    {
+                        ldifReader.close();
+                    }
+
+                    // The LDIF file should have only one entry
+                    if ( ( ldifEntries != null ) && ( ldifEntries.size() == 1 ) )
+                    {
+                        // Getting the LDIF entry
+                        LdifEntry ldifEntry = ldifEntries.get( 0 );
+
+                        if ( ldifEntry != null )
+                        {
+                            // Getting the entry
+                            Entry entry = ldifEntry.getEntry();
+
+                            if ( entry != null )
+                            {
+                                // Refactoring the DN to set the "FULL" DN of the entry
+                                entry.setDn( entryDn );
+
+                                // Creating the new entry node
+                                tree.add( entryDn, entry );
+
+                                // Creating a file without the LDIF extension (corresponding to children directory)
+                                File childrenDirectoryFile = new File( stripExtension( ldifFile.getAbsolutePath() ) );
+
+                                // If the directory exists, recursively read it
+                                if ( childrenDirectoryFile.exists() )
+                                {
+                                    readDirectory( childrenDirectoryFile, entryDn, tree );
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Strips the file extension.
+     *
+     * @param path the path
+     * @return the path without the file extension
+     */
+    private static String stripExtension( String path )
+    {
+        if ( ( path != null ) && ( path.length() > 0 ) )
+        {
+            return path.substring( 0, path.lastIndexOf( '.' ) );
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Writes the given tree to the directory.
+     *
+     * @param tree the tree
+     * @param directory the directory
+     * @throws IOException if an error occurs
+     */
+    public static void write( DnNode<Entry> tree, File directory ) throws IOException
+    {
+        try
+        {
+            write( tree, ConfigurationUtils.getDefaultConfigurationDn(), directory );
+        }
+        catch ( ConfigurationException e )
+        {
+            throw new IOException( e );
+        }
+    }
+
+
+    /**
+     * Writes the entry and its children from the given tree and DN, to the directory.
+     *
+     * @param tree the tree
+     * @param dn the dn of the entry
+     * @param directory the directory
+     * @throws IOException if an error occurs
+     */
+    public static void write( DnNode<Entry> tree, Dn dn, File directory ) throws IOException
+    {
+        // Checking if the directory is null
+        if ( directory == null )
+        {
+            throw new IOException( "Location is 'null'." );
+        }
+
+        // Checking if the directory exists
+        if ( !directory.exists() )
+        {
+            throw new IOException( "Location '" + directory + "' does not exist." );
+        }
+
+        // Checking if the directory is a directory
+        if ( !directory.isDirectory() )
+        {
+            throw new IOException( "Location '" + directory + "' is not a directory." );
+        }
+
+        // Checking if the directory is writable
+        if ( !directory.canWrite() )
+        {
+            throw new IOException( "Directory '" + directory + "' can not be written." );
+        }
+
+        // Getting the entry node
+        DnNode<Entry> node = tree.getNode( dn );
+
+        // Only creating a file if the node contains an entry
+        if ( node.hasElement() )
+        {
+            // Getting the entry
+            Entry entry = node.getElement();
+
+            // Getting the DN of the entry
+            Dn entryDn = entry.getDn();
+
+            // Setting the RDN as DN (specific to OpenLDAP implementation)
+            try
+            {
+                entry.setDn( new Dn( entryDn.getRdn() ) );
+            }
+            catch ( LdapInvalidDnException e )
+            {
+                throw new IOException( e );
+            }
+
+            // Writing the LDIF file to the disk
+            FileWriter fw = null;
+            try
+            {
+                fw = new FileWriter( new File( directory, getLdifFilename( entry.getDn() ) ) );
+                fw.write( new LdifEntry( entry ).toString() );
+            }
+            finally
+            {
+                // Closing the file write in any case
+                if ( fw != null )
+                {
+                    fw.close();
+                }
+            }
+
+            // Checking if the entry has children
+            if ( node.hasChildren() )
+            {
+                // Creating the child directory on disk
+                File childDirectory = new File( directory, getFilename( entry.getDn() ) );
+                childDirectory.mkdir();
+
+                // Iterating on all children
+                for ( DnNode<Entry> childNode : node.getChildren().values() )
+                {
+                    if ( childNode.hasElement() )
+                    {
+                        // Recursively call the method with the child node and directory
+                        write( tree, childNode.getDn(), childDirectory );
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Gets the filename for the given DN.
+     *
+     * @param dn the DN
+     * @return the associated LDIF filename
+     */
+    private static String getLdifFilename( Dn dn )
+    {
+        String filename = getFilename( dn );
+
+        if ( filename != null )
+        {
+            return filename + LDIF_FILE_EXTENSION;
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Gets the filename for the given DN.
+     *
+     * @param dn the DN
+     * @return the associated LDIF filename
+     */
+    private static String getFilename( Dn dn )
+    {
+        if ( ( dn != null ) && ( dn.size() > 0 ) )
+        {
+            return dn.getRdn().toString();
+        }
+
+        return null;
+    }
+}

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/Messages.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/Messages.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/Messages.java Wed Apr  1 01:01:42 2015
@@ -24,6 +24,10 @@ import java.util.MissingResourceExceptio
 import java.util.ResourceBundle;
 
 
+/**
+ * 
+ * @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.openldap.config"; //$NON-NLS-1$

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPlugin.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPlugin.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPlugin.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPlugin.java Wed Apr  1 01:01:42 2015
@@ -24,6 +24,8 @@ import java.io.IOException;
 import java.net.URL;
 import java.util.PropertyResourceBundle;
 
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
@@ -35,6 +37,8 @@ import org.osgi.framework.BundleContext;
 
 /**
  * The activator class controls the plug-in life cycle.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class OpenLdapConfigurationPlugin extends AbstractUIPlugin
 {
@@ -44,19 +48,49 @@ public class OpenLdapConfigurationPlugin
     /** The plugin properties */
     private PropertyResourceBundle properties;
 
+    /** The schema manager */
+    private SchemaManager schemaManager;
+
 
     /**
-     * Creates a new instance of ApacheDS2ConfigurationPlugin.
+     * Creates a new instance of OpenLdapConfigurationPlugin.
      */
     public OpenLdapConfigurationPlugin()
     {
         plugin = this;
     }
 
+    
+    /**
+     * Gets the schema manager.
+     *
+     * @return the schema manager
+     * @throws Exception if an error occurred
+     */
+    public synchronized SchemaManager getSchemaManager() throws Exception
+    {
+        if ( schemaManager == null )
+        {
+            // Initializing the schema manager
+            schemaManager = new DefaultSchemaManager( new OpenLdapSchemaLoader() );
+
+            // Loading only the OpenLDAP schema (and its dependencies)
+            schemaManager.loadWithDeps( OpenLdapSchemaLoader.OPENLDAPCONFIG_SCHEMA_NAME );
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+            // Checking if no error occurred when loading the schemas
+            if ( schemaManager.getErrors().size() != 0 )
+            {
+                schemaManager = null;
+                throw new Exception( "Could not load the OpenLDAP schema correctly." );
+            }
+        }
+
+        return schemaManager;
+    }
+
+
+    /**
+     * {@inheritDoc}
      */
     public void start( BundleContext context ) throws Exception
     {
@@ -64,9 +98,8 @@ public class OpenLdapConfigurationPlugin
     }
 
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+    /**
+     * {@inheritDoc}
      */
     public void stop( BundleContext context ) throws Exception
     {
@@ -77,8 +110,7 @@ public class OpenLdapConfigurationPlugin
     /**
      * Returns the shared instance.
      *
-     * @return
-     *      the shared instance
+     * @return the shared instance
      */
     public static OpenLdapConfigurationPlugin getDefault()
     {
@@ -90,8 +122,7 @@ public class OpenLdapConfigurationPlugin
      * Use this method to get SWT images. Use the IMG_ constants from
      * PluginConstants for the key.
      *
-     * @param key
-     *                The key (relative path to the image in filesystem)
+     * @param key The key (relative path to the image in filesystem)
      * @return The image descriptor or null
      */
     public ImageDescriptor getImageDescriptor( String key )
@@ -99,10 +130,15 @@ public class OpenLdapConfigurationPlugin
         if ( key != null )
         {
             URL url = FileLocator.find( getBundle(), new Path( key ), null );
+            
             if ( url != null )
+            {   	
                 return ImageDescriptor.createFromURL( url );
+            }
             else
+            {
                 return null;
+            }
         }
         else
         {
@@ -119,22 +155,24 @@ public class OpenLdapConfigurationPlugin
      * Note: Don't dispose the returned SWT Image. It is disposed
      * automatically when the plugin is stopped.
      *
-     * @param key
-     *                The key (relative path to the image in filesystem)
+     * @param key The key (relative path to the image in filesystem)
      * @return The SWT Image or null
      */
     public Image getImage( String key )
     {
         Image image = getImageRegistry().get( key );
+        
         if ( image == null )
         {
             ImageDescriptor id = getImageDescriptor( key );
+            
             if ( id != null )
             {
                 image = id.createImage();
                 getImageRegistry().put( key, image );
             }
         }
+        
         return image;
     }
 
@@ -142,8 +180,7 @@ public class OpenLdapConfigurationPlugin
     /**
      * Gets the plugin properties.
      *
-     * @return
-     *      the plugin properties
+     * @return the plugin properties
      */
     public PropertyResourceBundle getPluginProperties()
     {

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginConstants.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginConstants.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginConstants.java Wed Apr  1 01:01:42 2015
@@ -22,6 +22,8 @@ package org.apache.directory.studio.open
 
 /**
  * This interface contains all the Constants used in the Plugin.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public interface OpenLdapConfigurationPluginConstants
 {
@@ -32,7 +34,12 @@ public interface OpenLdapConfigurationPl
     // ------
     // IMAGES
     // ------
-    public static final String IMG_EDITOR = "resources/icons/editor.gif"; //$NON-NLS-1$
+    public static final String IMG_ATTRIBUTE = "resources/icons/attribute.gif"; //$NON-NLS-1$
     public static final String IMG_DATABASE = "resources/icons/database.gif"; //$NON-NLS-1$
+    public static final String IMG_EDITOR = "resources/icons/editor.gif"; //$NON-NLS-1$
+    public static final String IMG_EXPORT = "resources/icons/export.gif"; //$NON-NLS-1$
+    public static final String IMG_INDEX = "resources/icons/index.png"; //$NON-NLS-1$
+    public static final String IMG_INFORMATION = "resources/icons/information.gif"; //$NON-NLS-1$
+    public static final String IMG_IMPORT = "resources/icons/import.gif"; //$NON-NLS-1$
     public static final String IMG_OVERLAY = "resources/icons/overlay.gif"; //$NON-NLS-1$
 }

Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginUtils.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginUtils.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapConfigurationPluginUtils.java Wed Apr  1 01:01:42 2015
@@ -0,0 +1,218 @@
+/*
+ *  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.openldap.config;
+
+import java.util.List;
+
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.util.Strings;
+
+/**
+ * The class is a utility class for the OpenLDAP Configuration Plugin
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OpenLdapConfigurationPluginUtils 
+{
+    /**
+     * Strips the ordering prefix if the given string contains one.
+     *
+     * @param s the string
+     * @return the string without the ordering prefix
+     */
+    public static String stripOrderingPrefix( String s )
+    {
+        if ( hasOrderingPrefix( s ) )
+        {
+            int indexOfClosingCurlyBracket = s.indexOf( '}' );
+
+            if ( indexOfClosingCurlyBracket != -1 )
+            {
+                return s.substring( indexOfClosingCurlyBracket + 1 );
+            }
+        }
+
+        return s;
+    }
+
+
+    /**
+     * Indicates if the given string contains an ordering prefix.
+     *
+     * @param s the string
+     * @return <code>true</code> if the given string contains an ordering prefix,
+     *         <code>false</code> if not.
+     */
+    public static boolean hasOrderingPrefix( String s )
+    {
+        return parseOrderingPrefix( s ) != null;
+    }
+
+
+    /**
+     * Fetch the prefix from a String. The prefix must respect the folloing regexp :
+     * <pre>
+     * ^\{-?\d+\}
+     * </pre>
+     */
+    private static Integer parseOrderingPrefix( String prefixString )
+    {
+        if ( prefixString == null )
+        {
+            return null;
+        }
+
+        int pos = 0;
+
+        if ( !Strings.isCharASCII( prefixString, pos++, '{') )
+        {
+            return null;
+        }
+
+        boolean positive = true;
+        int prefix = 0;
+
+        if ( !Strings.isCharASCII( prefixString, pos, '-') )
+        {
+            positive = false;
+        }
+
+        char car;
+
+        while ( ( car = Strings.charAt( prefixString, pos++ ) ) != '\0' )
+        {
+            switch ( car )
+            {
+                case '0':
+                case '1':
+                case '2':
+                case '3':
+                case '4':
+                case '5':
+                case '6':
+                case '7':
+                case '8':
+                case '9':
+                    prefix = prefix * 10 + car - '0';
+                    break;
+
+                case '}' :
+                    if ( positive )
+                    {
+                        return prefix;
+                    }
+                    else
+                    {
+                        return -prefix;
+                    }
+
+                default :
+                    return null;
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Gets the ordering prefix value (or -1 if none is found).
+     *
+     * @param prefixString the string
+     * @return the precedence value (or -1 if none is found).
+     */
+    public static int getOrderingPrefix( String prefixString )
+    {
+        Integer orderingPrefix = parseOrderingPrefix( prefixString );
+
+        if ( orderingPrefix == null )
+        {
+            return -1;
+        }
+        else
+        {
+            return orderingPrefix;
+        }
+    }
+
+
+    /**
+     * Gets the first value of the given list of values.
+     *
+     * @param values the list of values
+     * @return the first value if it exists.
+     */
+    public static String getFirstValueString( List<String> values )
+    {
+        if ( ( values != null ) && ( values.size() > 0 ) )
+        {
+            return values.get( 0 );
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Gets the first value of the given list of values.
+     *
+     * @param values the list of values
+     * @return the first value if it exists.
+     */
+    public static String getFirstValueDn( List<Dn> values )
+    {
+        if ( ( values != null ) && ( values.size() > 0 ) )
+        {
+            return values.get( 0 ).toString();
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Concatenates a list of string values.
+     * Values are separated by a comma and a space (", ").
+     *
+     * @param list
+     * @return
+     */
+    public static String concatenate( List<String> list )
+    {
+        StringBuilder sb = new StringBuilder();
+        boolean isFirst = true;
+
+        for ( String string : list )
+        {
+            if ( isFirst )
+            {
+                isFirst = false;
+            }
+            else
+            {
+                sb.append( ", " );
+            }
+
+            sb.append( string );
+        }
+
+        return sb.toString();
+    }
+}

Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapSchemaLoader.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapSchemaLoader.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/OpenLdapSchemaLoader.java Wed Apr  1 01:01:42 2015
@@ -0,0 +1,176 @@
+/*
+ *  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.openldap.config;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.ldif.LdifReader;
+import org.apache.directory.api.ldap.model.schema.registries.Schema;
+import org.apache.directory.api.ldap.model.schema.registries.DefaultSchema;
+import org.apache.directory.api.ldap.schema.loader.JarLdifSchemaLoader;
+
+/**
+ * This class implements a {@link SchemaLoader} based on the OpenLDAP schema bundled
+ * with the class, as well as a set of low level base schemas from ApacheDS.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OpenLdapSchemaLoader extends JarLdifSchemaLoader
+{
+    /** The name of the OpenLDAP Config schema */
+    public static final String OPENLDAPCONFIG_SCHEMA_NAME = "openldapconfig";
+
+    /** The name of the LDIF file for the OpenLDAP Config schema */
+    private static final String OPENLDAPCONFIG_SHEMA_LDIF = "openldapconfig.ldif";
+
+    /** The attribute type pattern */
+    private static final Pattern ATTRIBUTE_TYPE_PATTERN = Pattern.compile( "m-oid\\s*=\\s*[0-9\\.]*\\s*"
+        + ",\\s*ou\\s*=\\s*attributetypes\\s*,\\s*cn\\s*=\\s*" + OPENLDAPCONFIG_SCHEMA_NAME + "\\s*,\\s*ou=schema\\s*",
+        Pattern.CASE_INSENSITIVE );
+
+    /** The object class pattern */
+    private static final Pattern OBJECT_CLASS_PATTERN = Pattern.compile( "m-oid\\s*=\\s*[0-9\\.]*\\s*"
+        + ",\\s*ou\\s*=\\s*objectclasses\\s*,\\s*cn\\s*=\\s*" + OPENLDAPCONFIG_SCHEMA_NAME + "\\s*,\\s*ou=schema\\s*",
+        Pattern.CASE_INSENSITIVE );
+
+    /** The attribute types entries */
+    private List<Entry> attributeTypesEntries = new ArrayList<Entry>();
+
+    /** The object classes entries */
+    private List<Entry> objectClassesEntries = new ArrayList<Entry>();
+
+
+    /**
+     * Creates a new instance of ConnectionSchemaLoader.
+     *
+     * @throws Exception
+     */
+    public OpenLdapSchemaLoader() throws Exception
+    {
+        super();
+        initializeSchema();
+        initializeSchemaObjects();
+    }
+
+
+    /**
+     * Initializes the schema.
+     */
+    private void initializeSchema()
+    {
+        Schema schema = new DefaultSchema( OPENLDAPCONFIG_SCHEMA_NAME );
+        schema.addDependencies( new String[]
+            { "system", "core", "apache" } );
+        schemaMap.put( schema.getSchemaName(), schema );
+    }
+
+
+    /**
+     * Initializes the schema objects.
+     *
+     * @throws Exception
+     */
+    private void initializeSchemaObjects() throws Exception
+    {
+        LdifReader ldifReader = null;
+
+        try
+        {
+            // Reading the schema file
+            ldifReader = new LdifReader( OpenLdapSchemaLoader.class.getResourceAsStream( OPENLDAPCONFIG_SHEMA_LDIF ) );
+
+            // Looping on all entries
+            while ( ldifReader.hasNext() )
+            {
+                // Getting the LDIF entry and DN
+                Entry entry = ldifReader.next().getEntry();
+                String dn = entry.getDn().getName();
+
+                // Checking if the entry is an attribute type
+                if ( ATTRIBUTE_TYPE_PATTERN.matcher( dn ).matches() )
+                {
+                    attributeTypesEntries.add( entry );
+                }
+                // Checking if the entry is an object class
+                else if ( OBJECT_CLASS_PATTERN.matcher( dn ).matches() )
+                {
+                    objectClassesEntries.add( entry );
+                }
+            }
+        }
+        finally
+        {
+            // Closing the LDIF reader
+            if ( ldifReader != null )
+            {
+                ldifReader.close();
+            }
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public List<Entry> loadAttributeTypes( Schema... schemas ) throws LdapException, IOException
+    {
+        // Getting the attribute types from the supertype implementation
+        List<Entry> attributeTypes = super.loadAttributeTypes( schemas );
+
+        for ( Schema schema : schemas )
+        {
+            // Checking if this is the OpenLDAP schema
+            if ( OPENLDAPCONFIG_SCHEMA_NAME.equals( schema.getSchemaName() ) )
+            {
+                // Add all attribute types
+                attributeTypes.addAll( attributeTypesEntries );
+            }
+        }
+
+        return attributeTypes;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public List<Entry> loadObjectClasses( Schema... schemas ) throws LdapException, IOException
+    {
+        // Getting the object classes from the supertype implementation
+        List<Entry> objectClasses = super.loadObjectClasses( schemas );
+
+        for ( Schema schema : schemas )
+        {
+            // Checking if this is the OpenLDAP schema
+            if ( OPENLDAPCONFIG_SCHEMA_NAME.equals( schema.getSchemaName() ) )
+            {
+                // Add all object classes
+                objectClasses.addAll( objectClassesEntries );
+            }
+        }
+
+        return objectClasses;
+    }
+}

Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorExportConfigurationAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorExportConfigurationAction.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorExportConfigurationAction.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorExportConfigurationAction.java Wed Apr  1 01:01:42 2015
@@ -0,0 +1,91 @@
+/*
+ *  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.openldap.config.actions;
+
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
+
+import org.apache.directory.studio.openldap.config.OpenLdapConfigurationPlugin;
+import org.apache.directory.studio.openldap.config.OpenLdapConfigurationPluginConstants;
+import org.apache.directory.studio.openldap.config.editor.ServerConfigurationEditor;
+import org.apache.directory.studio.openldap.config.editor.ServerConfigurationEditorUtils;
+
+
+/**
+ * This class implements the create connection action for an OpenLDAP server.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class EditorExportConfigurationAction extends Action
+{
+    /** The associated editor */
+    private ServerConfigurationEditor editor;
+
+
+    /**
+     * Creates a new instance of EditorExportConfigurationAction.
+     *
+     * @param editor
+     *      the associated editor
+     */
+    public EditorExportConfigurationAction( ServerConfigurationEditor editor )
+    {
+        this.editor = editor;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ImageDescriptor getImageDescriptor()
+    {
+        return OpenLdapConfigurationPlugin.getDefault().getImageDescriptor(
+            OpenLdapConfigurationPluginConstants.IMG_EXPORT );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getText()
+    {
+        return "Export Configuration";
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run()
+    {
+        try
+        {
+            ServerConfigurationEditorUtils.saveAs( editor.getConfiguration(), false );
+        }
+        catch ( Exception e )
+        {
+            MessageDialog.openError( editor.getSite().getShell(), "Error Exporting Configuration File",
+                NLS.bind( "An error occurred when exporting the selected file:\n{0}", e.getMessage() ) );
+        }
+    }
+}

Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorImportConfigurationAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorImportConfigurationAction.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorImportConfigurationAction.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/EditorImportConfigurationAction.java Wed Apr  1 01:01:42 2015
@@ -0,0 +1,186 @@
+/*
+ *  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.openldap.config.actions;
+
+
+import java.io.File;
+
+import org.apache.directory.studio.common.ui.CommonUIUtils;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.DirectoryDialog;
+
+import org.apache.directory.studio.openldap.config.OpenLdapConfigurationPlugin;
+import org.apache.directory.studio.openldap.config.OpenLdapConfigurationPluginConstants;
+import org.apache.directory.studio.openldap.config.editor.ServerConfigurationEditor;
+import org.apache.directory.studio.openldap.config.model.OpenLdapConfiguration;
+import org.apache.directory.studio.openldap.config.model.io.ConfigurationReader;
+
+
+/**
+ * This class implements the create connection action for an OpenLDAP server.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class EditorImportConfigurationAction extends Action
+{
+    /** The associated editor */
+    private ServerConfigurationEditor editor;
+
+
+    /**
+     * Creates a new instance of EditorImportConfigurationAction.
+     *
+     * @param editor
+     *      the associated editor
+     */
+    public EditorImportConfigurationAction( ServerConfigurationEditor editor )
+    {
+        this.editor = editor;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ImageDescriptor getImageDescriptor()
+    {
+        return OpenLdapConfigurationPlugin.getDefault().getImageDescriptor(
+            OpenLdapConfigurationPluginConstants.IMG_IMPORT );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getText()
+    {
+        return "Import Configuration";
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run()
+    {
+        try
+        {
+            // Checking if the editor has unsaved modifications
+            if ( editor.isDirty() )
+            {
+                // Requiring a confirmation from the user before discarding the unsaved modifications
+                if ( !MessageDialog
+                    .openConfirm(
+                        editor.getSite().getShell(),
+                        "Unsaved Modifications",
+                        "The configuration has unsaved modifications. All recent changes will be lost. Are you sure you want to continue?" ) )
+                {
+                    return;
+                }
+            }
+
+            // The path of the directory
+            String path = null;
+
+            // Opening a dialog for directory selection
+            DirectoryDialog dialog = new DirectoryDialog( editor.getSite().getShell() );
+            dialog.setText( "Select Configuration Directory" );
+            dialog.setFilterPath( System.getProperty( "user.home" ) );
+
+            while ( true )
+            {
+                // Opening the dialog
+                path = dialog.open();
+
+                // Checking the returned path
+                if ( path == null )
+                {
+                    // Cancel button has been clicked
+                    return;
+                }
+
+                // Getting the directory indicated by the user
+                final File directory = new File( path );
+
+                // Checking if the directory exists
+                if ( !directory.exists() )
+                {
+                    CommonUIUtils.openErrorDialog( "The directory does not exist." );
+                    continue;
+                }
+
+                // Checking if the location is a directory
+                if ( !directory.isDirectory() )
+                {
+                    CommonUIUtils.openErrorDialog( "The location is not a directory." );
+                    continue;
+                }
+
+                // Checking if the directory is writable
+                if ( !directory.canRead() )
+                {
+                    CommonUIUtils.openErrorDialog( "The directory is not writable." );
+                    continue;
+                }
+
+                // The directory meets all requirements
+                break;
+            }
+
+            // Checking the directory
+            File configurationDirectory = new File( path );
+            if ( !configurationDirectory.exists() || !configurationDirectory.isDirectory()
+                || !configurationDirectory.canRead() )
+            {
+                // This is not a valid directory
+                return;
+            }
+
+            // Requiring a confirmation from the user
+            if ( !MessageDialog
+                .openConfirm(
+                    editor.getSite().getShell(),
+                    "Overwrite Existing Configuration",
+                    "Are you sure you want to overwrite the existing configuration with the contents of the selected file?" ) )
+            {
+                return;
+            }
+
+            // Reading the configuration of the file
+            OpenLdapConfiguration configuration = ConfigurationReader.readConfiguration( configurationDirectory );
+
+            // Resetting the configuration back to the editor
+            editor.resetConfiguration( configuration );
+        }
+        catch ( Exception e )
+        {
+            MessageDialog
+                .openError(
+                    editor.getSite().getShell(),
+                    "Error Importing Configuration File",
+                    NLS.bind(
+                        "An error occurred when importing the selected file:\n{0}\n\nIt does not seem to be a correct LDIF configuration file.",
+                        e.getMessage() ) );
+        }
+    }
+}

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenConfigurationAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenConfigurationAction.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenConfigurationAction.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenConfigurationAction.java Wed Apr  1 01:01:42 2015
@@ -26,15 +26,18 @@ import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 
 import org.apache.directory.studio.openldap.config.editor.ConnectionServerConfigurationInput;
 import org.apache.directory.studio.openldap.config.editor.ServerConfigurationEditor;
 
 
+/**
+ * This class implements the action which open the configuration.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class OpenConfigurationAction implements IObjectActionDelegate
 {
     /** The selected connection */
@@ -50,33 +53,14 @@ public class OpenConfigurationAction imp
         {
             try
             {
-                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-                try
-                {
-                    page.openEditor( new ConnectionServerConfigurationInput( selectedConnection ),
+                PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                    .openEditor( new ConnectionServerConfigurationInput( selectedConnection ),
                         ServerConfigurationEditor.ID );
-                }
-                catch ( PartInitException e )
-                {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
             }
             catch ( Exception e )
             {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
+                // Will never occur.
             }
-
-            //            try
-            //            {
-            //                ConfigurationReader.readConfiguration( selectedConnection );
-            //            }
-            //            catch ( Exception e )
-            //            {
-            //                // TODO Auto-generated catch block
-            //                e.printStackTrace();
-            //            }
         }
     }
 

Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenDirectoryConfigurationAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenDirectoryConfigurationAction.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenDirectoryConfigurationAction.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/actions/OpenDirectoryConfigurationAction.java Wed Apr  1 01:01:42 2015
@@ -0,0 +1,106 @@
+/*
+ *  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.openldap.config.actions;
+
+
+import java.io.File;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PartInitException;
+
+import org.apache.directory.studio.openldap.config.editor.DirectoryServerConfigurationInput;
+import org.apache.directory.studio.openldap.config.editor.ServerConfigurationEditor;
+
+
+/**
+ * This class implements the action that opens a directory based OpenLDAP configuration
+ * (asking the user the location of the 'slapd.d' directory).
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OpenDirectoryConfigurationAction extends Action implements IWorkbenchWindowActionDelegate
+{
+    /** The window */
+    private IWorkbenchWindow window;
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void init( IWorkbenchWindow window )
+    {
+        this.window = window;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run( IAction action )
+    {
+        // Creating a directory dialog for the user
+        // to select the "slapd.d" directory
+        DirectoryDialog dialog = new DirectoryDialog( window.getShell(), SWT.OPEN );
+        dialog.setText( "Choose 'slapd.d' folder..." );
+        dialog.setFilterPath( System.getProperty( "user.home" ) );
+
+        // Getting the directory selected by the user
+        String selectedDirectory = dialog.open();
+
+        if ( selectedDirectory != null )
+        {
+            try
+            {
+                window.getActivePage().openEditor( new DirectoryServerConfigurationInput( new File(
+                    selectedDirectory ) ), ServerConfigurationEditor.ID );
+            }
+            catch ( PartInitException e )
+            {
+                // Should never happen
+            }
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void selectionChanged( IAction action, ISelection selection )
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void dispose()
+    {
+        // TODO Auto-generated method stub
+
+    }
+}

Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/AbstractServerConfigurationInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/AbstractServerConfigurationInput.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/AbstractServerConfigurationInput.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/AbstractServerConfigurationInput.java Wed Apr  1 01:01:42 2015
@@ -0,0 +1,113 @@
+/*
+ *  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.openldap.config.editor;
+
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IPersistableElement;
+
+import org.apache.directory.studio.openldap.config.OpenLdapConfigurationPlugin;
+import org.apache.directory.studio.openldap.config.OpenLdapConfigurationPluginConstants;
+import org.apache.directory.studio.openldap.config.jobs.EntryBasedConfigurationPartition;
+
+
+/**
+ * This class represents the Server Configuration Input.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public abstract class AbstractServerConfigurationInput implements ServerConfigurationInput
+{
+    /** The original configuration partition */
+    protected EntryBasedConfigurationPartition originalPartition;
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public EntryBasedConfigurationPartition getOriginalPartition()
+    {
+        return originalPartition;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setOriginalPartition( EntryBasedConfigurationPartition originalPartition )
+    {
+        this.originalPartition = originalPartition;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getToolTipText()
+    {
+        return getName();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName()
+    {
+        return "OpenLDAP Configuration";
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean exists()
+    {
+        return true;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ImageDescriptor getImageDescriptor()
+    {
+        return OpenLdapConfigurationPlugin.getDefault().getImageDescriptor(
+            OpenLdapConfigurationPluginConstants.IMG_EDITOR );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public IPersistableElement getPersistable()
+    {
+        return null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object getAdapter( Class adapter )
+    {
+        return null;
+    }
+}

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ConnectionServerConfigurationInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ConnectionServerConfigurationInput.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ConnectionServerConfigurationInput.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ConnectionServerConfigurationInput.java Wed Apr  1 01:01:42 2015
@@ -21,25 +21,19 @@ package org.apache.directory.studio.open
 
 
 import org.apache.directory.studio.connection.core.Connection;
-import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-import org.apache.directory.studio.openldap.config.jobs.EntryBasedConfigurationPartition;
 
 
 /**
  * This class represents the Non Existing Server Configuration Input.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ConnectionServerConfigurationInput implements IEditorInput
+public class ConnectionServerConfigurationInput extends AbstractServerConfigurationInput
 {
     /** The connection */
     private Connection connection;
 
-    /** The original configuration partition */
-    private EntryBasedConfigurationPartition originalPartition;
-
 
     /**
      * Creates a new instance of ConnectionServerConfigurationInput.
@@ -66,18 +60,6 @@ public class ConnectionServerConfigurati
 
 
     /**
-     * Gets the original configuration partition.
-     *
-     * @return
-     *      the original configuration partition
-     */
-    public EntryBasedConfigurationPartition getOriginalPartition()
-    {
-        return originalPartition;
-    }
-
-
-    /**
      * {@inheritDoc}
      */
     public String getToolTipText()
@@ -107,33 +89,6 @@ public class ConnectionServerConfigurati
     /**
      * {@inheritDoc}
      */
-    public ImageDescriptor getImageDescriptor()
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public IPersistableElement getPersistable()
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object getAdapter( Class adapter )
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public boolean equals( Object obj )
     {
         if ( obj == null )
@@ -166,16 +121,4 @@ public class ConnectionServerConfigurati
     {
         return connection.hashCode();
     }
-
-
-    /**
-     * Sets the original configuration partition.
-     *
-     * @param originalPartition
-     *      the original configuration 
-     */
-    public void setOriginalPartition( EntryBasedConfigurationPartition originalPartition )
-    {
-        this.originalPartition = originalPartition;
-    }
 }