directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1075155 - in /directory: shared/branches/akarasulu/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/ shared/branches/akarasulu/dsml-parser/ shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/...
Date Sun, 27 Feb 2011 21:57:31 GMT
Author: akarasulu
Date: Sun Feb 27 21:57:31 2011
New Revision: 1075155

URL: http://svn.apache.org/viewvc?rev=1075155&view=rev
Log:
added test dependency on the default LPC factory in dsml to fix tests and changed some sigatures
using the LCS factory

Modified:
    directory/shared/branches/akarasulu/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
    directory/shared/branches/akarasulu/dsml-parser/pom.xml
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
    directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
    directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
    directory/shared/branches/akarasulu/ldap-codec-standalone/pom.xml
    directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java

Modified: directory/shared/branches/akarasulu/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=1075155&r1=1075154&r2=1075155&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
(original)
+++ directory/shared/branches/akarasulu/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
Sun Feb 27 21:57:31 2011
@@ -50,8 +50,6 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml.Processing;
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml.ResponseOrder;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
@@ -115,9 +113,7 @@ public class Dsmlv2Engine
     /** The batch response. */
     private BatchResponseDsml batchResponse;
     
-    private LdapCodecService codec = LdapCodecServiceFactory.getSingleton();
-
-    private Dsmlv2Grammar grammar = new Dsmlv2Grammar( codec );
+    private Dsmlv2Grammar grammar = new Dsmlv2Grammar();
 
     
     /**
@@ -354,7 +350,7 @@ public class Dsmlv2Engine
                 break;
 
             case EXTENDED_REQUEST:
-                ExtendedResponse extendedResponse = connection.extended( ( ExtendedRequest
) request );
+                ExtendedResponse extendedResponse = connection.extended( ( ExtendedRequest<?>
) request );
                 ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( connection.getCodecService(),
extendedResponse );
                 batchResponse.addResponse( extendedResponseDsml );
 

Modified: directory/shared/branches/akarasulu/dsml-parser/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/pom.xml?rev=1075155&r1=1075154&r2=1075155&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/pom.xml (original)
+++ directory/shared/branches/akarasulu/dsml-parser/pom.xml Sun Feb 27 21:57:31 2011
@@ -44,6 +44,12 @@
     
     <dependency>
       <groupId>${project.groupId}</groupId>
+      <artifactId>shared-ldap-protocol-codec</artifactId>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>${project.groupId}</groupId>
       <artifactId>shared-ldap-codec</artifactId>
     </dependency>
     

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java?rev=1075155&r1=1075154&r2=1075155&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
(original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
Sun Feb 27 21:57:31 2011
@@ -42,6 +42,7 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.codec.api.LdapConstants;
 import org.apache.directory.shared.ldap.model.entry.BinaryValue;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
@@ -79,17 +80,16 @@ import org.xmlpull.v1.XmlPullParserExcep
  */
 public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
 {
-    private LdapCodecService codec;
+    private LdapCodecService codec = LdapCodecServiceFactory.getSingleton();
     
 
     /**
      * Creates a new instance of Dsmlv2Grammar.
      */
     @SuppressWarnings("unchecked")
-    public Dsmlv2Grammar( LdapCodecService codec )
+    public Dsmlv2Grammar()
     {
         name = Dsmlv2Grammar.class.getName();
-        this.codec = codec;
 
         // Create the transitions table
         super.transitions = ( HashMap<Tag, GrammarTransition>[] ) Array.newInstance(
HashMap.class, 200 ); // TODO Change this value

Modified: directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java?rev=1075155&r1=1075154&r2=1075155&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
(original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
Sun Feb 27 21:57:31 2011
@@ -39,7 +39,7 @@ public abstract class AbstractTest
     /** The LDAP encoder decoder service */
     private LdapCodecService codec = LdapCodecServiceFactory.getSingleton();
     
-    private Dsmlv2Grammar grammar = new Dsmlv2Grammar( codec );
+    private Dsmlv2Grammar grammar = new Dsmlv2Grammar();
     
     
     public Dsmlv2Parser newParser() throws Exception

Modified: directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java?rev=1075155&r1=1075154&r2=1075155&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
(original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
Sun Feb 27 21:57:31 2011
@@ -245,6 +245,7 @@ public class DelRequestTest extends Abst
         }
         catch ( Exception e )
         {
+            e.printStackTrace();
             fail( e.getMessage() );
         }
 

Modified: directory/shared/branches/akarasulu/ldap-codec-standalone/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec-standalone/pom.xml?rev=1075155&r1=1075154&r2=1075155&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec-standalone/pom.xml (original)
+++ directory/shared/branches/akarasulu/ldap-codec-standalone/pom.xml Sun Feb 27 21:57:31
2011
@@ -51,7 +51,6 @@
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-protocol-codec</artifactId>
-      <scope>test</scope>
     </dependency>
     
     <dependency>

Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java?rev=1075155&r1=1075154&r2=1075155&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
(original)
+++ directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
Sun Feb 27 21:57:31 2011
@@ -17,7 +17,6 @@
  *  under the License. 
  *  
  */
-
 package org.apache.directory.studio.ldapbrowser.core.jobs;
 
 
@@ -196,7 +195,7 @@ public class ImportDsmlRunnable implemen
         try
         {
             // Parsing the file
-            Dsmlv2Grammar grammar = new Dsmlv2Grammar( codec );
+            Dsmlv2Grammar grammar = new Dsmlv2Grammar();
             Dsmlv2Parser parser = new Dsmlv2Parser( grammar );
             parser.setInput( new FileInputStream( dsmlFile ), "UTF-8" );
             parser.parseAllRequests();
@@ -299,7 +298,7 @@ public class ImportDsmlRunnable implemen
                 processDelRequest( ( DeleteRequest ) request, batchResponseDsml, monitor
);
                 break;
             case EXTENDED_REQUEST:
-                processExtendedRequest( ( ExtendedRequest ) request, batchResponseDsml, monitor
);
+                processExtendedRequest( ( ExtendedRequest<?> ) request, batchResponseDsml,
monitor );
                 break;
             case MODIFY_REQUEST:
                 processModifyRequest( ( ModifyRequest ) request, batchResponseDsml, monitor
);
@@ -465,7 +464,7 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processExtendedRequest( ExtendedRequest request, BatchResponseDsml batchResponseDsml,
+    private void processExtendedRequest( ExtendedRequest<?> request, BatchResponseDsml
batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // We can not support extended requests at the moment,



Mime
View raw message