You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2011/11/16 18:26:18 UTC
svn commit: r1202796 - in
/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor:
LdapLdapsServersPage.java OverviewPage.java
Author: pamarcelot
Date: Wed Nov 16 17:26:18 2011
New Revision: 1202796
URL: http://svn.apache.org/viewvc?rev=1202796&view=rev
Log:
Added javadoc.
Modified:
directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1202796&r1=1202795&r2=1202796&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java Wed Nov 16 17:26:18 2011
@@ -306,30 +306,41 @@ public class LdapLdapsServersPage extend
twl.numColumns = 2;
parent.setLayout( twl );
+ // Left Composite
Composite leftComposite = toolkit.createComposite( parent );
leftComposite.setLayout( new GridLayout() );
TableWrapData leftCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
leftCompositeTableWrapData.grabHorizontal = true;
leftComposite.setLayoutData( leftCompositeTableWrapData );
+ // Right Composite
Composite rightComposite = toolkit.createComposite( parent );
rightComposite.setLayout( new GridLayout() );
TableWrapData rightCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
rightCompositeTableWrapData.grabHorizontal = true;
rightComposite.setLayoutData( rightCompositeTableWrapData );
+ // Creating the sections
createLdapServerSection( toolkit, leftComposite );
createLimitsSection( toolkit, leftComposite );
createAdvancedSection( toolkit, leftComposite );
createSupportedAuthenticationMechanismsSection( toolkit, rightComposite );
createSaslSettingsSection( toolkit, rightComposite );
+ // Refreshing the UI
refreshUI();
}
+ /**
+ * Creates the LDAP/LDAPS section.
+ *
+ * @param toolkit the toolkit to use
+ * @param parent the parent composite
+ */
private void createLdapServerSection( FormToolkit toolkit, Composite parent )
{
+ // Creation of the section
Section section = toolkit.createSection( parent, Section.TITLE_BAR );
section.setText( "LDAP/LDAPS Servers" );
section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -340,15 +351,21 @@ public class LdapLdapsServersPage extend
composite.setLayout( gridLayout );
section.setClient( composite );
+ // Enable LDAP Server Checkbox
enableLdapCheckbox = toolkit.createButton( composite, "Enable LDAP Server", SWT.CHECK );
enableLdapCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, gridLayout.numColumns, 1 ) );
+
+ // LDAP Server Port Text
toolkit.createLabel( composite, TABULATION );
toolkit.createLabel( composite, "Port:" );
ldapPortText = createPortText( toolkit, composite );
createDefaultValueLabel( toolkit, composite, "10389" );
+ // Enable LDAPS Server Checkbox
enableLdapsCheckbox = toolkit.createButton( composite, "Enable LDAPS Server", SWT.CHECK );
enableLdapsCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, gridLayout.numColumns, 1 ) );
+
+ // LDAPS Server Port Text
toolkit.createLabel( composite, TABULATION );
toolkit.createLabel( composite, "Port:" );
ldapsPortText = createPortText( toolkit, composite );
@@ -376,12 +393,12 @@ public class LdapLdapsServersPage extend
composite.setLayout( glayout );
section.setClient( composite );
- // Max. Time Limit
+ // Max. Time Limit Text
toolkit.createLabel( composite, "Max Time Limit (ms):" );
maxTimeLimitText = createIntegerText( toolkit, composite );
maxTimeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
- // Max. Size Limit
+ // Max. Size Limit Text
toolkit.createLabel( composite, "Max Size Limit (entries):" );
maxSizeLimitText = createIntegerText( toolkit, composite );
maxSizeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -408,7 +425,7 @@ public class LdapLdapsServersPage extend
composite.setLayout( glayout );
section.setClient( composite );
- // Enable TLS
+ // Enable TLS Checkbox
enableTlsCheckbox = toolkit.createButton( composite, "Enable TLS", SWT.CHECK );
enableTlsCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 3, 1 ) );
@@ -506,23 +523,23 @@ public class LdapLdapsServersPage extend
composite.setLayout( new GridLayout( 4, true ) );
section.setClient( composite );
- // Simple
+ // Simple Checkbox
authMechSimpleCheckbox = toolkit.createButton( composite, "Simple", SWT.CHECK );
authMechSimpleCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
- // GSSAPI
+ // GSSAPI Checkbox
authMechGssapiCheckbox = toolkit.createButton( composite, "GSSAPI", SWT.CHECK );
authMechGssapiCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
- // CRAM-MD5
+ // CRAM-MD5 Checkbox
authMechCramMd5Checkbox = toolkit.createButton( composite, "CRAM-MD5", SWT.CHECK );
authMechCramMd5Checkbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
- // DIGEST-MD5
+ // DIGEST-MD5 Checkbox
authMechDigestMd5Checkbox = toolkit.createButton( composite, "DIGEST-MD5", SWT.CHECK );
authMechDigestMd5Checkbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
- // NTLM
+ // NTLM Checkbox and Text
authMechNtlmCheckbox = toolkit.createButton( composite, "NTLM", SWT.CHECK );
authMechNtlmCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
Composite authMechNtlmComposite = toolkit.createComposite( composite );
@@ -532,7 +549,7 @@ public class LdapLdapsServersPage extend
authMechNtlmText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
authMechNtlmComposite.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, false, false, 3, 1 ) );
- // GSS-SPNEGO
+ // GSS-SPNEGO Checkbox and Text
authMechGssSpnegoCheckbox = toolkit.createButton( composite, "GSS-SPNEGO", SWT.CHECK );
authMechGssSpnegoCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
Composite authMechGssSpnegoComposite = toolkit.createComposite( composite );
@@ -564,14 +581,14 @@ public class LdapLdapsServersPage extend
composite.setLayout( glayout );
section.setClient( composite );
- // SASL Host
+ // SASL Host Text
toolkit.createLabel( composite, "SASL Host:" );
saslHostText = toolkit.createText( composite, "" );
setGridDataWithDefaultWidth( saslHostText, new GridData( SWT.FILL, SWT.NONE, true, false ) );
Label defaultSaslHostLabel = createDefaultValueLabel( toolkit, composite, "ldap.example.com" );
defaultSaslHostLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
- // SASL Principal
+ // SASL Principal Text
toolkit.createLabel( composite, "SASL Principal:" );
saslPrincipalText = toolkit.createText( composite, "" ); //$NON-NLS-1$
setGridDataWithDefaultWidth( saslPrincipalText, new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -579,7 +596,7 @@ public class LdapLdapsServersPage extend
"ldap/ldap.example.com@EXAMPLE.COM" );
defaultSaslPrincipalLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
- // Search Base Dn
+ // Search Base Dn Text
toolkit.createLabel( composite, "Search Base Dn:" );
saslSearchBaseDnText = toolkit.createText( composite, "" ); //$NON-NLS-1$
setGridDataWithDefaultWidth( saslSearchBaseDnText, new GridData( SWT.FILL, SWT.NONE, true, false ) );
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java?rev=1202796&r1=1202795&r2=1202796&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/OverviewPage.java Wed Nov 16 17:26:18 2011
@@ -254,6 +254,7 @@ public class OverviewPage extends Server
*/
private void createLdapLdapsServersSection( FormToolkit toolkit, Composite parent )
{
+ // Creation of the section
Section section = toolkit.createSection( parent, Section.TITLE_BAR );
section.setText( "LDAP/LDAPS Servers" );
section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -264,20 +265,27 @@ public class OverviewPage extends Server
composite.setLayout( gridLayout );
section.setClient( composite );
+ // Enable LDAP Server Checkbox
enableLdapCheckbox = toolkit.createButton( composite, "Enable LDAP Server", SWT.CHECK );
enableLdapCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, gridLayout.numColumns, 1 ) );
+
+ // LDAP Server Port Text
toolkit.createLabel( composite, TABULATION );
toolkit.createLabel( composite, "Port:" );
ldapPortText = createPortText( toolkit, composite );
createDefaultValueLabel( toolkit, composite, "10389" );
+ // Enable LDAPS Server Checkbox
enableLdapsCheckbox = toolkit.createButton( composite, "Enable LDAPS Server", SWT.CHECK );
enableLdapsCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, gridLayout.numColumns, 1 ) );
+
+ // LDAPS Server Port Text
toolkit.createLabel( composite, TABULATION );
toolkit.createLabel( composite, "Port:" );
ldapsPortText = createPortText( toolkit, composite );
createDefaultValueLabel( toolkit, composite, "10636" );
+ // LDAP Configuration Link
openLdapConfigurationLink = toolkit.createHyperlink( composite,
"Advanced LDAP/LDAPS configuration...", SWT.NONE );
openLdapConfigurationLink.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false,
@@ -294,6 +302,7 @@ public class OverviewPage extends Server
*/
private void createKerberosChangePasswordServersSection( FormToolkit toolkit, Composite parent )
{
+ // Creation of the section
Section section = toolkit.createSection( parent, Section.TITLE_BAR );
section.setText( "Kerberos Server" );
section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -304,23 +313,30 @@ public class OverviewPage extends Server
composite.setLayout( gridLayout );
section.setClient( composite );
+ // Enable Kerberos Server Checkbox
enableKerberosCheckbox = toolkit.createButton( composite, "Enable Kerberos Server", SWT.CHECK );
enableKerberosCheckbox
.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, gridLayout.numColumns, 1 ) );
+
+ // Kerberos Server Port Text
toolkit.createLabel( composite, TABULATION );
toolkit.createLabel( composite, "Port:" );
kerberosPortText = createPortText( toolkit, composite );
createDefaultValueLabel( toolkit, composite, "60088" );
+ // Enable Change Password Server Checkbox
enableChangePasswordCheckbox = toolkit.createButton( composite, "Enable Kerberos Change Password Server",
SWT.CHECK );
enableChangePasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false,
gridLayout.numColumns, 1 ) );
+
+ // Change Password Server Port Text
toolkit.createLabel( composite, TABULATION );
toolkit.createLabel( composite, "Port:" );
changePasswordPortText = createPortText( toolkit, composite );
createDefaultValueLabel( toolkit, composite, "60464" );
+ // Kerberos Configuration Link
openKerberosConfigurationLink = toolkit.createHyperlink( composite,
"Advanced Kerberos configuration...", SWT.NONE );
openKerberosConfigurationLink.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false,
@@ -337,6 +353,7 @@ public class OverviewPage extends Server
*/
private void createPartitionsSection( FormToolkit toolkit, Composite parent )
{
+ // Creation of the section
Section section = toolkit.createSection( parent, Section.TITLE_BAR );
section.setText( "Partitions" );
section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -347,9 +364,11 @@ public class OverviewPage extends Server
composite.setLayout( gridLayout );
section.setClient( composite );
+ // Partitions Label
partitionsLabel = toolkit.createLabel( composite, "" );
partitionsLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-
+
+ // Partitions Table Viewer
Table partitionsTable = toolkit.createTable( composite, SWT.NULL );
GridData gd = new GridData( SWT.FILL, SWT.NONE, true, false );
gd.heightHint = 45;
@@ -358,6 +377,7 @@ public class OverviewPage extends Server
partitionsTableViewer.setContentProvider( new ArrayContentProvider() );
partitionsTableViewer.setLabelProvider( PartitionsPage.PARTITIONS_LABEL_PROVIDER );
+ // Partitions Configuration Link
openPartitionsConfigurationLink = toolkit.createHyperlink( composite,
"Advanced Partitions configuration...", SWT.NONE );
openPartitionsConfigurationLink.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false,
@@ -374,6 +394,7 @@ public class OverviewPage extends Server
*/
private void createOptionsSection( FormToolkit toolkit, Composite parent )
{
+ // Creation of the section
Section section = toolkit.createSection( parent, Section.TITLE_BAR );
section.setText( "Options" );
section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -384,14 +405,15 @@ public class OverviewPage extends Server
composite.setLayout( gridLayout );
section.setClient( composite );
- // Allow Anonymous Access
+ // Allow Anonymous Access Checkbox
allowAnonymousAccessCheckbox = toolkit.createButton( composite, "Allow Anonymous Access", SWT.CHECK );
allowAnonymousAccessCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false ) );
- // Enable Access Control
+ // Enable Access Control Checkbox
enableAccessControlCheckbox = toolkit.createButton( composite, "Enable Access Control", SWT.CHECK );
enableAccessControlCheckbox.setLayoutData( new GridData( SWT.NONE, SWT.NONE, true, false ) );
+ // Options Configuration Link
openOptionsConfigurationLink = toolkit.createHyperlink( composite,
"Advanced Options configuration...", SWT.NONE );
openOptionsConfigurationLink.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false,