directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r494357 - in /directory/trunks/ldapstudio/ldapstudio-browser-core: .classpath META-INF/MANIFEST.MF build.properties ivy.xml src/main/java/org/apache/directory/ldapstudio/browser/core/jobs/ExportDsmlJob.java
Date Tue, 09 Jan 2007 10:24:45 GMT
Author: pamarcelot
Date: Tue Jan  9 02:24:44 2007
New Revision: 494357

URL: http://svn.apache.org/viewvc?view=rev&rev=494357
Log:
Updating ldapstudio-dsml-parser dependency to version 0.2. Fixing a bug with the unworking
Size Limit. (DIRSTUDIO-23)

Modified:
    directory/trunks/ldapstudio/ldapstudio-browser-core/.classpath
    directory/trunks/ldapstudio/ldapstudio-browser-core/META-INF/MANIFEST.MF
    directory/trunks/ldapstudio/ldapstudio-browser-core/build.properties
    directory/trunks/ldapstudio/ldapstudio-browser-core/ivy.xml
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/jobs/ExportDsmlJob.java

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/.classpath
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/.classpath?view=diff&rev=494357&r1=494356&r2=494357
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/.classpath (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/.classpath Tue Jan  9 02:24:44 2007
@@ -6,11 +6,11 @@
 	<classpathentry kind="lib" path="lib/poi-2.5.1-final-20040804.jar"/>
 	<classpathentry kind="lib" path="lib/commons-collections-3.1.jar"/>
 	<classpathentry kind="lib" path="lib/dom4j-1.6.1.jar"/>
-	<classpathentry kind="lib" path="lib/ldapstudio-dsml-parser-0.1.jar"/>
 	<classpathentry kind="lib" path="lib/nlog4j-1.2.25.jar"/>
 	<classpathentry kind="lib" path="lib/shared-asn1-0.9.6-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="lib/shared-ldap-0.9.6-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="lib/xpp3-1.1.3_8.jar"/>
+	<classpathentry kind="lib" path="lib/ldapstudio-dsml-parser-0.2.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="target/classes"/>

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/META-INF/MANIFEST.MF?view=diff&rev=494357&r1=494356&r2=494357
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/META-INF/MANIFEST.MF (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/META-INF/MANIFEST.MF Tue Jan  9 02:24:44
2007
@@ -31,8 +31,8 @@
  lib/poi-2.5.1-final-20040804.jar,
  lib/commons-collections-3.1.jar,
  lib/dom4j-1.6.1.jar,
- lib/ldapstudio-dsml-parser-0.1.jar,
  lib/nlog4j-1.2.25.jar,
  lib/shared-asn1-0.9.6-SNAPSHOT.jar,
  lib/shared-ldap-0.9.6-SNAPSHOT.jar,
- lib/xpp3-1.1.3_8.jar
+ lib/xpp3-1.1.3_8.jar,
+ lib/ldapstudio-dsml-parser-0.2.jar

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/build.properties
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/build.properties?view=diff&rev=494357&r1=494356&r2=494357
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/build.properties (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/build.properties Tue Jan  9 02:24:44
2007
@@ -9,9 +9,9 @@
                about_files/,\
                lib/commons-collections-3.1.jar,\
                lib/dom4j-1.6.1.jar,\
-               lib/ldapstudio-dsml-parser-0.1.jar,\
                lib/nlog4j-1.2.25.jar,\
                lib/shared-asn1-0.9.6-SNAPSHOT.jar,\
                lib/shared-ldap-0.9.6-SNAPSHOT.jar,\
-               lib/xpp3-1.1.3_8.jar
+               lib/xpp3-1.1.3_8.jar,\
+               lib/ldapstudio-dsml-parser-0.2.jar
 jars.compile.order = 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/ivy.xml
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/ivy.xml?view=diff&rev=494357&r1=494356&r2=494357
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/ivy.xml (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/ivy.xml Tue Jan  9 02:24:44 2007
@@ -21,6 +21,6 @@
 	<dependencies>
 		<dependency org="commons-codec" name="commons-codec" rev="1.3"/>
 		<dependency org="org.apache.poi" name="poi" rev="2.5.1-final-20040804"/>
-    	<dependency org="org.apache.directory.ldapstudio" name="ldapstudio-dsml-parser" rev="0.1"/>
+    	<dependency org="org.apache.directory.ldapstudio" name="ldapstudio-dsml-parser" rev="0.2"/>
     </dependencies>
 </ivy-module>

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/jobs/ExportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/jobs/ExportDsmlJob.java?view=diff&rev=494357&r1=494356&r2=494357
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/jobs/ExportDsmlJob.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/jobs/ExportDsmlJob.java
Tue Jan  9 02:24:44 2007
@@ -33,6 +33,7 @@
 import org.apache.directory.ldapstudio.browser.core.model.SearchParameter;
 import org.apache.directory.ldapstudio.dsmlv2.engine.Dsmlv2Engine;
 
+
 /**
  * This class implements a Job for Exporting a part of a LDAP Server into a DSML File.
  *
@@ -67,7 +68,7 @@
         this.connection = connection;
         this.searchParameter = searchParameter;
 
-        setName( BrowserCoreMessages.jobs__export_dsml_name ); 
+        setName( BrowserCoreMessages.jobs__export_dsml_name );
     }
 
 
@@ -86,7 +87,7 @@
      */
     protected Object[] getLockedObjects()
     {
-        List l = new ArrayList();
+        List<String> l = new ArrayList<String>();
         l.add( connection.getUrl() + "_" + DigestUtils.shaHex( exportDsmlFilename ) );
         return l.toArray();
     }
@@ -105,14 +106,14 @@
         {
             // Getting and preparing each parameter for the request        
             String requestDN = searchParameter.getSearchBase().toString();
-            
+
             String requestScope = null;
             int scope = searchParameter.getScope();
             if ( scope == ISearch.SCOPE_OBJECT )
             {
                 requestScope = "baseObject";
             }
-            else if ( scope == ISearch.SCOPE_ONELEVEL)
+            else if ( scope == ISearch.SCOPE_ONELEVEL )
             {
                 requestScope = "singleLevel";
             }
@@ -120,14 +121,14 @@
             {
                 requestScope = "wholeSubtree";
             }
-            
+
             String requestDerefAliases = null;
             int derefAliases = searchParameter.getAliasesDereferencingMethod();
             if ( derefAliases == IConnection.DEREFERENCE_ALIASES_ALWAYS )
             {
                 requestDerefAliases = "derefAlways";
             }
-            else if ( derefAliases == IConnection.DEREFERENCE_ALIASES_FINDING)
+            else if ( derefAliases == IConnection.DEREFERENCE_ALIASES_FINDING )
             {
                 requestDerefAliases = "derefFindingBaseObj";
             }
@@ -139,53 +140,56 @@
             {
                 requestDerefAliases = "derefInSearching";
             }
-            
+
             String requestTimeLimit = null;
             int timeLimit = searchParameter.getTimeLimit();
-            if ( timeLimit != 0);
+            if ( timeLimit != 0 )
+                ;
             {
                 requestTimeLimit = "" + timeLimit;
             }
-            
+
             String requestSizeLimit = null;
             int countLimit = searchParameter.getCountLimit();
-            if ( countLimit != 0);
+            if ( countLimit != 0 )
+                ;
             {
                 requestSizeLimit = "" + countLimit;
             }
-            
+
             // Constructing the request
-            String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
-            request += "<batchRequest>";
-            request += "<searchRequest dn=\"" + requestDN + "\"";
-            request += " scope=\"" + requestScope + "\" ";
-            request += " derefAliases=\"" +requestDerefAliases + "\"";
+            StringBuffer sb = new StringBuffer();
+            sb.append( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" );
+            sb.append( "<batchRequest>" );
+            sb.append( "<searchRequest dn=\"" + requestDN + "\"" );
+            sb.append( " scope=\"" + requestScope + "\" " );
+            sb.append( " derefAliases=\"" + requestDerefAliases + "\"" );
             if ( requestTimeLimit != null )
             {
-                request += " timelimit=\"" +requestTimeLimit + "\"";
+                sb.append( " timeLimit=\"" + requestTimeLimit + "\"" );
             }
             if ( requestSizeLimit != null )
             {
-                request += " sizelimit=\"" +requestSizeLimit + "\"";
+                sb.append( " sizeLimit=\"" + requestSizeLimit + "\"" );
             }
-            request += ">";
-            request += "<filter><present name=\"objectclass\"></present></filter>";
-            request += "<attributes>";
+            sb.append( ">" );
+            sb.append( "<filter><present name=\"objectclass\"></present></filter>"
);
+            sb.append( "<attributes>" );
             String[] returningAttributes = searchParameter.getReturningAttributes();
             for ( int i = 0; i < returningAttributes.length; i++ )
             {
-                request += "<attribute name=\"" + returningAttributes[i] + "\"/>";
+                sb.append( "<attribute name=\"" + returningAttributes[i] + "\"/>" );
             }
-            request += "</attributes>";
-            request += "</searchRequest>";
-            request += "</batchRequest>";
-            
-            System.out.println( request );
-            
+            sb.append( "</attributes>" );
+            sb.append( "</searchRequest>" );
+            sb.append( "</batchRequest>" );
+
             // Executing the request
-            Dsmlv2Engine engine = new Dsmlv2Engine( connection.getHost(), connection.getPort(),
connection.getBindPrincipal(), connection.getBindPassword() );
-            String response = engine.processDSML( request );
-            
+            Dsmlv2Engine engine = new Dsmlv2Engine( connection.getHost(), connection.getPort(),
connection
+                .getBindPrincipal(), connection.getBindPassword() );
+            String response = engine.processDSML( sb.toString() );
+
+            // Saving the response
             FileOutputStream fout = new FileOutputStream( exportDsmlFilename );
             new PrintStream( fout ).println( response );
             fout.close();
@@ -195,6 +199,7 @@
             monitor.reportError( e );
         }
     }
+
 
     /* (non-Javadoc)
      * @see org.apache.directory.ldapstudio.browser.core.jobs.AbstractEclipseJob#getErrorMessage()



Mime
View raw message