directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1493737 - /directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java
Date Mon, 17 Jun 2013 12:34:28 GMT
Author: pamarcelot
Date: Mon Jun 17 12:34:27 2013
New Revision: 1493737

URL: http://svn.apache.org/r1493737
Log:
Fix for DIRSTUDIO-792 (Batch operation Next button inactive)

Modified:
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java?rev=1493737&r1=1493736&r2=1493737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java
Mon Jun 17 12:34:27 2013
@@ -36,14 +36,26 @@ import org.eclipse.swt.layout.GridLayout
 import org.eclipse.swt.widgets.Composite;
 
 
+/**
+ * This class implements the "Modify" page for the Batch Operation Wizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class BatchOperationModifyWizardPage extends WizardPage implements WidgetModifyListener
 {
-
+    /** The wizard */
     private BatchOperationWizard wizard;
 
+    /** The ModWidget */
     private ModWidget modWidget;
 
 
+    /**
+     * Creates a new instance of BatchOperationModifyWizardPage.
+     *
+     * @param pageName the name of the page
+     * @param wizard the wizard
+     */
     public BatchOperationModifyWizardPage( String pageName, BatchOperationWizard wizard )
     {
         super( pageName );
@@ -56,31 +68,9 @@ public class BatchOperationModifyWizardP
     }
 
 
-    private void validate()
-    {
-
-        String dummyLdif = "dn: cn=dummy" + BrowserCoreConstants.LINE_SEPARATOR + modWidget.getLdifFragment();
//$NON-NLS-1$
-        LdifFile model = new LdifParser().parse( dummyLdif );
-        LdifContainer[] containers = model.getContainers();
-        if ( containers.length == 0 )
-        {
-            setPageComplete( false );
-            return;
-        }
-        for ( int i = 0; i < containers.length; i++ )
-        {
-            if ( !containers[i].isValid() )
-            {
-                setPageComplete( false );
-                return;
-            }
-        }
-
-        setPageComplete( true );
-
-    }
-
-
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
 
@@ -101,15 +91,52 @@ public class BatchOperationModifyWizardP
     }
 
 
+    /**
+     * Gets the LDIF fragment.
+     *
+     * @return the LDIF fragment
+     */
     public String getLdifFragment()
     {
         return modWidget.getLdifFragment();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void widgetModified( WidgetModifyEvent event )
     {
         validate();
     }
 
+
+    /**
+     * Validates the page
+     */
+    private void validate()
+    {
+        String dummyLdif = "dn: cn=dummy" + BrowserCoreConstants.LINE_SEPARATOR + modWidget.getLdifFragment();
//$NON-NLS-1$
+        
+        LdifFile model = new LdifParser().parse( dummyLdif );
+        
+        LdifContainer[] containers = model.getContainers();
+        
+        if ( containers.length == 0 )
+        {
+            setPageComplete( false );
+            return;
+        }
+        
+        for ( int i = 0; i < containers.length; i++ )
+        {
+            if ( !containers[i].isValid() )
+            {
+                setPageComplete( false );
+                return;
+            }
+        }
+
+        setPageComplete( true );
+    }
 }



Mime
View raw message