directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1067577 - in /directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse: BatchResponse.java BatchResponseDsml.java
Date Sun, 06 Feb 2011 02:46:06 GMT
Author: akarasulu
Date: Sun Feb  6 02:46:06 2011
New Revision: 1067577

URL: http://svn.apache.org/viewvc?rev=1067577&view=rev
Log:
preparing to remove BatchResponse

Modified:
    directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java
    directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponseDsml.java

Modified: directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java?rev=1067577&r1=1067576&r2=1067577&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java
(original)
+++ directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java
Sun Feb  6 02:46:06 2011
@@ -17,7 +17,6 @@
  *  under the License. 
  *  
  */
-
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
@@ -34,15 +33,10 @@ import org.apache.directory.shared.ldap.
  */
 public class BatchResponse
 {
-
-    /**
-     * The responses contained in the Batch Response
-     */
+    /** The responses contained in the Batch Response */
     private List<Response> responses;
 
-    /**
-     * The ID of the response
-     */
+    /** The ID of the response */
     private int requestID;
 
 
@@ -56,28 +50,28 @@ public class BatchResponse
 
 
     /**
-     * Adds a response
+     * Gets the current response
      *
-     * @param response
-     *      the response to add
      * @return
-     *      true (as per the general contract of the Collection.add method)
+     *      the current response
      */
-    public boolean addResponse( Response response )
+    public Response getCurrentResponse()
     {
-        return responses.add( response );
+        return responses.get( responses.size() - 1 );
     }
 
-
+    
     /**
-     * Gets the current response
+     * Adds a response
      *
+     * @param response
+     *      the response to add
      * @return
-     *      the current response
+     *      true (as per the general contract of the Collection.add method)
      */
-    public Response getCurrentResponse()
+    public boolean addResponse( Response response )
     {
-        return responses.get( responses.size() - 1 );
+        return responses.add( response );
     }
 
 

Modified: directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponseDsml.java?rev=1067577&r1=1067576&r2=1067577&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponseDsml.java
(original)
+++ directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponseDsml.java
Sun Feb  6 02:46:06 2011
@@ -55,6 +55,18 @@ public class BatchResponseDsml
 
 
     /**
+     * Gets the current response
+     *
+     * @return
+     *      the current response
+     */
+    public DsmlDecorator<? extends Response> getCurrentResponse()
+    {
+        return responses.get( responses.size() - 1 );
+    }
+
+
+    /**
      * Adds a request to the Batch Response DSML.
      *
      * @param response
@@ -66,7 +78,7 @@ public class BatchResponseDsml
     {
         return responses.add( response );
     }
-
+    
 
     /**
      * Removes a request from the Batch Response DSML.
@@ -106,6 +118,18 @@ public class BatchResponseDsml
 
 
     /**
+     * Gets the List of all the responses
+     *
+     * @return
+     *      the List of all the responses
+     */
+    public List<DsmlDecorator<? extends Response>> getResponses()
+    {
+        return responses;
+    }
+
+
+    /**
      * Converts this Batch Response to its XML representation in the DSMLv2 format.
      * 
      * @return the XML representation in DSMLv2 format



Mime
View raw message