directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r598395 [1/7] - in /directory/sandbox/felixk: studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ studio-aciitemedito...
Date Mon, 26 Nov 2007 19:44:37 GMT
Author: felixk
Date: Mon Nov 26 11:44:28 2007
New Revision: 598395

URL: http://svn.apache.org/viewvc?rev=598395&view=rev
Log:
Update java files from trunk

Added:
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ApacheDSConfigurationContentDescriber.java   (with props)
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationContentTypeChecker.java   (with props)
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/DnUtils.java   (with props)
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java   (with props)
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java   (with props)
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java   (with props)
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java   (with props)
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java   (with props)
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioSearchResult.java   (with props)
    directory/sandbox/felixk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java   (with props)
    directory/sandbox/felixk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java   (with props)
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/EntryExistsCopyStrategyDialogImpl.java   (with props)
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/EntryExistsCopyStrategyDialog.java   (with props)
Modified:
    directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
    directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
    directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
    directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
    directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
    directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java
    directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
    directory/sandbox/felixk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/sandbox/felixk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java
    directory/sandbox/felixk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java
    directory/sandbox/felixk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java
    directory/sandbox/felixk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIPlugin.java
    directory/sandbox/felixk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserAction.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/CopyAction.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PasteAction.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
    directory/sandbox/felixk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionManager.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserCoreConstants.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserCorePlugin.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Control.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IRootDSE.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Password.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/filter/LdapAndFilterComponent.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/filter/LdapOrFilterComponent.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/filter/parser/LdapFilterToken.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/AttributeComparator.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java
    directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/BookmarkPropertyPage.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SearchPropertyPage.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/ValuePropertyPage.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ClearAction.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/OlderAction.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationLdifWizardPage.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java
    directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/ILdifEditor.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifDocumentProvider.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifOutlinePage.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractLdifAction.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifAnnotationUpdater.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifFoldingRegionUpdater.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAnnotationHover.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAutoEditStrategy.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDoubleClickStrategy.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifTextHover.java
    directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/widgets/LdifEditorWidget.java
    directory/sandbox/felixk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
    directory/sandbox/felixk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java

Modified: directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java (original)
+++ directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java Mon Nov 26 11:44:28 2007
@@ -233,9 +233,7 @@
         else if ( item.getClass() == ProtectedItem.RangeOfValues.class )
         {
             ProtectedItem.RangeOfValues rov = ( ProtectedItem.RangeOfValues ) item;
-            StringBuffer buffer = new StringBuffer();
-            rov.getFilter().printToBuffer( buffer );
-            values.add( buffer.toString() );
+            values.add( rov.getFilter().toString() );
         }
         else if ( item.getClass() == ProtectedItem.MaxValueCount.class )
         {
@@ -243,9 +241,7 @@
             for ( Iterator it = mvc.iterator(); it.hasNext(); )
             {
                 ProtectedItem.MaxValueCountItem mvci = ( ProtectedItem.MaxValueCountItem ) it.next();
-                StringBuffer buffer = new StringBuffer();
-                mvci.printToBuffer( buffer );
-                values.add( buffer.toString() );
+                values.add( mvci.toString() );
             }
         }
         else if ( item.getClass() == ProtectedItem.MaxImmSub.class )
@@ -259,17 +255,13 @@
             for ( Iterator it = rb.iterator(); it.hasNext(); )
             {
                 ProtectedItem.RestrictedByItem rbi = ( ProtectedItem.RestrictedByItem ) it.next();
-                StringBuffer buffer = new StringBuffer();
-                rbi.printToBuffer( buffer );
-                values.add( buffer.toString() );
+                values.add( rbi.toString() );
             }
         }
         else if ( item.getClass() == ProtectedItem.Classes.class )
         {
             ProtectedItem.Classes classes = ( ProtectedItem.Classes ) item;
-            StringBuffer buffer = new StringBuffer();
-            classes.getClasses().printRefinementToBuffer( buffer );
-            values.add( buffer.toString() );
+            values.add( classes.toString() );
         }
 
     }

Modified: directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java (original)
+++ directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java Mon Nov 26 11:44:28 2007
@@ -187,7 +187,7 @@
             Collection<SubtreeSpecification> subtreeSpecifications = subtree.getSubtreeSpecifications();
             for ( SubtreeSpecification subtreeSpecification : subtreeSpecifications )
             {
-                StringBuffer buffer = new StringBuffer();
+                StringBuilder buffer = new StringBuilder();
                 subtreeSpecification.printToBuffer( buffer );
                 String s = buffer.toString();
                 values.add( s );

Modified: directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java (original)
+++ directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java Mon Nov 26 11:44:28 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
 import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.connection.core.DnUtils;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
@@ -37,7 +38,6 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.FilterWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -182,7 +182,7 @@
     {
         // set return value
         //returnValue = buildSubreeSpecification();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         subtreeSpecification.printToBuffer( sb );
         returnValue = sb.toString();
 
@@ -412,7 +412,7 @@
         refinementText.setLayoutData( gd );
         try
         {
-            StringBuffer refinementBuffer = new StringBuffer();
+            StringBuilder refinementBuffer = new StringBuilder();
             if ( subtreeSpecification.getRefinement() != null )
             {
                 subtreeSpecification.getRefinement().printRefinementToBuffer( refinementBuffer );
@@ -434,12 +434,12 @@
             .getString( "SubtreeValueEditor.SubtreeValueEditor.label.filter" ), 2 ); //$NON-NLS-1$
 
         // filter widget
-        StringBuffer filterBuffer = new StringBuffer();
+        String filter = "";
         if ( subtreeSpecification.getRefinement() != null )
         {
-            subtreeSpecification.getRefinement().printToBuffer( filterBuffer );
+            filter = subtreeSpecification.getRefinement().toString();
         }
-        filterWidget = new FilterWidget( connection, filterBuffer.toString().trim() );
+        filterWidget = new FilterWidget( connection, filter );
         filterWidget.createWidget( composite );
         filterButton.setSelection( !refinementButton.getSelection() );
         filterWidget.setEnabled( !refinementButton.getSelection() );

Modified: directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java (original)
+++ directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java Mon Nov 26 11:44:28 2007
@@ -23,7 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.ComboViewer;
 import org.eclipse.jface.viewers.IStructuredSelection;

Modified: directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java (original)
+++ directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java Mon Nov 26 11:44:28 2007
@@ -146,12 +146,12 @@
         ACIItemParser parser = Activator.getDefault().getACIItemParser();
         ACIItem aciItem = parser.parse( input );
 
-        StringBuffer buffer = new StringBuffer();
+        String aci = "";
         if ( aciItem != null )
         {
-            aciItem.printToBuffer( buffer );
+            aci = aciItem.toString();
         }
-        return buffer.toString();
+        return aci;
     }
 
 

Modified: directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java (original)
+++ directory/sandbox/felixk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java Mon Nov 26 11:44:28 2007
@@ -25,9 +25,9 @@
 
 import org.apache.directory.shared.ldap.aci.ACIItem;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
-import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.aci.ItemFirstACIItem;
 import org.apache.directory.shared.ldap.aci.UserFirstACIItem;
+import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
@@ -237,12 +237,12 @@
             aciItem = null;
         }
 
-        StringBuffer buffer = new StringBuffer();
+        String aci = "";
         if ( aciItem != null )
         {
-            aciItem.printToBuffer( buffer );
+            aci = aciItem.toString();
         }
-        return buffer.toString();
+        return aci;
     }
 
 

Added: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ApacheDSConfigurationContentDescriber.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ApacheDSConfigurationContentDescriber.java?rev=598395&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ApacheDSConfigurationContentDescriber.java (added)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ApacheDSConfigurationContentDescriber.java Mon Nov 26 11:44:28 2007
@@ -0,0 +1,85 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationContentTypeChecker;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.ITextContentDescriber;
+
+
+/**
+ * This class implements a ContentDescriber for Apache DS Configuration file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ApacheDSConfigurationContentDescriber implements ITextContentDescriber
+{
+    /** The supported Options */
+    private static final QualifiedName[] SUPPORTED_OPTIONS = new QualifiedName[]
+        { IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK };
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.runtime.content.ITextContentDescriber#describe(java.io.Reader, org.eclipse.core.runtime.content.IContentDescription)
+     */
+    public int describe( Reader contents, IContentDescription description ) throws IOException
+    {
+        if ( ServerConfigurationContentTypeChecker.isValid( contents ) )
+        {
+            return ITextContentDescriber.VALID;
+        }
+        else
+        {
+            return ITextContentDescriber.INVALID;
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.runtime.content.IContentDescriber#describe(java.io.InputStream, org.eclipse.core.runtime.content.IContentDescription)
+     */
+    public int describe( InputStream contents, IContentDescription description ) throws IOException
+    {
+        if ( ServerConfigurationContentTypeChecker.isValid( contents ) )
+        {
+            return ITextContentDescriber.VALID;
+        }
+        else
+        {
+            return ITextContentDescriber.INVALID;
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.runtime.content.IContentDescriber#getSupportedOptions()
+     */
+    public QualifiedName[] getSupportedOptions()
+    {
+        return SUPPORTED_OPTIONS;
+    }
+}

Propchange: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ApacheDSConfigurationContentDescriber.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java Mon Nov 26 11:44:28 2007
@@ -89,7 +89,7 @@
     public ExtendedOperationsMasterDetailsBlock( FormPage page )
     {
         this.page = page;
-        serverConfiguration = ( ( ServerConfigurationEditorInput ) page.getEditorInput() ).getServerConfiguration();
+        serverConfiguration = ( ( ServerConfigurationEditor ) page.getEditor() ).getServerConfiguration();
         extendedOperations = serverConfiguration.getExtendedOperations();
     }
 

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java Mon Nov 26 11:44:28 2007
@@ -20,6 +20,8 @@
 package org.apache.directory.studio.apacheds.configuration.editor;
 
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.apache.directory.studio.apacheds.configuration.dialogs.BinaryAttributeDialog;
@@ -27,10 +29,10 @@
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
@@ -45,7 +47,6 @@
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.Text;
@@ -77,8 +78,6 @@
     private List<String> binaryAttributes;
 
     // UI Fields
-    private Text portText;
-    private Combo authenticationCombo;
     private Text principalText;
     private Text passwordText;
     private Button showPasswordCheckbox;
@@ -88,7 +87,6 @@
     private Text synchPeriodText;
     private Text maxThreadsText;
     private Button enableAccesControlCheckbox;
-    private Button enableNTPCheckbox;
     private Button enableKerberosCheckbox;
     private Button enableChangePasswordCheckbox;
     private Button denormalizeOpAttrCheckbox;
@@ -96,6 +94,20 @@
     private Button binaryAttributesAddButton;
     private Button binaryAttributesEditButton;
     private Button binaryAttributesDeleteButton;
+    private Button enableLdapCheckbox;
+    private Text ldapPortText;
+    private Button enableLdapsCheckbox;
+    private Text ldapsPortText;
+    private Text kerberosPortText;
+    private Button enableNtpCheckbox;
+    private Text ntpPortText;
+    private Button enableDnsCheckbox;
+    private Text dnsPortText;
+    private Text changePasswordPortText;
+
+    private CheckboxTableViewer supportedMechanismsTableViewer;
+    private Button selectAllSupportedMechanismsButton;
+    private Button deselectAllSupportedMechanismsButton;
 
 
     /**
@@ -124,10 +136,29 @@
         parent.setLayout( twl );
         FormToolkit toolkit = managedForm.getToolkit();
 
-        createSettingsSection( parent, toolkit );
-        createBinaryAttributesSection( parent, toolkit );
-        createLimitsSection( parent, toolkit );
-        createOptionsSection( parent, toolkit );
+        Composite leftComposite = toolkit.createComposite( parent );
+        GridLayout leftCompositeGridLayout = new GridLayout();
+        leftCompositeGridLayout.marginHeight = leftCompositeGridLayout.marginWidth = 0;
+        leftComposite.setLayout( leftCompositeGridLayout );
+        TableWrapData leftCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+        leftCompositeTableWrapData.grabHorizontal = true;
+        leftComposite.setLayoutData( leftCompositeTableWrapData );
+
+        createAdministratorSettingsSection( leftComposite, toolkit );
+        createProtocolsSection( leftComposite, toolkit );
+        createSupportedAuthenticationMechanismsSection( leftComposite, toolkit );
+
+        Composite rightComposite = toolkit.createComposite( parent );
+        GridLayout rightCompositeGridLayout = new GridLayout();
+        rightCompositeGridLayout.marginHeight = rightCompositeGridLayout.marginWidth = 0;
+        rightComposite.setLayout( rightCompositeGridLayout );
+        TableWrapData rightCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+        rightCompositeTableWrapData.grabHorizontal = true;
+        rightComposite.setLayoutData( rightCompositeTableWrapData );
+
+        createBinaryAttributesSection( rightComposite, toolkit );
+        createLimitsSection( rightComposite, toolkit );
+        createOptionsSection( rightComposite, toolkit );
 
         initFromInput();
         addListeners();
@@ -135,53 +166,27 @@
 
 
     /**
-     * Creates the Settings Section.
+     * Creates the Administrator Settings Section.
      *
      * @param parent
      *      the parent composite
      * @param toolkit
      *      the toolkit to use
      */
-    private void createSettingsSection( Composite parent, FormToolkit toolkit )
+    private void createAdministratorSettingsSection( Composite parent, FormToolkit toolkit )
     {
         // Creation of the section
         Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
         section.marginWidth = 4;
-        section.setText( "Settings" );
-        section.setDescription( "Set the settings of the server." );
-        TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
-        td.grabHorizontal = true;
-        section.setLayoutData( td );
+        section.setText( "Administrator settings" );
+        section.setDescription( "Set the settings about the administrator of the server." );
+        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         Composite client = toolkit.createComposite( section );
         toolkit.paintBordersFor( client );
         GridLayout glayout = new GridLayout( 2, false );
         client.setLayout( glayout );
         section.setClient( client );
 
-        // Port
-        toolkit.createLabel( client, "Port:" );
-        portText = toolkit.createText( client, "" );
-        portText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        portText.addVerifyListener( new VerifyListener()
-        {
-            public void verifyText( VerifyEvent e )
-            {
-                if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
-                {
-                    e.doit = false;
-                }
-            }
-        } );
-
-        // Authentication
-        toolkit.createLabel( client, "Authentication:" );
-        authenticationCombo = new Combo( client, SWT.SIMPLE );
-        authenticationCombo.setItems( new String[]
-            { "Simple" } );
-        authenticationCombo.setText( "Simple" );
-        authenticationCombo.setEnabled( false );
-        authenticationCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-
         // Principal
         toolkit.createLabel( client, "Principal:" );
         principalText = toolkit.createText( client, "" );
@@ -196,7 +201,7 @@
         // Show Password
         toolkit.createLabel( client, "" );
         showPasswordCheckbox = toolkit.createButton( client, "Show password", SWT.CHECK );
-        showPasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+        showPasswordCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false ) );
         showPasswordCheckbox.setSelection( false );
         showPasswordCheckbox.addSelectionListener( new SelectionAdapter()
         {
@@ -212,10 +217,6 @@
                 }
             }
         } );
-
-        // Allow Anonymous Access
-        allowAnonymousAccessCheckbox = toolkit.createButton( client, "Allow Anonymous Access", SWT.CHECK );
-        allowAnonymousAccessCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
     }
 
 
@@ -230,13 +231,10 @@
     private void createLimitsSection( Composite parent, FormToolkit toolkit )
     {
         // Creation of the section
-        Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+        Section section = toolkit.createSection( parent, Section.TITLE_BAR );
         section.marginWidth = 4;
         section.setText( "Limits" );
-        section.setDescription( "Set the limits of the server." );
-        TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
-        td.grabHorizontal = true;
-        section.setLayoutData( td );
+        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         Composite client = toolkit.createComposite( section );
         toolkit.paintBordersFor( client );
         GridLayout glayout = new GridLayout( 2, false );
@@ -316,40 +314,26 @@
     private void createOptionsSection( Composite parent, FormToolkit toolkit )
     {
         // Creation of the section
-        Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+        Section section = toolkit.createSection( parent, Section.TITLE_BAR );
         section.marginWidth = 4;
         section.setText( "Options" );
-        section.setDescription( "Set the options of the server." );
-        TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
-        td.grabHorizontal = true;
-        section.setLayoutData( td );
+        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         Composite client = toolkit.createComposite( section );
         toolkit.paintBordersFor( client );
-        GridLayout glayout = new GridLayout();
-        client.setLayout( glayout );
+        client.setLayout( new GridLayout() );
         section.setClient( client );
 
+        // Allow Anonymous Access
+        allowAnonymousAccessCheckbox = toolkit.createButton( client, "Allow Anonymous Access", SWT.CHECK );
+        allowAnonymousAccessCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false ) );
+
         // Enable Access Control
         enableAccesControlCheckbox = toolkit.createButton( client, "Enable Access Control", SWT.CHECK );
-        enableAccesControlCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-
-        // Enable NTP
-        enableNTPCheckbox = toolkit.createButton( client, "Enable NTP", SWT.CHECK );
-        enableNTPCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+        enableAccesControlCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false ) );
 
         // Denormalize Operational Attributes
         denormalizeOpAttrCheckbox = toolkit.createButton( client, "Denormalize Operational Attributes", SWT.CHECK );
-        denormalizeOpAttrCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-
-        // Enable Kerberos
-        enableKerberosCheckbox = toolkit.createButton( client, "Enable Kerberos", SWT.CHECK );
-        enableKerberosCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        enableKerberosCheckbox.setEnabled( false );
-
-        // Enable Change Password
-        enableChangePasswordCheckbox = toolkit.createButton( client, "Enable Change Password", SWT.CHECK );
-        enableChangePasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        enableChangePasswordCheckbox.setEnabled( false );
+        denormalizeOpAttrCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false ) );
     }
 
 
@@ -367,11 +351,8 @@
         Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
         section.marginWidth = 4;
         section.setText( "Binary Attributes" );
-        section
-            .setDescription( "Set attribute type names and OID's if you want an them to be handled as binary content." );
-        TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
-        td.grabHorizontal = true;
-        section.setLayoutData( td );
+        section.setDescription( "Set attribute type names and OID's if you want them to be handled as binary content." );
+        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         Composite client = toolkit.createComposite( section );
         toolkit.paintBordersFor( client );
         GridLayout glayout = new GridLayout( 2, false );
@@ -384,7 +365,6 @@
         binaryAttributesTable.setLayoutData( gd );
         binaryAttributesTableViewer = new TableViewer( binaryAttributesTable );
         binaryAttributesTableViewer.setContentProvider( new ArrayContentProvider() );
-        binaryAttributesTableViewer.setLabelProvider( new LabelProvider() );
 
         GridData buttonsGD = new GridData( SWT.FILL, SWT.BEGINNING, false, false );
         buttonsGD.widthHint = IDialogConstants.BUTTON_WIDTH;
@@ -403,18 +383,174 @@
 
 
     /**
-     * Initializes the page with the Editor input.
+     * Creates the Supported Authentication Mechanisms Section
+     *
+     * @param parent
+     *      the parent composite
+     * @param toolkit
+     *      the toolkit to use
      */
-    private void initFromInput()
+    private void createSupportedAuthenticationMechanismsSection( Composite parent, FormToolkit toolkit )
     {
-        ServerConfiguration configuration = ( ( ServerConfigurationEditorInput ) getEditorInput() )
-            .getServerConfiguration();
+        // Creation of the section
+        Section section = toolkit.createSection( parent, Section.TITLE_BAR );
+        section.marginWidth = 4;
+        section.setText( "Supported Authentication Mechanisms" );
+        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+        Composite client = toolkit.createComposite( section );
+        toolkit.paintBordersFor( client );
+        GridLayout glayout = new GridLayout( 2, false );
+        client.setLayout( glayout );
+        section.setClient( client );
+
+        Table supportedMechanismsTable = toolkit.createTable( client, SWT.CHECK );
+        GridData gd = new GridData( SWT.FILL, SWT.NONE, true, false, 1, 3 );
+        gd.heightHint = 76;
+        supportedMechanismsTable.setLayoutData( gd );
+        supportedMechanismsTableViewer = new CheckboxTableViewer( supportedMechanismsTable );
+        supportedMechanismsTableViewer.setContentProvider( new ArrayContentProvider() );
+        supportedMechanismsTableViewer.setInput( new String[]
+            { "SIMPLE", "CRAM-MD5", "DIGEST-MD5", "GSSAPI" } );
+
+        selectAllSupportedMechanismsButton = toolkit.createButton( client, "Select All", SWT.PUSH );
+        selectAllSupportedMechanismsButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+        deselectAllSupportedMechanismsButton = toolkit.createButton( client, "Deselect All", SWT.PUSH );
+        deselectAllSupportedMechanismsButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+    }
+
+
+    /**
+     * Creates the Protocols Section
+     *
+     * @param parent
+     *      the parent composite
+     * @param toolkit
+     *      the toolkit to use
+     */
+    private void createProtocolsSection( Composite parent, FormToolkit toolkit )
+    {
+        // Creation of the section
+        Section section = toolkit.createSection( parent, Section.TITLE_BAR );
+        section.marginWidth = 4;
+        section.setText( "Protocols" );
+        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+        Composite client = toolkit.createComposite( section );
+        toolkit.paintBordersFor( client );
+        client.setLayout( new GridLayout( 2, true ) );
+        section.setClient( client );
+
+        // LDAP
+        Composite ldapProtocolComposite = createProtocolComposite( toolkit, client );
+        enableLdapCheckbox = toolkit.createButton( ldapProtocolComposite, "Enable LDAP", SWT.CHECK );
+        enableLdapCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false, 3, 1 ) );
+        toolkit.createLabel( ldapProtocolComposite, "    " );
+        toolkit.createLabel( ldapProtocolComposite, "Port:" );
+        ldapPortText = createPortText( toolkit, ldapProtocolComposite );
+
+        // LDAPS
+        Composite ldapsProtocolComposite = createProtocolComposite( toolkit, client );
+        enableLdapsCheckbox = toolkit.createButton( ldapsProtocolComposite, "Enable LDAPS", SWT.CHECK );
+        enableLdapsCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false, 3, 1 ) );
+        toolkit.createLabel( ldapsProtocolComposite, "    " );
+        toolkit.createLabel( ldapsProtocolComposite, "Port:" );
+        ldapsPortText = createPortText( toolkit, ldapsProtocolComposite );
+
+        // Kerberos
+        Composite kerberosProtocolComposite = createProtocolComposite( toolkit, client );
+        enableKerberosCheckbox = toolkit.createButton( kerberosProtocolComposite, "Enable Kerberos", SWT.CHECK );
+        enableKerberosCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false, 3, 1 ) );
+        toolkit.createLabel( kerberosProtocolComposite, "    " );
+        toolkit.createLabel( kerberosProtocolComposite, "Port:" );
+        kerberosPortText = createPortText( toolkit, kerberosProtocolComposite );
+
+        // NTP
+        Composite ntpProtocolComposite = createProtocolComposite( toolkit, client );
+        enableNtpCheckbox = toolkit.createButton( ntpProtocolComposite, "Enable NTP", SWT.CHECK );
+        enableNtpCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false, 3, 1 ) );
+        toolkit.createLabel( ntpProtocolComposite, "    " );
+        toolkit.createLabel( ntpProtocolComposite, "Port:" );
+        ntpPortText = createPortText( toolkit, ntpProtocolComposite );
+
+        // DNS
+        Composite dnsProtocolComposite = createProtocolComposite( toolkit, client );
+        enableDnsCheckbox = toolkit.createButton( dnsProtocolComposite, "Enable DNS", SWT.CHECK );
+        enableDnsCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false, 3, 1 ) );
+        toolkit.createLabel( dnsProtocolComposite, "    " );
+        toolkit.createLabel( dnsProtocolComposite, "Port:" );
+        dnsPortText = createPortText( toolkit, dnsProtocolComposite );
+
+        // Change Password
+        Composite changePasswordProtocolComposite = createProtocolComposite( toolkit, client );
+        enableChangePasswordCheckbox = toolkit.createButton( changePasswordProtocolComposite, "Enable Change Password",
+            SWT.CHECK );
+        enableChangePasswordCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false, 3, 1 ) );
+        toolkit.createLabel( changePasswordProtocolComposite, "    " );
+        toolkit.createLabel( changePasswordProtocolComposite, "Port:" );
+        changePasswordPortText = createPortText( toolkit, changePasswordProtocolComposite );
+    }
+
+
+    /**
+     * Creates a Protocol Composite : a Composite composed of a GridLayout with
+     * 3 columns and marginHeight and marginWidth set to 0.
+     *
+     * @param toolkit
+     *      the toolkit
+     * @param parent
+     *      the parent
+     * @return
+     *      a Protocol Composite
+     */
+    private Composite createProtocolComposite( FormToolkit toolkit, Composite parent )
+    {
+        Composite protocolComposite = toolkit.createComposite( parent );
+        GridLayout protocolGridLayout = new GridLayout( 3, false );
+        protocolGridLayout.marginHeight = protocolGridLayout.marginWidth = 0;
+        protocolComposite.setLayout( protocolGridLayout );
+
+        return protocolComposite;
+    }
+
+
+    /**
+     * Creates a Text that can be used to enter a port number.
+     *
+     * @param toolkit
+     *      the toolkit
+     * @param parent
+     *      the parent
+     * @return
+     *      a Text that can be used to enter a port number
+     */
+    private Text createPortText( FormToolkit toolkit, Composite parent )
+    {
+        Text portText = toolkit.createText( parent, "" );
+        GridData gd = new GridData( SWT.NONE, SWT.NONE, false, false );
+        gd.widthHint = 42;
+        portText.setLayoutData( gd );
+        portText.addVerifyListener( new VerifyListener()
+        {
+            public void verifyText( VerifyEvent e )
+            {
+                if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+                {
+                    e.doit = false;
+                }
+            }
+        } );
+        portText.setTextLimit( 5 );
+
+        return portText;
+    }
 
-        binaryAttributes = configuration.getBinaryAttributes();
-        binaryAttributesTableViewer.setInput( binaryAttributes );
 
-        // Port
-        portText.setText( "" + configuration.getPort() );
+    /**
+     * Initializes the page with the Editor input.
+     */
+    private void initFromInput()
+    {
+        ServerConfiguration configuration = ( ( ServerConfigurationEditor ) getEditor() ).getServerConfiguration();
 
         // Principal
         String principal = configuration.getPrincipal();
@@ -430,8 +566,39 @@
             passwordText.setText( password );
         }
 
-        // Allow Anonymous Access
-        allowAnonymousAccessCheckbox.setSelection( configuration.isAllowAnonymousAccess() );
+        // Binary Attributes
+        binaryAttributes = configuration.getBinaryAttributes();
+        binaryAttributesTableViewer.setInput( binaryAttributes );
+
+        // LDAP Protocol
+        enableLdapCheckbox.setSelection( true );
+        ldapPortText.setEnabled( enableLdapCheckbox.getSelection() );
+        ldapPortText.setText( "" + configuration.getLdapPort() );
+
+        // LDAPS Protocol
+        enableLdapsCheckbox.setSelection( configuration.isEnableLdaps() );
+        ldapsPortText.setEnabled( enableLdapsCheckbox.getSelection() );
+        ldapsPortText.setText( "" + configuration.getLdapsPort() );
+
+        // Kerberos Protocol
+        enableKerberosCheckbox.setSelection( configuration.isEnableKerberos() );
+        kerberosPortText.setEnabled( enableKerberosCheckbox.getSelection() );
+        kerberosPortText.setText( "" + configuration.getKerberosPort() );
+
+        // NTP Protocol
+        enableNtpCheckbox.setSelection( configuration.isEnableNtp() );
+        ntpPortText.setEnabled( enableNtpCheckbox.getSelection() );
+        ntpPortText.setText( "" + configuration.getNtpPort() );
+
+        // DNS Protocol
+        enableDnsCheckbox.setSelection( configuration.isEnableDns() );
+        dnsPortText.setEnabled( enableDnsCheckbox.getSelection() );
+        dnsPortText.setText( "" + configuration.getDnsPort() );
+
+        // Change Password Protocol
+        enableChangePasswordCheckbox.setSelection( configuration.isEnableChangePassword() );
+        changePasswordPortText.setEnabled( enableChangePasswordCheckbox.getSelection() );
+        changePasswordPortText.setText( "" + configuration.getChangePasswordPort() );
 
         // Max Time Limit
         maxTimeLimitText.setText( "" + configuration.getMaxTimeLimit() );
@@ -445,17 +612,13 @@
         // Max Threads
         maxThreadsText.setText( "" + configuration.getMaxThreads() );
 
-        // Enable Access Control
-        enableAccesControlCheckbox.setSelection( configuration.isEnableAccessControl() );
+        supportedMechanismsTableViewer.setCheckedElements( configuration.getSupportedMechanisms().toArray() );
 
-        // Enable NTP
-        enableNTPCheckbox.setSelection( configuration.isEnableNTP() );
-
-        // Enable Kerberos
-        enableKerberosCheckbox.setSelection( configuration.isEnableKerberos() );
+        // Allow Anonymous Access
+        allowAnonymousAccessCheckbox.setSelection( configuration.isAllowAnonymousAccess() );
 
-        // Enable Change Password
-        enableChangePasswordCheckbox.setSelection( configuration.isEnableChangePassword() );
+        // Enable Access Control
+        enableAccesControlCheckbox.setSelection( configuration.isEnableAccessControl() );
 
         // Denormalize Op Attr
         denormalizeOpAttrCheckbox.setSelection( configuration.isDenormalizeOpAttr() );
@@ -551,25 +714,94 @@
             }
         };
 
-        portText.addModifyListener( modifyListener );
-        authenticationCombo.addModifyListener( modifyListener );
+        selectAllSupportedMechanismsButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                supportedMechanismsTableViewer.setAllChecked( true );
+            }
+        } );
+
+        deselectAllSupportedMechanismsButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                supportedMechanismsTableViewer.setAllChecked( false );
+            }
+        } );
+
         principalText.addModifyListener( modifyListener );
         passwordText.addModifyListener( modifyListener );
-        allowAnonymousAccessCheckbox.addSelectionListener( selectionListener );
-        maxTimeLimitText.addModifyListener( modifyListener );
-        maxSizeLimitText.addModifyListener( modifyListener );
-        synchPeriodText.addModifyListener( modifyListener );
-        maxThreadsText.addModifyListener( modifyListener );
-        enableAccesControlCheckbox.addSelectionListener( selectionListener );
-        enableNTPCheckbox.addSelectionListener( selectionListener );
+
+        enableLdapCheckbox.addSelectionListener( selectionListener );
+        enableLdapCheckbox.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                ldapPortText.setEnabled( enableLdapCheckbox.getSelection() );
+            }
+        } );
+        ldapPortText.addModifyListener( modifyListener );
+        enableLdapsCheckbox.addSelectionListener( selectionListener );
+        enableLdapsCheckbox.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                ldapsPortText.setEnabled( enableLdapsCheckbox.getSelection() );
+            }
+        } );
+        ldapsPortText.addModifyListener( modifyListener );
         enableKerberosCheckbox.addSelectionListener( selectionListener );
+        enableKerberosCheckbox.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                kerberosPortText.setEnabled( enableKerberosCheckbox.getSelection() );
+            }
+        } );
+        kerberosPortText.addModifyListener( modifyListener );
+        enableNtpCheckbox.addSelectionListener( selectionListener );
+        enableNtpCheckbox.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                ntpPortText.setEnabled( enableNtpCheckbox.getSelection() );
+            }
+        } );
+        ntpPortText.addModifyListener( modifyListener );
+        enableDnsCheckbox.addSelectionListener( selectionListener );
+        enableDnsCheckbox.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                dnsPortText.setEnabled( enableDnsCheckbox.getSelection() );
+            }
+        } );
+        dnsPortText.addModifyListener( modifyListener );
         enableChangePasswordCheckbox.addSelectionListener( selectionListener );
-        denormalizeOpAttrCheckbox.addSelectionListener( selectionListener );
+        enableChangePasswordCheckbox.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                changePasswordPortText.setEnabled( enableChangePasswordCheckbox.getSelection() );
+            }
+        } );
+        changePasswordPortText.addModifyListener( modifyListener );
+
         binaryAttributesTableViewer.addSelectionChangedListener( binaryAttributesTableViewerListener );
         binaryAttributesTableViewer.addDoubleClickListener( binaryAttributesTableViewerDoubleClickListener );
         binaryAttributesAddButton.addSelectionListener( binaryAttributesAddButtonListener );
         binaryAttributesEditButton.addSelectionListener( binaryAttributesEditButtonListener );
         binaryAttributesDeleteButton.addSelectionListener( binaryAttributesDeleteButtonListener );
+
+        maxTimeLimitText.addModifyListener( modifyListener );
+        maxSizeLimitText.addModifyListener( modifyListener );
+        synchPeriodText.addModifyListener( modifyListener );
+        maxThreadsText.addModifyListener( modifyListener );
+
+        allowAnonymousAccessCheckbox.addSelectionListener( selectionListener );
+        enableAccesControlCheckbox.addSelectionListener( selectionListener );
+        denormalizeOpAttrCheckbox.addSelectionListener( selectionListener );
     }
 
 
@@ -614,23 +846,39 @@
     /**
      * Saves the necessary elements to the input model.
      */
+    @SuppressWarnings("unchecked")
     public void save()
     {
-        ServerConfiguration serverConfiguration = ( ( ServerConfigurationEditorInput ) getEditorInput() )
-            .getServerConfiguration();
+        ServerConfiguration configuration = ( ( ServerConfigurationEditor ) getEditor() ).getServerConfiguration();
+
+        configuration.setPrincipal( principalText.getText() );
+        configuration.setPassword( passwordText.getText() );
+
+        configuration.setBinaryAttributes( binaryAttributes );
+
+        configuration.setLdapPort( Integer.parseInt( ldapPortText.getText() ) );
+        configuration.setEnableLdaps( enableLdapsCheckbox.getSelection() );
+        configuration.setLdapsPort( Integer.parseInt( ldapsPortText.getText() ) );
+        configuration.setEnableKerberos( enableKerberosCheckbox.getSelection() );
+        configuration.setKerberosPort( Integer.parseInt( kerberosPortText.getText() ) );
+        configuration.setEnableNtp( enableNtpCheckbox.getSelection() );
+        configuration.setNtpPort( Integer.parseInt( ntpPortText.getText() ) );
+        configuration.setEnableDns( enableDnsCheckbox.getSelection() );
+        configuration.setDnsPort( Integer.parseInt( dnsPortText.getText() ) );
+        configuration.setEnableChangePassword( enableChangePasswordCheckbox.getSelection() );
+        configuration.setChangePasswordPort( Integer.parseInt( changePasswordPortText.getText() ) );
+
+        configuration.setMaxTimeLimit( Integer.parseInt( maxTimeLimitText.getText() ) );
+        configuration.setMaxSizeLimit( Integer.parseInt( maxSizeLimitText.getText() ) );
+        configuration.setSynchronizationPeriod( Long.parseLong( synchPeriodText.getText() ) );
+        configuration.setMaxThreads( Integer.parseInt( maxThreadsText.getText() ) );
+
+        configuration.setSupportedMechanisms( new ArrayList<String>( ( List<String> ) Arrays
+            .asList( (String[])supportedMechanismsTableViewer.getCheckedElements() ) ) );
+
+        configuration.setAllowAnonymousAccess( allowAnonymousAccessCheckbox.getSelection() );
+        configuration.setEnableAccessControl( enableAccesControlCheckbox.getSelection() );
+        configuration.setDenormalizeOpAttr( denormalizeOpAttrCheckbox.getSelection() );
 
-        serverConfiguration.setPort( Integer.parseInt( portText.getText() ) );
-        serverConfiguration.setPrincipal( principalText.getText() );
-        serverConfiguration.setPassword( passwordText.getText() );
-        serverConfiguration.setAllowAnonymousAccess( allowAnonymousAccessCheckbox.getSelection() );
-        serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimitText.getText() ) );
-        serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimitText.getText() ) );
-        serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodText.getText() ) );
-        serverConfiguration.setMaxThreads( Integer.parseInt( maxThreadsText.getText() ) );
-        serverConfiguration.setEnableAccessControl( enableAccesControlCheckbox.getSelection() );
-        serverConfiguration.setEnableNTP( enableNTPCheckbox.getSelection() );
-        serverConfiguration.setEnableKerberos( enableKerberosCheckbox.getSelection() );
-        serverConfiguration.setEnableChangePassword( enableChangePasswordCheckbox.getSelection() );
-        serverConfiguration.setDenormalizeOpAttr( denormalizeOpAttrCheckbox.getSelection() );
     }
 }

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java Mon Nov 26 11:44:28 2007
@@ -91,7 +91,7 @@
     public InterceptorsMasterDetailsBlock( FormPage page )
     {
         this.page = page;
-        serverConfiguration = ( ( ServerConfigurationEditorInput ) page.getEditorInput() ).getServerConfiguration();
+        serverConfiguration = ( ( ServerConfigurationEditor ) page.getEditor() ).getServerConfiguration();
         interceptors = serverConfiguration.getInterceptors();
     }
 

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java Mon Nov 26 11:44:28 2007
@@ -101,7 +101,7 @@
     private boolean dirty = false;
 
     // UI fields
-    private Text nameText;
+    private Text idText;
     private Text cacheSizeText;
     private Text suffixText;
     private Button enableOptimizerCheckbox;
@@ -333,10 +333,10 @@
         client.setLayout( glayout );
         section.setClient( client );
 
-        // Name
-        toolkit.createLabel( client, "Name:" );
-        nameText = toolkit.createText( client, "" );
-        nameText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+        // ID
+        toolkit.createLabel( client, "ID:" );
+        idText = toolkit.createText( client, "" );
+        idText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
 
         // Cache Size
         toolkit.createLabel( client, "Cache Size:" );
@@ -551,7 +551,7 @@
      */
     private void addListeners()
     {
-        nameText.addModifyListener( textModifyListener );
+        idText.addModifyListener( textModifyListener );
         cacheSizeText.addModifyListener( textModifyListener );
         suffixText.addModifyListener( textModifyListener );
         enableOptimizerCheckbox.addSelectionListener( checkboxSelectionListener );
@@ -576,7 +576,7 @@
      */
     private void removeListeners()
     {
-        nameText.removeModifyListener( textModifyListener );
+        idText.removeModifyListener( textModifyListener );
         cacheSizeText.removeModifyListener( textModifyListener );
         suffixText.removeModifyListener( textModifyListener );
         enableOptimizerCheckbox.removeSelectionListener( checkboxSelectionListener );
@@ -621,7 +621,7 @@
     {
         if ( input != null )
         {
-            input.setName( nameText.getText() );
+            input.setId( idText.getText() );
             input.setCacheSize( Integer.parseInt( cacheSizeText.getText() ) );
             input.setSuffix( suffixText.getText() );
             input.setEnableOptimizer( enableOptimizerCheckbox.getSelection() );
@@ -672,9 +672,9 @@
     {
         removeListeners();
 
-        // Name
-        String name = input.getName();
-        nameText.setText( ( name == null ) ? "" : name );
+        // ID
+        String id = input.getId();
+        idText.setText( ( id == null ) ? "" : id );
 
         // Cache Size
         cacheSizeText.setText( "" + input.getCacheSize() );
@@ -721,7 +721,7 @@
      */
     public void setFocus()
     {
-        nameText.setFocus();
+        idText.setFocus();
     }
 
 

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java Mon Nov 26 11:44:28 2007
@@ -73,7 +73,7 @@
     /** The Details Page */
     private PartitionDetailsPage detailsPage;
 
-    private static final String NEW_NAME = "New Partition ";
+    private static final String NEW_ID = "New Partition ";
 
     // UI Fields
     private TableViewer viewer;
@@ -90,7 +90,7 @@
     public PartitionsMasterDetailsBlock( FormPage page )
     {
         this.page = page;
-        serverConfiguration = ( ( ServerConfigurationEditorInput ) page.getEditorInput() ).getServerConfiguration();
+        serverConfiguration = ( ( ServerConfigurationEditor ) page.getEditor() ).getServerConfiguration();
         partitions = serverConfiguration.getPartitions();
     }
 
@@ -196,7 +196,7 @@
         {
             public void widgetSelected( SelectionEvent e )
             {
-                Partition newPartition = new Partition( getNewName() );
+                Partition newPartition = new Partition( getNewId() );
                 partitions.add( newPartition );
                 viewer.refresh();
                 viewer.setSelection( new StructuredSelection( newPartition ) );
@@ -225,25 +225,25 @@
 
 
     /**
-     * Gets a new Name for a new Extended Operation.
+     * Gets a new ID for a new Partition.
      *
      * @return 
-     *      a new Name for a new Extended Operation
+     *      a new ID for a new Partition
      */
-    private String getNewName()
+    private String getNewId()
     {
         int counter = 1;
-        String name = NEW_NAME;
+        String name = NEW_ID;
         boolean ok = false;
 
         while ( !ok )
         {
             ok = true;
-            name = NEW_NAME + counter;
+            name = NEW_ID + counter;
 
             for ( Partition partition : partitions )
             {
-                if ( partition.getName().equalsIgnoreCase( name ) )
+                if ( partition.getId().equalsIgnoreCase( name ) )
                 {
                     ok = false;
                 }

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java Mon Nov 26 11:44:28 2007
@@ -20,10 +20,17 @@
 package org.apache.directory.studio.apacheds.configuration.editor;
 
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
 import org.apache.directory.studio.apacheds.configuration.Activator;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParser;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParserException;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationWriter;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationWriterException;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.swt.SWT;
@@ -31,9 +38,12 @@
 import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPathEditorInput;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SaveAsDialog;
 import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.part.FileEditorInput;
 
 
 /**
@@ -47,9 +57,6 @@
     /** The Editor ID */
     public static final String ID = "org.apache.directory.studio.apacheds.configuration.editor";
 
-    /** The editor input */
-    private IEditorInput input;
-
     /** The Server Configuration */
     private ServerConfiguration serverConfiguration;
 
@@ -69,10 +76,97 @@
     public void init( IEditorSite site, IEditorInput input ) throws PartInitException
     {
         super.init( site, input );
-        this.input = input;
         setPartName( input.getName() );
-        serverConfiguration = ( ( ServerConfigurationEditorInput ) input ).getServerConfiguration();
-        dirty = serverConfiguration.getPath() == null;
+
+        if ( input instanceof FileEditorInput )
+        {
+            FileEditorInput fei = ( FileEditorInput ) input;
+
+            try
+            {
+                ServerConfigurationParser parser = new ServerConfigurationParser();
+                serverConfiguration = parser.parse( fei.getFile().getContents() );
+                serverConfiguration.setPath( fei.getFile().getFullPath().toOSString() );
+            }
+            catch ( ServerConfigurationParserException e )
+            {
+                MessageBox messageBox = new MessageBox(
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OK | SWT.ICON_ERROR );
+                messageBox.setText( "Error!" );
+                messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+                messageBox.open();
+                return;
+            }
+            catch ( CoreException e )
+            {
+                MessageBox messageBox = new MessageBox(
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OK | SWT.ICON_ERROR );
+                messageBox.setText( "Error!" );
+                messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+                messageBox.open();
+                return;
+            }
+        }
+        else if ( input instanceof IPathEditorInput )
+        {
+            IPathEditorInput ipei = ( IPathEditorInput ) input;
+            try
+            {
+                ServerConfigurationParser parser = new ServerConfigurationParser();
+                serverConfiguration = parser.parse( new FileInputStream( new File( ipei.getPath().toOSString() ) ) );
+                serverConfiguration.setPath( ipei.getPath().toOSString() );
+            }
+            catch ( ServerConfigurationParserException e )
+            {
+                MessageBox messageBox = new MessageBox(
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OK | SWT.ICON_ERROR );
+                messageBox.setText( "Error!" );
+                messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+                messageBox.open();
+                return;
+            }
+            catch ( FileNotFoundException e )
+            {
+                MessageBox messageBox = new MessageBox(
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OK | SWT.ICON_ERROR );
+                messageBox.setText( "Error!" );
+                messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+                messageBox.open();
+                return;
+            }
+        }
+        else if ( input instanceof ServerConfigurationEditorInput )
+        {
+            serverConfiguration = ( ( ServerConfigurationEditorInput ) input ).getServerConfiguration();
+            dirty = true;
+        }
+        else
+        {
+            try
+            {
+                ServerConfigurationParser parser = new ServerConfigurationParser();
+                serverConfiguration = parser.parse( new FileInputStream( new File( input.getToolTipText() ) ) );
+                serverConfiguration.setPath( input.getToolTipText() );
+            }
+            catch ( ServerConfigurationParserException e )
+            {
+                MessageBox messageBox = new MessageBox(
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OK | SWT.ICON_ERROR );
+                messageBox.setText( "Error!" );
+                messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+                messageBox.open();
+                return;
+            }
+            catch ( FileNotFoundException e )
+            {
+                MessageBox messageBox = new MessageBox(
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OK | SWT.ICON_ERROR );
+                messageBox.setText( "Error!" );
+                messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+                messageBox.open();
+                return;
+            }
+        }
     }
 
 
@@ -138,7 +232,7 @@
             // TODO Add the overwrite code...
 
             serverConfiguration.setPath( selectedFile );
-            setTitleToolTip( input.getToolTipText() );
+            setTitleToolTip( getEditorInput().getToolTipText() );
         }
 
         // Saving the ServerConfiguration to disk
@@ -170,6 +264,10 @@
      */
     public void doSaveAs()
     {
+        SaveAsDialog dialog = new SaveAsDialog( Activator.getDefault().getWorkbench().getActiveWorkbenchWindow()
+            .getShell() );
+        dialog.setOriginalName( "Copy of" );
+        dialog.open();
     }
 
 
@@ -178,7 +276,7 @@
      */
     public boolean isSaveAsAllowed()
     {
-        return false;
+        return true;
     }
 
 
@@ -201,5 +299,17 @@
     {
         this.dirty = dirty;
         editorDirtyStateChanged();
+    }
+
+
+    /**
+     * Gets the Server Configuration.
+     *
+     * @return
+     *      the Server Configuration
+     */
+    public ServerConfiguration getServerConfiguration()
+    {
+        return serverConfiguration;
     }
 }

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java Mon Nov 26 11:44:28 2007
@@ -76,7 +76,6 @@
         {
             return path;
         }
-
     }
 
 
@@ -119,6 +118,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
      */
+    @SuppressWarnings("unchecked")
     public Object getAdapter( Class adapter )
     {
         return null;
@@ -130,10 +130,14 @@
      */
     public boolean equals( Object obj )
     {
+        if ( obj == null )
+        {
+            return false;
+        }
+        
         if ( obj instanceof ServerConfigurationEditorInput )
         {
             ServerConfigurationEditorInput input = ( ServerConfigurationEditorInput ) obj;
-
             if ( input.exists() && exists() )
             {
                 String inputPath = input.getServerConfiguration().getPath();
@@ -145,6 +149,7 @@
                 }
             }
         }
+        
         return false;
     }
 }

Modified: directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java (original)
+++ directory/sandbox/felixk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java Mon Nov 26 11:44:28 2007
@@ -35,8 +35,8 @@
  */
 public class Partition
 {
-    /** The name of the partition */
-    private String name;
+    /** The ID of the partition */
+    private String id;
 
     /** The cache size of the partition */
     private int cacheSize;
@@ -80,31 +80,31 @@
     {
         indexedAttributes = new ArrayList<IndexedAttribute>();
         contextEntry = new BasicAttributes( true );
-        this.name = name;
+        this.id = name;
     }
 
 
     /**
-     * Gets the name of the partition.
+     * Gets the ID of the partition.
      *
      * @return
-     *      the name of the partition
+     *      the ID of the partition
      */
-    public String getName()
+    public String getId()
     {
-        return this.name;
+        return this.id;
     }
 
 
     /**
-     * Sets the name of the partition.
+     * Sets the ID of the partition.
      *
-     * @param name
-     *      the new name to set
+     * @param id
+     *      the new ID to set
      */
-    public void setName( String name )
+    public void setId( String id )
     {
-        this.name = name;
+        this.id = id;
     }
 
 
@@ -309,6 +309,6 @@
      */
     public String toString()
     {
-        return name;
+        return id;
     }
 }



Mime
View raw message