KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > directory > ldapstudio > apacheds > configuration > editor > GeneralPage


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  */

20 package org.apache.directory.ldapstudio.apacheds.configuration.editor;
21
22
23 import java.util.List JavaDoc;
24
25 import org.apache.directory.ldapstudio.apacheds.configuration.dialogs.BinaryAttributeDialog;
26 import org.apache.directory.ldapstudio.apacheds.configuration.model.ServerConfiguration;
27 import org.eclipse.jface.dialogs.Dialog;
28 import org.eclipse.jface.dialogs.IDialogConstants;
29 import org.eclipse.jface.viewers.ArrayContentProvider;
30 import org.eclipse.jface.viewers.DoubleClickEvent;
31 import org.eclipse.jface.viewers.IDoubleClickListener;
32 import org.eclipse.jface.viewers.ISelectionChangedListener;
33 import org.eclipse.jface.viewers.LabelProvider;
34 import org.eclipse.jface.viewers.SelectionChangedEvent;
35 import org.eclipse.jface.viewers.StructuredSelection;
36 import org.eclipse.jface.viewers.TableViewer;
37 import org.eclipse.swt.SWT;
38 import org.eclipse.swt.events.ModifyEvent;
39 import org.eclipse.swt.events.ModifyListener;
40 import org.eclipse.swt.events.SelectionAdapter;
41 import org.eclipse.swt.events.SelectionEvent;
42 import org.eclipse.swt.events.SelectionListener;
43 import org.eclipse.swt.events.VerifyEvent;
44 import org.eclipse.swt.events.VerifyListener;
45 import org.eclipse.swt.layout.GridData;
46 import org.eclipse.swt.layout.GridLayout;
47 import org.eclipse.swt.widgets.Button;
48 import org.eclipse.swt.widgets.Combo;
49 import org.eclipse.swt.widgets.Composite;
50 import org.eclipse.swt.widgets.Table;
51 import org.eclipse.swt.widgets.Text;
52 import org.eclipse.ui.forms.IManagedForm;
53 import org.eclipse.ui.forms.editor.FormEditor;
54 import org.eclipse.ui.forms.editor.FormPage;
55 import org.eclipse.ui.forms.widgets.FormToolkit;
56 import org.eclipse.ui.forms.widgets.ScrolledForm;
57 import org.eclipse.ui.forms.widgets.Section;
58 import org.eclipse.ui.forms.widgets.TableWrapData;
59 import org.eclipse.ui.forms.widgets.TableWrapLayout;
60
61
62 /**
63  * This class represents the General Page of the Server Configuration Editor.
64  *
65  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
66  * @version $Rev$, $Date$
67  */

68 public class GeneralPage extends FormPage
69 {
70     /** The Page ID*/
71     public static final String JavaDoc ID = ServerConfigurationEditor.ID + ".BasicPage";
72
73     /** The Page Title */
74     private static final String JavaDoc TITLE = "General";
75
76     /** The Binary Attribute List */
77     private List JavaDoc<String JavaDoc> binaryAttributes;
78
79     // UI Fields
80
private Text portText;
81     private Combo authenticationCombo;
82     private Text principalText;
83     private Text passwordText;
84     private Button showPasswordCheckbox;
85     private Button allowAnonymousAccessCheckbox;
86     private Text maxTimeLimitText;
87     private Text maxSizeLimitText;
88     private Text synchPeriodText;
89     private Text maxThreadsText;
90     private Button enableAccesControlCheckbox;
91     private Button enableNTPCheckbox;
92     private Button enableKerberosCheckbox;
93     private Button enableChangePasswordCheckbox;
94     private Button denormalizeOpAttrCheckbox;
95     private TableViewer binaryAttributesTableViewer;
96     private Button binaryAttributesAddButton;
97     private Button binaryAttributesEditButton;
98     private Button binaryAttributesDeleteButton;
99
100
101     /**
102      * Creates a new instance of GeneralPage.
103      *
104      * @param editor
105      * the associated editor
106      */

107     public GeneralPage( FormEditor editor )
108     {
109         super( editor, ID, TITLE );
110     }
111
112
113     /* (non-Javadoc)
114      * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
115      */

116     protected void createFormContent( IManagedForm managedForm )
117     {
118         ScrolledForm form = managedForm.getForm();
119         form.setText( "General" );
120
121         Composite parent = form.getBody();
122         TableWrapLayout twl = new TableWrapLayout();
123         twl.numColumns = 2;
124         parent.setLayout( twl );
125         FormToolkit toolkit = managedForm.getToolkit();
126
127         createSettingsSection( parent, toolkit );
128         createBinaryAttributesSection( parent, toolkit );
129         createLimitsSection( parent, toolkit );
130         createOptionsSection( parent, toolkit );
131
132         initFromInput();
133         addListeners();
134     }
135
136
137     /**
138      * Creates the Settings Section.
139      *
140      * @param parent
141      * the parent composite
142      * @param toolkit
143      * the toolkit to use
144      */

145     private void createSettingsSection( Composite parent, FormToolkit toolkit )
146     {
147         // Creation of the section
148
Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
149         section.marginWidth = 4;
150         section.setText( "Settings" );
151         section.setDescription( "Set the settings of the server." );
152         TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
153         td.grabHorizontal = true;
154         section.setLayoutData( td );
155         Composite client = toolkit.createComposite( section );
156         toolkit.paintBordersFor( client );
157         GridLayout glayout = new GridLayout( 2, false );
158         client.setLayout( glayout );
159         section.setClient( client );
160
161         // Port
162
toolkit.createLabel( client, "Port:" );
163         portText = toolkit.createText( client, "" );
164         portText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
165         portText.addVerifyListener( new VerifyListener()
166         {
167             public void verifyText( VerifyEvent e )
168             {
169                 if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
170
{
171                     e.doit = false;
172                 }
173             }
174         } );
175
176         // Authentication
177
toolkit.createLabel( client, "Authentication:" );
178         authenticationCombo = new Combo( client, SWT.SIMPLE );
179         authenticationCombo.setItems( new String JavaDoc[]
180             { "Simple" } );
181         authenticationCombo.setText( "Simple" );
182         authenticationCombo.setEnabled( false );
183         authenticationCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
184
185         // Principal
186
toolkit.createLabel( client, "Principal:" );
187         principalText = toolkit.createText( client, "" );
188         principalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
189
190         // Password
191
toolkit.createLabel( client, "Password:" );
192         passwordText = toolkit.createText( client, "" );
193         passwordText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
194         passwordText.setEchoChar( '\u2022' );
195
196         // Show Password
197
toolkit.createLabel( client, "" );
198         showPasswordCheckbox = toolkit.createButton( client, "Show password", SWT.CHECK );
199         showPasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
200         showPasswordCheckbox.setSelection( false );
201         showPasswordCheckbox.addSelectionListener( new SelectionAdapter()
202         {
203             public void widgetSelected( SelectionEvent e )
204             {
205                 if ( showPasswordCheckbox.getSelection() )
206                 {
207                     passwordText.setEchoChar( '\0' );
208                 }
209                 else
210                 {
211                     passwordText.setEchoChar( '\u2022' );
212                 }
213             }
214         } );
215
216         // Allow Anonymous Access
217
allowAnonymousAccessCheckbox = toolkit.createButton( client, "Allow Anonymous Access", SWT.CHECK );
218         allowAnonymousAccessCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
219     }
220
221
222     /**
223      * Creates the Limits Section
224      *
225      * @param parent
226      * the parent composite
227      * @param toolkit
228      * the toolkit to use
229      */

230     private void createLimitsSection( Composite parent, FormToolkit toolkit )
231     {
232         // Creation of the section
233
Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
234         section.marginWidth = 4;
235         section.setText( "Limits" );
236         section.setDescription( "Set the limits of the server." );
237         TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
238         td.grabHorizontal = true;
239         section.setLayoutData( td );
240         Composite client = toolkit.createComposite( section );
241         toolkit.paintBordersFor( client );
242         GridLayout glayout = new GridLayout( 2, false );
243         client.setLayout( glayout );
244         section.setClient( client );
245
246         // Max. Time Limit
247
toolkit.createLabel( client, "Max. Time Limit:" );
248         maxTimeLimitText = toolkit.createText( client, "" );
249         maxTimeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
250         maxTimeLimitText.addVerifyListener( new VerifyListener()
251         {
252             public void verifyText( VerifyEvent e )
253             {
254                 if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
255
{
256                     e.doit = false;
257                 }
258             }
259         } );
260
261         // Max. Size Limit
262
toolkit.createLabel( client, "Max. Size Limit:" );
263         maxSizeLimitText = toolkit.createText( client, "" );
264         maxSizeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
265         maxSizeLimitText.addVerifyListener( new VerifyListener()
266         {
267             public void verifyText( VerifyEvent e )
268             {
269                 if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
270
{
271                     e.doit = false;
272                 }
273             }
274         } );
275
276         // Synchronization Period
277
toolkit.createLabel( client, "Synchronization Period:" );
278         synchPeriodText = toolkit.createText( client, "" );
279         synchPeriodText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
280         synchPeriodText.addVerifyListener( new VerifyListener()
281         {
282             public void verifyText( VerifyEvent e )
283             {
284                 if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
285
{
286                     e.doit = false;
287                 }
288             }
289         } );
290
291         // Max. Threads
292
toolkit.createLabel( client, "Max. Threads:" );
293         maxThreadsText = toolkit.createText( client, "" );
294         maxThreadsText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
295         maxThreadsText.addVerifyListener( new VerifyListener()
296         {
297             public void verifyText( VerifyEvent e )
298             {
299                 if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
300
{
301                     e.doit = false;
302                 }
303             }
304         } );
305     }
306
307
308     /**
309      * Creates the Options Section
310      *
311      * @param parent
312      * the parent composite
313      * @param toolkit
314      * the toolkit to use
315      */

316     private void createOptionsSection( Composite parent, FormToolkit toolkit )
317     {
318         // Creation of the section
319
Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
320         section.marginWidth = 4;
321         section.setText( "Options" );
322         section.setDescription( "Set the options of the server." );
323         TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
324         td.grabHorizontal = true;
325         section.setLayoutData( td );
326         Composite client = toolkit.createComposite( section );
327         toolkit.paintBordersFor( client );
328         GridLayout glayout = new GridLayout();
329         client.setLayout( glayout );
330         section.setClient( client );
331
332         // Enable Access Control
333
enableAccesControlCheckbox = toolkit.createButton( client, "Enable Access Control", SWT.CHECK );
334         enableAccesControlCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
335
336         // Enable NTP
337
enableNTPCheckbox = toolkit.createButton( client, "Enable NTP", SWT.CHECK );
338         enableNTPCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
339
340         // Denormalize Operational Attributes
341
denormalizeOpAttrCheckbox = toolkit.createButton( client, "Denormalize Operational Attributes", SWT.CHECK );
342         denormalizeOpAttrCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
343
344         // Enable Kerberos
345
enableKerberosCheckbox = toolkit.createButton( client, "Enable Kerberos", SWT.CHECK );
346         enableKerberosCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
347         enableKerberosCheckbox.setEnabled( false );
348
349         // Enable Change Password
350
enableChangePasswordCheckbox = toolkit.createButton( client, "Enable Change Password", SWT.CHECK );
351         enableChangePasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
352         enableChangePasswordCheckbox.setEnabled( false );
353     }
354
355
356     /**
357      * Creates the Options Section
358      *
359      * @param parent
360      * the parent composite
361      * @param toolkit
362      * the toolkit to use
363      */

364     private void createBinaryAttributesSection( Composite parent, FormToolkit toolkit )
365     {
366         // Creation of the section
367
Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
368         section.marginWidth = 4;
369         section.setText( "Binary Attributes" );
370         section
371             .setDescription( "Set attribute type names and OID's if you want an them to be handled as binary content." );
372         TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
373         td.grabHorizontal = true;
374         section.setLayoutData( td );
375         Composite client = toolkit.createComposite( section );
376         toolkit.paintBordersFor( client );
377         GridLayout glayout = new GridLayout( 2, false );
378         client.setLayout( glayout );
379         section.setClient( client );
380
381         Table binaryAttributesTable = toolkit.createTable( client, SWT.NONE );
382         GridData gd = new GridData( SWT.FILL, SWT.NONE, true, false, 1, 3 );
383         gd.heightHint = 103;
384         binaryAttributesTable.setLayoutData( gd );
385         binaryAttributesTableViewer = new TableViewer( binaryAttributesTable );
386         binaryAttributesTableViewer.setContentProvider( new ArrayContentProvider() );
387         binaryAttributesTableViewer.setLabelProvider( new LabelProvider() );
388
389         GridData buttonsGD = new GridData( SWT.FILL, SWT.BEGINNING, false, false );
390         buttonsGD.widthHint = IDialogConstants.BUTTON_WIDTH;
391
392         binaryAttributesAddButton = toolkit.createButton( client, "Add...", SWT.PUSH );
393         binaryAttributesAddButton.setLayoutData( buttonsGD );
394
395         binaryAttributesEditButton = toolkit.createButton( client, "Edit...", SWT.PUSH );
396         binaryAttributesEditButton.setEnabled( false );
397         binaryAttributesEditButton.setLayoutData( buttonsGD );
398
399         binaryAttributesDeleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
400         binaryAttributesDeleteButton.setEnabled( false );
401         binaryAttributesDeleteButton.setLayoutData( buttonsGD );
402     }
403
404
405     /**
406      * Initializes the page with the Editor input.
407      */

408     private void initFromInput()
409     {
410         ServerConfiguration configuration = ( ( ServerConfigurationEditorInput ) getEditorInput() )
411             .getServerConfiguration();
412
413         binaryAttributes = configuration.getBinaryAttributes();
414         binaryAttributesTableViewer.setInput( binaryAttributes );
415
416         // Port
417
portText.setText( "" + configuration.getPort() );
418
419         // Principal
420
String JavaDoc principal = configuration.getPrincipal();
421         if ( principal != null )
422         {
423             principalText.setText( principal );
424         }
425
426         // Password
427
String JavaDoc password = configuration.getPassword();
428         if ( password != null )
429         {
430             passwordText.setText( password );
431         }
432
433         // Allow Anonymous Access
434
allowAnonymousAccessCheckbox.setSelection( configuration.isAllowAnonymousAccess() );
435
436         // Max Time Limit
437
maxTimeLimitText.setText( "" + configuration.getMaxTimeLimit() );
438
439         // Max Size Limit
440
maxSizeLimitText.setText( "" + configuration.getMaxSizeLimit() );
441
442         // Synchronization Period
443
synchPeriodText.setText( "" + configuration.getSynchronizationPeriod() );
444
445         // Max Threads
446
maxThreadsText.setText( "" + configuration.getMaxThreads() );
447
448         // Enable Access Control
449
enableAccesControlCheckbox.setSelection( configuration.isEnableAccessControl() );
450
451         // Enable NTP
452
enableNTPCheckbox.setSelection( configuration.isEnableNTP() );
453
454         // Enable Kerberos
455
enableKerberosCheckbox.setSelection( configuration.isEnableKerberos() );
456
457         // Enable Change Password
458
enableChangePasswordCheckbox.setSelection( configuration.isEnableChangePassword() );
459
460         // Denormalize Op Attr
461
denormalizeOpAttrCheckbox.setSelection( configuration.isDenormalizeOpAttr() );
462     }
463
464
465     /**
466      * Add listeners to UI fields.
467      */

468     private void addListeners()
469     {
470         // The Modify Listener
471
ModifyListener modifyListener = new ModifyListener()
472         {
473             public void modifyText( ModifyEvent e )
474             {
475                 setEditorDirty();
476             }
477         };
478
479         // The Selection Listener
480
SelectionListener selectionListener = new SelectionAdapter()
481         {
482             public void widgetSelected( SelectionEvent e )
483             {
484                 setEditorDirty();
485             }
486         };
487
488         // The ISelectionChangedListener for the Binary Attributes Table
489
ISelectionChangedListener binaryAttributesTableViewerListener = new ISelectionChangedListener()
490         {
491             public void selectionChanged( SelectionChangedEvent event )
492             {
493                 binaryAttributesEditButton.setEnabled( !event.getSelection().isEmpty() );
494                 binaryAttributesDeleteButton.setEnabled( !event.getSelection().isEmpty() );
495             }
496         };
497
498         // The IDoubleClickListener for the Binary Attributes Table
499
IDoubleClickListener binaryAttributesTableViewerDoubleClickListener = new IDoubleClickListener()
500         {
501             public void doubleClick( DoubleClickEvent event )
502             {
503                 editSelectedBinaryAttribute();
504             }
505         };
506
507         // The SelectionListener for the Binary Attributes Add Button
508
SelectionListener binaryAttributesAddButtonListener = new SelectionAdapter()
509         {
510             public void widgetSelected( SelectionEvent e )
511             {
512                 BinaryAttributeDialog dialog = new BinaryAttributeDialog( "" );
513                 if ( Dialog.OK == dialog.open() && dialog.isDirty() )
514                 {
515                     String JavaDoc newAttribute = dialog.getAttribute();
516                     if ( newAttribute != null && !"".equals( newAttribute )
517                         && !binaryAttributes.contains( newAttribute ) )
518                     {
519                         binaryAttributes.add( newAttribute );
520
521                         binaryAttributesTableViewer.refresh();
522                         setEditorDirty();
523                     }
524                 }
525             }
526         };
527
528         // The SelectionListener for the Binary Attributes Edit Button
529
SelectionListener binaryAttributesEditButtonListener = new SelectionAdapter()
530         {
531             public void widgetSelected( SelectionEvent e )
532             {
533                 editSelectedBinaryAttribute();
534             }
535         };
536
537         // The SelectionListener for the Binary Attributes Delete Button
538
SelectionListener binaryAttributesDeleteButtonListener = new SelectionAdapter()
539         {
540             public void widgetSelected( SelectionEvent e )
541             {
542                 StructuredSelection selection = ( StructuredSelection ) binaryAttributesTableViewer.getSelection();
543                 if ( !selection.isEmpty() )
544                 {
545                     String JavaDoc attribute = ( String JavaDoc ) selection.getFirstElement();
546                     binaryAttributes.remove( attribute );
547
548                     binaryAttributesTableViewer.refresh();
549                     setEditorDirty();
550                 }
551             }
552         };
553
554         portText.addModifyListener( modifyListener );
555         authenticationCombo.addModifyListener( modifyListener );
556         principalText.addModifyListener( modifyListener );
557         passwordText.addModifyListener( modifyListener );
558         allowAnonymousAccessCheckbox.addSelectionListener( selectionListener );
559         maxTimeLimitText.addModifyListener( modifyListener );
560         maxSizeLimitText.addModifyListener( modifyListener );
561         synchPeriodText.addModifyListener( modifyListener );
562         maxThreadsText.addModifyListener( modifyListener );
563         enableAccesControlCheckbox.addSelectionListener( selectionListener );
564         enableNTPCheckbox.addSelectionListener( selectionListener );
565         enableKerberosCheckbox.addSelectionListener( selectionListener );
566         enableChangePasswordCheckbox.addSelectionListener( selectionListener );
567         denormalizeOpAttrCheckbox.addSelectionListener( selectionListener );
568         binaryAttributesTableViewer.addSelectionChangedListener( binaryAttributesTableViewerListener );
569         binaryAttributesTableViewer.addDoubleClickListener( binaryAttributesTableViewerDoubleClickListener );
570         binaryAttributesAddButton.addSelectionListener( binaryAttributesAddButtonListener );
571         binaryAttributesEditButton.addSelectionListener( binaryAttributesEditButtonListener );
572         binaryAttributesDeleteButton.addSelectionListener( binaryAttributesDeleteButtonListener );
573     }
574
575
576     /**
577      * Opens a Binary Attribute Dialog with the selected Attribute Value Object in the
578      * Binary Attributes Table Viewer.
579      */

580     private void editSelectedBinaryAttribute()
581     {
582         StructuredSelection selection = ( StructuredSelection ) binaryAttributesTableViewer.getSelection();
583         if ( !selection.isEmpty() )
584         {
585             String JavaDoc oldAttribute = ( String JavaDoc ) selection.getFirstElement();
586
587             BinaryAttributeDialog dialog = new BinaryAttributeDialog( oldAttribute );
588             if ( Dialog.OK == dialog.open() && dialog.isDirty() )
589             {
590                 binaryAttributes.remove( oldAttribute );
591
592                 String JavaDoc newAttribute = dialog.getAttribute();
593                 if ( newAttribute != null && !"".equals( newAttribute ) && !binaryAttributes.contains( newAttribute ) )
594                 {
595                     binaryAttributes.add( newAttribute );
596                 }
597
598                 binaryAttributesTableViewer.refresh();
599                 setEditorDirty();
600             }
601         }
602     }
603
604
605     /**
606      * Sets the Editor as dirty.
607      */

608     private void setEditorDirty()
609     {
610         ( ( ServerConfigurationEditor ) getEditor() ).setDirty( true );
611     }
612
613
614     /**
615      * Saves the necessary elements to the input model.
616      */

617     public void save()
618     {
619         ServerConfiguration serverConfiguration = ( ( ServerConfigurationEditorInput ) getEditorInput() )
620             .getServerConfiguration();
621
622         serverConfiguration.setPort( Integer.parseInt( portText.getText() ) );
623         serverConfiguration.setPrincipal( principalText.getText() );
624         serverConfiguration.setPassword( passwordText.getText() );
625         serverConfiguration.setAllowAnonymousAccess( allowAnonymousAccessCheckbox.getSelection() );
626         serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimitText.getText() ) );
627         serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimitText.getText() ) );
628         serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodText.getText() ) );
629         serverConfiguration.setMaxThreads( Integer.parseInt( maxThreadsText.getText() ) );
630         serverConfiguration.setEnableAccessControl( enableAccesControlCheckbox.getSelection() );
631         serverConfiguration.setEnableNTP( enableNTPCheckbox.getSelection() );
632         serverConfiguration.setEnableKerberos( enableKerberosCheckbox.getSelection() );
633         serverConfiguration.setEnableChangePassword( enableChangePasswordCheckbox.getSelection() );
634         serverConfiguration.setDenormalizeOpAttr( denormalizeOpAttrCheckbox.getSelection() );
635     }
636 }
637
Popular Tags