directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063131 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ apacheds/trunk/protocol-ldap/src/main/java/org/apache/di...
Date Tue, 25 Jan 2011 03:58:02 GMT
Author: akarasulu
Date: Tue Jan 25 03:58:01 2011
New Revision: 1063131

URL: http://svn.apache.org/viewvc?rev=1063131&view=rev
Log:
added encoding decorator to decouple SearchResultEntryImpl

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/SearchResultEntryDecorator.java
      - copied, changed from r1063097, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/FooDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImpl.java
  (contents, props changed)
      - copied, changed from r1063086, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultEntryImpl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImplTest.java
  (contents, props changed)
      - copied, changed from r1063063, directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
Removed:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultEntryImpl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultDoneImpl.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
Tue Jan 25 03:58:01 2011
@@ -30,7 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.model.message.*;
 import org.apache.directory.shared.ldap.model.message.SearchResultDoneImpl;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 
 
 /**

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
Tue Jan 25 03:58:01 2011
@@ -34,11 +34,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControl;
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchControl;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.AbandonListener;
-import org.apache.directory.shared.ldap.model.message.AbandonableRequest;
-import org.apache.directory.shared.ldap.model.message.SearchRequest;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Tue Jan 25 03:58:01 2011
@@ -58,7 +58,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
Tue Jan 25 03:58:01 2011
@@ -71,7 +71,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
 import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
Tue Jan 25 03:58:01 2011
@@ -35,11 +35,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
-import org.apache.directory.shared.ldap.model.message.AbandonListener;
-import org.apache.directory.shared.ldap.model.message.AbandonableRequest;
-import org.apache.directory.shared.ldap.model.message.SearchRequest;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.message.control.replication.SyncModifyDnType;
 import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
 import org.apache.directory.shared.util.Strings;

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
Tue Jan 25 03:58:01 2011
@@ -65,7 +65,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchResultDoneImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
 import org.apache.directory.shared.ldap.model.message.Control;

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java
Tue Jan 25 03:58:01 2011
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.dom4j.Element;
 import org.dom4j.Namespace;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
Tue Jan 25 03:58:01 2011
@@ -109,7 +109,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchResultDoneImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
 import org.apache.directory.shared.ldap.model.message.UnbindRequest;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
Tue Jan 25 03:58:01 2011
@@ -1208,15 +1208,16 @@ public class LdapEncoder
      *                    +--> 0x04 L7-m-n value
      * </pre>
      */
-    private int computeSearchResultEntryLength( SearchResultEntryImpl searchResultEntry )
+    private int computeSearchResultEntryLength( SearchResultEntryDecorator decorator )
     {
+        SearchResultEntry searchResultEntry = decorator.getSearchResultEntry();
         Dn dn = searchResultEntry.getObjectName();
 
         byte[] dnBytes = Strings.getBytesUtf8(dn.getName());
 
         // The entry
         int searchResultEntryLength = 1 + TLV.getNbBytes( dnBytes.length ) + dnBytes.length;
-        searchResultEntry.setObjectNameBytes( dnBytes );
+        decorator.setObjectNameBytes( dnBytes );
 
         // The attributes sequence
         int attributesLength = 0;
@@ -1229,8 +1230,8 @@ public class LdapEncoder
             List<Integer> valsLength = new LinkedList<Integer>();
 
             // Store those lists in the object
-            searchResultEntry.setAttributeLength( attributeLength );
-            searchResultEntry.setValsLength( valsLength );
+            decorator.setAttributeLength( attributeLength );
+            decorator.setValsLength( valsLength );
 
             // Compute the attributes length
             for ( EntryAttribute attribute : entry )
@@ -1282,13 +1283,13 @@ public class LdapEncoder
             }
 
             // Store the lengths of the entry
-            searchResultEntry.setAttributesLength( attributesLength );
+            decorator.setAttributesLength( attributesLength );
         }
 
         searchResultEntryLength += 1 + TLV.getNbBytes( attributesLength ) + attributesLength;
 
         // Store the length of the response 
-        searchResultEntry.setSearchResultEntryLength( searchResultEntryLength );
+        decorator.setSearchResultEntryLength( searchResultEntryLength );
 
         // Return the result.
         return 1 + TLV.getNbBytes( searchResultEntryLength ) + searchResultEntryLength;
@@ -2255,21 +2256,22 @@ public class LdapEncoder
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    private void encodeSearchResultEntry( ByteBuffer buffer, SearchResultEntryImpl searchResultEntry
)
+    private void encodeSearchResultEntry( ByteBuffer buffer, SearchResultEntryDecorator decorator
)
         throws EncoderException
     {
+        SearchResultEntry searchResultEntry = decorator.getSearchResultEntry();
         try
         {
             // The SearchResultEntry Tag
             buffer.put( LdapConstants.SEARCH_RESULT_ENTRY_TAG );
-            buffer.put( TLV.getBytes( searchResultEntry.getSearchResultEntryLength() ) );
+            buffer.put( TLV.getBytes( decorator.getSearchResultEntryLength() ) );
 
             // The objectName
-            Value.encode( buffer, searchResultEntry.getObjectNameBytes() );
+            Value.encode( buffer, decorator.getObjectNameBytes() );
 
             // The attributes sequence
             buffer.put( UniversalTag.SEQUENCE.getValue() );
-            buffer.put( TLV.getBytes( searchResultEntry.getAttributesLength() ) );
+            buffer.put( TLV.getBytes( decorator.getAttributesLength() ) );
 
             // The partial attribute list
             Entry entry = searchResultEntry.getEntry();
@@ -2283,7 +2285,7 @@ public class LdapEncoder
                 {
                     // The partial attribute list sequence
                     buffer.put( UniversalTag.SEQUENCE.getValue() );
-                    int localAttributeLength = searchResultEntry.getAttributeLength().get(
attributeNumber );
+                    int localAttributeLength = decorator.getAttributeLength().get( attributeNumber
);
                     buffer.put( TLV.getBytes( localAttributeLength ) );
 
                     // The attribute type
@@ -2291,7 +2293,7 @@ public class LdapEncoder
 
                     // The values
                     buffer.put( UniversalTag.SET.getValue() );
-                    int localValuesLength = searchResultEntry.getValsLength().get( attributeNumber
);
+                    int localValuesLength = decorator.getValsLength().get( attributeNumber
);
                     buffer.put( TLV.getBytes( localValuesLength ) );
 
                     if ( attribute.size() > 0 )
@@ -2448,7 +2450,7 @@ public class LdapEncoder
                 return computeSearchResultDoneLength( ( SearchResultDoneDecorator ) decorator
);
 
             case SEARCH_RESULT_ENTRY:
-                return computeSearchResultEntryLength( ( SearchResultEntryImpl ) message
);
+                return computeSearchResultEntryLength( ( SearchResultEntryDecorator ) decorator
);
 
             case SEARCH_RESULT_REFERENCE:
                 return computeSearchResultReferenceLength( ( SearchResultReferenceDecorator
) decorator );
@@ -2541,7 +2543,7 @@ public class LdapEncoder
                 break;
 
             case SEARCH_RESULT_ENTRY:
-                encodeSearchResultEntry( bb, ( SearchResultEntryImpl ) message );
+                encodeSearchResultEntry( bb, ( SearchResultEntryDecorator ) decorator );
                 break;
 
             case SEARCH_RESULT_REFERENCE:

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
Tue Jan 25 03:58:01 2011
@@ -83,6 +83,8 @@ public class MessageDecorator
                 return new ModifyDnResponseDecorator( ( ModifyDnResponse ) decoratedMessage
);
             case SEARCH_RESULT_DONE:
                 return new SearchResultDoneDecorator( ( SearchResultDone ) decoratedMessage
);
+            case SEARCH_RESULT_ENTRY:
+                return new SearchResultEntryDecorator( ( SearchResultEntry ) decoratedMessage
);
             case SEARCH_RESULT_REFERENCE:
                 return new SearchResultReferenceDecorator( ( SearchResultReference ) decoratedMessage
);
             default:

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/SearchResultEntryDecorator.java
(from r1063097, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/FooDecorator.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/SearchResultEntryDecorator.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/SearchResultEntryDecorator.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/FooDecorator.java&r1=1063097&r2=1063131&rev=1063131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/FooDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/SearchResultEntryDecorator.java
Tue Jan 25 03:58:01 2011
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.ldap.message.decorators;
 
 
-import org.apache.directory.shared.ldap.model.message.AddRequest;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 
 import java.util.List;
 
@@ -30,22 +30,135 @@ import java.util.List;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class FooDecorator extends MessageDecorator
+public class SearchResultEntryDecorator extends MessageDecorator
 {
 
+    /** A temporary storage for the byte[] representing the objectName */
+    private byte[] objectNameBytes;
+
+    /** The search result entry length */
+    private int searchResultEntryLength;
+
+    /** The partial attributes length */
+    private int attributesLength;
+
+    /** The list of all attributes length */
+    private List<Integer> attributeLength;
+
+    /** The list of all vals length */
+    private List<Integer> valsLength;
+
+
     /**
-     * Makes a Foo encodable.
+     * Makes a SearchResultEntry encodable.
      *
-     * @param decoratedMessage the decorated Foo
+     * @param decoratedMessage the decorated SearchResultEntry
      */
-    public FooDecorator( AddRequest decoratedMessage )
+    public SearchResultEntryDecorator( SearchResultEntry decoratedMessage )
     {
         super( decoratedMessage );
     }
 
 
-    public AddRequest getAddRequest()
+    public SearchResultEntry getSearchResultEntry()
+    {
+        return ( SearchResultEntry ) getMessage();
+    }
+
+
+    /**
+     * Gets the distinguished name bytes of the entry object returned.
+     *
+     * @return the Dn bytes of the entry returned.
+     */
+    public byte[] getObjectNameBytes()
+    {
+        return objectNameBytes;
+    }
+
+
+    /**
+     * Sets the distinguished name bytes of the entry object returned.
+     *
+     * @param objectNameBytes the Dn bytes of the entry returned.
+     */
+    public void setObjectNameBytes( byte[] objectNameBytes )
+    {
+        this.objectNameBytes = objectNameBytes;
+    }
+
+
+    /**
+     * @return The encoded SearchResultEntry's length
+     */
+    public int getSearchResultEntryLength()
+    {
+        return searchResultEntryLength;
+    }
+
+
+    /**
+     * Stores the encoded length for the SearchResultEntry
+     * @param searchResultEntryLength The encoded length
+     */
+    public void setSearchResultEntryLength( int searchResultEntryLength )
+    {
+        this.searchResultEntryLength = searchResultEntryLength;
+    }
+
+
+    /**
+     * @return The encoded PartialAttributeList's length
+     */
+    public int getAttributesLength()
+    {
+        return attributesLength;
+    }
+
+
+    /**
+     * Stores the encoded length for the Attributes
+     * @param attributesLength The list of encoded lengths
+     */
+    public void setAttributesLength( int attributesLength )
+    {
+        this.attributesLength = attributesLength;
+    }
+
+
+    /**
+     * @return The encoded PartialAttributeList's length
+     */
+    public List<Integer> getAttributeLength()
+    {
+        return attributeLength;
+    }
+
+
+    /**
+     * @return The list of encoded Attributes' length
+     */
+    public void setAttributeLength( List<Integer> attributeLength )
+    {
+        this.attributeLength = attributeLength;
+    }
+
+
+    /**
+     * @return The list of encoded values' length
+     */
+    public List<Integer> getValsLength()
+    {
+        return valsLength;
+    }
+
+
+    /**
+     * Stores the list of encoded length for the values
+     * @param valsLength The list of encoded lengths
+     */
+    public void setValsLength( List<Integer> valsLength )
     {
-        return ( AddRequest ) getMessage();
+        this.valsLength = valsLength;
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultDoneImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultDoneImpl.java?rev=1063131&r1=1063130&r2=1063131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultDoneImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultDoneImpl.java
Tue Jan 25 03:58:01 2011
@@ -20,11 +20,6 @@
 package org.apache.directory.shared.ldap.model.message;
 
 
-import org.apache.directory.shared.ldap.model.message.AbstractResultResponse;
-import org.apache.directory.shared.ldap.model.message.LdapResult;
-import org.apache.directory.shared.ldap.model.message.SearchResultDone;
-
-
 /**
  * SearchResponseDone implementation
  * 

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImpl.java
(from r1063086, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultEntryImpl.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImpl.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImpl.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultEntryImpl.java&r1=1063086&r2=1063131&rev=1063131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultEntryImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImpl.java
Tue Jan 25 03:58:01 2011
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.shared.ldap.message;
+package org.apache.directory.shared.ldap.model.message;
 
 
 import java.util.List;
@@ -48,25 +48,7 @@ public class SearchResultEntryImpl exten
     /** The current attribute being decoded */
     private EntryAttribute currentAttribute;
 
-    /** A temporary storage for the byte[] representing the objectName */
-    private byte[] objectNameBytes;
 
-    /** The search result entry length */
-    private int searchResultEntryLength;
-
-    /** The partial attributes length */
-    private int attributesLength;
-
-    /** The list of all attributes length */
-    private List<Integer> attributeLength;
-
-    /** The list of all vals length */
-    private List<Integer> valsLength;
-
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
     /**
      * Creates a SearchResponseEntry as a reply to an SearchRequest to
      * indicate the end of a search operation.
@@ -167,28 +149,6 @@ public class SearchResultEntryImpl exten
 
 
     /**
-     * Gets the distinguished name bytes of the entry object returned.
-     * 
-     * @return the Dn bytes of the entry returned.
-     */
-    /*No qualifier*/byte[] getObjectNameBytes()
-    {
-        return objectNameBytes;
-    }
-
-
-    /**
-     * Sets the distinguished name bytes of the entry object returned.
-     * 
-     * @param objectNameBytes the Dn bytes of the entry returned.
-     */
-    /*No qualifier*/void setObjectNameBytes( byte[] objectNameBytes )
-    {
-        this.objectNameBytes = objectNameBytes;
-    }
-
-
-    /**
      * Sets the distinguished name of the entry object returned.
      * 
      * @param objectName the Dn of the entry returned.
@@ -251,81 +211,6 @@ public class SearchResultEntryImpl exten
 
 
     /**
-     * @return The encoded SearchResultEntry's length
-     */
-    /*No qualifier*/int getSearchResultEntryLength()
-    {
-        return searchResultEntryLength;
-    }
-
-
-    /**
-     * Stores the encoded length for the SearchResultEntry
-     * @param searchResultEntryLength The encoded length
-     */
-    /*No qualifier*/void setSearchResultEntryLength( int searchResultEntryLength )
-    {
-        this.searchResultEntryLength = searchResultEntryLength;
-    }
-
-
-    /**
-     * @return The encoded PartialAttributeList's length
-     */
-    /*No qualifier*/int getAttributesLength()
-    {
-        return attributesLength;
-    }
-
-
-    /**
-     * Stores the encoded length for the Attributes
-     * @param attributeLength The list of encoded lengths
-     */
-    /*No qualifier*/void setAttributesLength( int attributesLength )
-    {
-        this.attributesLength = attributesLength;
-    }
-
-
-    /**
-     * @return The encoded PartialAttributeList's length
-     */
-    /*No qualifier*/List<Integer> getAttributeLength()
-    {
-        return attributeLength;
-    }
-
-
-    /**
-     * @return The list of encoded Attributes' length
-     */
-    /*No qualifier*/void setAttributeLength( List<Integer> attributeLength )
-    {
-        this.attributeLength = attributeLength;
-    }
-
-
-    /**
-     * @return The list of encoded values' length
-     */
-    /*No qualifier*/List<Integer> getValsLength()
-    {
-        return valsLength;
-    }
-
-
-    /**
-     * Stores the list of encoded length for the values 
-     * @param valsLength The list of encoded lengths
-     */
-    /*No qualifier*/void setValsLength( List<Integer> valsLength )
-    {
-        this.valsLength = valsLength;
-    }
-
-
-    /**
      * Return a string representation of a SearchResultEntry request
      */
     public String toString()

Propchange: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImplTest.java
(from r1063063, directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImplTest.java?p2=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImplTest.java&p1=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java&r1=1063063&r2=1063131&rev=1063131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImplTest.java
Tue Jan 25 03:58:01 2011
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.shared.ldap.message;
+package org.apache.directory.shared.ldap.model.message;
 
 
 import static org.junit.Assert.assertFalse;
@@ -30,6 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -43,7 +44,7 @@ import org.junit.runner.RunWith;
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrent()
-public class SearchResponseEntryImplTest
+public class SearchResultEntryImplTest
 {
     /**
      * Creates and populates an EntryAttribute with a specific id.

Propchange: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResultEntryImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message