directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063968 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch: PagedResults.java PagedResultsDecorator.java SimplePagedResults.java
Date Thu, 27 Jan 2011 02:57:59 GMT
Author: akarasulu
Date: Thu Jan 27 02:57:59 2011
New Revision: 1063968

URL: http://svn.apache.org/viewvc?rev=1063968&view=rev
Log:
extracting interface for PagedResults control

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/SimplePagedResults.java
  (contents, props changed)
      - copied, changed from r1063947, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResults.java
Removed:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResults.java
Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsDecorator.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsDecorator.java?rev=1063968&r1=1063967&r2=1063968&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsDecorator.java
Thu Jan 27 02:57:59 2011
@@ -34,7 +34,7 @@ import org.apache.directory.shared.util.
 
 
 /**
- * A codec decorator for the {@link PagedResults}.
+ * A codec decorator for the {@link SimplePagedResults}.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -58,7 +58,7 @@ public class PagedResultsDecorator exten
      */
     public PagedResultsDecorator()
     {
-        super( new PagedResults(), new PagedResultsDecoder() );
+        super( new SimplePagedResults(), new PagedResultsDecoder() );
         cookie = StringConstants.EMPTY_BYTES;
     }
 

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/SimplePagedResults.java
(from r1063947, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResults.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/SimplePagedResults.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/SimplePagedResults.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResults.java&r1=1063947&r2=1063968&rev=1063968&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResults.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/SimplePagedResults.java
Thu Jan 27 02:57:59 2011
@@ -58,10 +58,8 @@ import java.util.Arrays;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PagedResults extends BasicControlImpl
+public class SimplePagedResults extends BasicControlImpl implements PagedResults
 {
-    /** The Paged Search Control OID */
-    public static final String OID = "1.2.840.113556.1.4.319";
 
     /** The number of entries to return, or returned */
     private int size;
@@ -71,11 +69,9 @@ public class PagedResults extends BasicC
 
 
     /**
-     *
      * Creates a new instance of PagedResultsDecorator.
-     *
      */
-    public PagedResults()
+    public SimplePagedResults()
     {
         super( OID );
 
@@ -83,49 +79,30 @@ public class PagedResults extends BasicC
     }
 
 
-    /**
-     * @return The requested or returned number of entries
-     */
     public int getSize()
     {
         return size;
     }
 
 
-    /**
-     * Set the number of entry requested or returned
-     *
-     * @param size The number of entries 
-     */
     public void setSize( int size )
     {
         this.size = size;
     }
 
 
-    /**
-     * @return The stored cookie
-     */
     public byte[] getCookie()
     {
         return cookie;
     }
 
 
-    /**
-     * Set the cookie
-     *
-     * @param cookie The cookie to store in this control
-     */
     public void setCookie( byte[] cookie )
     {
         this.cookie = cookie;
     }
 
 
-    /**
-     * @return The integer value for the current cookie
-     */
     public int getCookieValue()
     {
         int value = 0;
@@ -165,7 +142,7 @@ public class PagedResults extends BasicC
             return false;
         }
 
-        PagedResults otherControl = ( PagedResults ) o;
+        SimplePagedResults otherControl = ( SimplePagedResults ) o;
 
         return ( size == otherControl.size ) && Arrays.equals( cookie, otherControl.cookie
);
     }

Propchange: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/SimplePagedResults.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message