directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1587922 - in /directory/shared/trunk/ldap/extras: codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/ codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/ codec/src/test/java/org/apache/directory/api/...
Date Wed, 16 Apr 2014 14:28:08 GMT
Author: elecharny
Date: Wed Apr 16 14:28:07 2014
New Revision: 1587922

URL: http://svn.apache.org/r1587922
Log:
Renamed the maxAttributeCount by maxRetrunLength

Modified:
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSync.java
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncDecorator.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncGrammar.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncStatesEnum.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncControlTest.java

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSync.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSync.java?rev=1587922&r1=1587921&r2=1587922&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSync.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSync.java
Wed Apr 16 14:28:07 2014
@@ -35,7 +35,7 @@ import org.apache.directory.api.ldap.mod
  * 
  * realReplControlValue ::= SEQUENCE {
  *     parentsFirst            integer
- *     maxAttributeCount       integer
+ *     maxReturnLength         integer
  *     cookie                  OCTET STRING
  * }
  * </pre> 
@@ -45,7 +45,6 @@ import org.apache.directory.api.ldap.mod
  */
 public interface AdDirSync extends Control
 {
-
     /** This control OID */
     static final String OID = "1.3.6.1.4.1.4203.1.9.1.3";
     
@@ -62,15 +61,15 @@ public interface AdDirSync extends Contr
     
     
     /**
-     * @return The maximum number of attributes to be returned
+     * @return The maximum length of attributes to be returned
      */
-    int getMaxAttributeCount();
+    int getMaxReturnLength();
     
     
     /**
-     * @param maxAttributeCount The maximum number of attributes to be returned
+     * @param maxReturnLength The maximum length of attributes to be returned
      */
-    void setMaxAttributeCount( int maxAttributeCount );
+    void setMaxReturnLength( int maxReturnLength );
     
     
     /**

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java?rev=1587922&r1=1587921&r2=1587922&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
Wed Apr 16 14:28:07 2014
@@ -35,7 +35,7 @@ public class AdDirSyncImpl extends Abstr
     int parentFirst = 1;
     
     /** The maximum number of attributes to return */
-    int maxAttributeCount = 0;
+    int maxReturnLength = 0;
     
     /** The DirSync cookie */
     private byte[] cookie;
@@ -70,18 +70,18 @@ public class AdDirSyncImpl extends Abstr
     /**
      * {@inheritDoc}
      */
-    public int getMaxAttributeCount()
+    public int getMaxReturnLength()
     {
-        return maxAttributeCount;
+        return maxReturnLength;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setMaxAttributeCount( int maxAttributeCount )
+    public void setMaxReturnLength( int maxReturnLength )
     {
-        this.maxAttributeCount = maxAttributeCount;
+        this.maxReturnLength = maxReturnLength;
     }
 
 
@@ -113,7 +113,7 @@ public class AdDirSyncImpl extends Abstr
 
         h = h * 17 + super.hashCode();
         h = h * 17 + parentFirst;
-        h = h * 17 + maxAttributeCount;
+        h = h * 17 + maxReturnLength;
 
         if ( cookie != null )
         {
@@ -145,7 +145,7 @@ public class AdDirSyncImpl extends Abstr
 
         AdDirSync otherControl = ( AdDirSync ) o;
 
-        return ( maxAttributeCount == otherControl.getMaxAttributeCount() ) &&
+        return ( maxReturnLength == otherControl.getMaxReturnLength() ) &&
             ( parentFirst == otherControl.getParentFirst() ) &&
             ( Arrays.equals( cookie, otherControl.getCookie() ) &&
             ( isCritical() == otherControl.isCritical() ) );
@@ -164,7 +164,7 @@ public class AdDirSyncImpl extends Abstr
         sb.append( "        oid : " ).append( getOid() ).append( '\n' );
         sb.append( "        critical : " ).append( isCritical() ).append( '\n' );
         sb.append( "        parentFirst : '" ).append( getParentFirst() ).append( "'\n" );
-        sb.append( "        maxAttributeCount : '" ).append( getMaxAttributeCount() ).append(
"'\n" );
+        sb.append( "        maxReturnLength : '" ).append( getMaxReturnLength() ).append(
"'\n" );
         sb.append( "        cookie            : '" ).append( Strings.dumpBytes( getCookie()
) ).append( "'\n" );
 
         return sb.toString();

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncDecorator.java?rev=1587922&r1=1587921&r2=1587922&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncDecorator.java
Wed Apr 16 14:28:07 2014
@@ -68,7 +68,7 @@ public class AdDirSyncDecorator extends 
      * 0x30 L1
      * |
      * +--> 0x02 0x0(1-4) nnn  (parentFirst)
-     * +--> 0x02 0x0(1-4) nnn  (maxAttributeCount)
+     * +--> 0x02 0x0(1-4) nnn  (maxReturnLength)
      * +--> 0x04 L2 xkcd!!!...     (cookie)
      */
     @Override
@@ -77,8 +77,8 @@ public class AdDirSyncDecorator extends 
         // the parentFirst flag length
         adDirSyncLength = 1 + TLV.getNbBytes( getParentFirst() ) + BerValue.getNbBytes( getParentFirst()
);
 
-        // the maxAttributeCount length
-        adDirSyncLength += 1 + TLV.getNbBytes( getMaxAttributeCount() ) + BerValue.getNbBytes(
getMaxAttributeCount() );
+        // the maxReturnLength length
+        adDirSyncLength += 1 + TLV.getNbBytes( getMaxReturnLength() ) + BerValue.getNbBytes(
getMaxReturnLength() );
 
         // cookie's length
         byte[] cookie = getCookie();
@@ -121,8 +121,8 @@ public class AdDirSyncDecorator extends 
         // Encode the ParentFirst flag
         BerValue.encode( buffer, getParentFirst() );
 
-        // Encode the MaxAttributeCount
-        BerValue.encode( buffer, getMaxAttributeCount() );
+        // Encode the MaxReturnLength
+        BerValue.encode( buffer, getMaxReturnLength() );
         
         // Encode the cookie
         BerValue.encode( buffer, getCookie() );
@@ -151,8 +151,8 @@ public class AdDirSyncDecorator extends 
                 // Encode the ParentFirst flag
                 BerValue.encode( buffer, getParentFirst() );
 
-                // Encode the MaxAttributeCount
-                BerValue.encode( buffer, getMaxAttributeCount() );
+                // Encode the MaxReturnLength
+                BerValue.encode( buffer, getMaxReturnLength() );
                 
                 // Encode the cookie
                 BerValue.encode( buffer, getCookie() );
@@ -190,18 +190,18 @@ public class AdDirSyncDecorator extends 
     /**
      * {@inheritDoc}
      */
-    public int getMaxAttributeCount()
+    public int getMaxReturnLength()
     {
-        return getDecorated().getMaxAttributeCount();
+        return getDecorated().getMaxReturnLength();
     }
 
     
     /**
      * {@inheritDoc}
      */
-    public void setMaxAttributeCount( int maxAttributeCount )
+    public void setMaxReturnLength( int maxReturnLength )
     {
-        getDecorated().setMaxAttributeCount( maxAttributeCount );
+        getDecorated().setMaxReturnLength( maxReturnLength );
     }
     
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncGrammar.java?rev=1587922&r1=1587921&r2=1587922&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncGrammar.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncGrammar.java
Wed Apr 16 14:28:07 2014
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
  *  <pre>
  * realReplControlValue ::= SEQUENCE {
  *     parentsFirst            integer
- *     maxAttributeCount       integer
+ *     maxReturnLength       integer
  *     cookie                  OCTET STRING
  * }
  * </pre> 
@@ -133,18 +133,18 @@ public final class AdDirSyncGrammar exte
 
         
         /**
-         * transition from parentFirst to maxAttributeCount
+         * transition from parentFirst to maxReturnLength
          * realReplControlValue ::= SEQUENCE {
          *     parentsFirst            integer
-         *     maxAttributeCount       integer
+         *     maxReturnLength         integer
          *    ....
          * }
          */
         super.transitions[AdDirSyncStatesEnum.PARENT_FIRST_STATE.ordinal()][UniversalTag.INTEGER
             .getValue()] =
             new GrammarTransition<AdDirSyncContainer>( AdDirSyncStatesEnum.PARENT_FIRST_STATE,
-                AdDirSyncStatesEnum.MAX_ATTRIBUTE_COUNT_STATE, UniversalTag.INTEGER.getValue(),
-                new GrammarAction<AdDirSyncContainer>( "Set AdDirSyncControl maxAttributeCount"
)
+                AdDirSyncStatesEnum.MAX_RETURN_LENGTH_STATE, UniversalTag.INTEGER.getValue(),
+                new GrammarAction<AdDirSyncContainer>( "Set AdDirSyncControl maxReturnLength"
)
                 {
                     public void action( AdDirSyncContainer container ) throws DecoderException
                     {
@@ -152,18 +152,18 @@ public final class AdDirSyncGrammar exte
 
                         try
                         {
-                            int maxAttributeCount = IntegerDecoder.parse( value );
+                            int maxReturnLength = IntegerDecoder.parse( value );
                             
                             if ( IS_DEBUG )
                             {
-                                LOG.debug( "maxAttributeCount = {}", maxAttributeCount );
+                                LOG.debug( "maxReturnLength = {}", maxReturnLength );
                             }
                             
-                            container.getAdDirSyncControl().setMaxAttributeCount( maxAttributeCount
);
+                            container.getAdDirSyncControl().setMaxReturnLength( maxReturnLength
);
                         }
                         catch ( IntegerDecoderException ide )
                         {
-                            String msg = "Error while decoding the AdDirSync maxAttributeCount
: " + ide.getMessage();
+                            String msg = "Error while decoding the AdDirSync maxReturnLength
: " + ide.getMessage();
                             LOG.error( msg, ide );
                             throw new DecoderException( msg );
                         }
@@ -172,13 +172,13 @@ public final class AdDirSyncGrammar exte
         
         
         /**
-         * transition from maxAttributeCount to cookie
+         * transition from maxReturnLength to cookie
          *     ...
-         *     maxAttributeCount       integer
+         *     maxReturnLength         integer
          *     cookie                  OCTET STRING
          * }
          */
-        super.transitions[AdDirSyncStatesEnum.MAX_ATTRIBUTE_COUNT_STATE.ordinal()][UniversalTag.OCTET_STRING
+        super.transitions[AdDirSyncStatesEnum.MAX_RETURN_LENGTH_STATE.ordinal()][UniversalTag.OCTET_STRING
             .getValue()] =
             new GrammarTransition<AdDirSyncContainer>( AdDirSyncStatesEnum.AD_DIR_SYNC_SEQUENCE_STATE,
                 AdDirSyncStatesEnum.COOKIE_STATE, UniversalTag.OCTET_STRING.getValue(),

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncStatesEnum.java?rev=1587922&r1=1587921&r2=1587922&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncStatesEnum.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncStatesEnum.java
Wed Apr 16 14:28:07 2014
@@ -44,8 +44,8 @@ public enum AdDirSyncStatesEnum implemen
     /** parentFirst value state */
     PARENT_FIRST_STATE,
 
-    /** maxAttributeCount value state */
-    MAX_ATTRIBUTE_COUNT_STATE,
+    /** maxReturnLength value state */
+    MAX_RETURN_LENGTH_STATE,
 
     /** cookie value state */
     COOKIE_STATE,

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncControlTest.java?rev=1587922&r1=1587921&r2=1587922&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncControlTest.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncControlTest.java
Wed Apr 16 14:28:07 2014
@@ -55,7 +55,7 @@ public class AdDirSyncControlTest extend
             {
                 0x30, 0x0C,
                   0x02, 0x01, 0x00,  // parentFirst (false)
-                  0x02, 0x01, 0x00,  // maxAttributeCount (no limit)
+                  0x02, 0x01, 0x00,  // maxReturnLength (no limit)
                   0x04, 0x04, 'x', 'k', 'c', 'd' // the cookie 
         } );
 
@@ -66,7 +66,7 @@ public class AdDirSyncControlTest extend
         AdDirSync adDirSync = ( AdDirSync ) ( ( AdDirSyncDecorator ) decorator ).decode(
bb.array() );
 
         assertEquals( 0, adDirSync.getParentFirst() );
-        assertEquals( 0, adDirSync.getMaxAttributeCount() );
+        assertEquals( 0, adDirSync.getMaxReturnLength() );
         assertEquals( "xkcd", Strings.utf8ToString( adDirSync.getCookie() ) );
 
         // test encoding
@@ -94,7 +94,7 @@ public class AdDirSyncControlTest extend
             {
                 0x30, 0x08,
                   0x02, 0x01, 0x00,  // parentFirst (false)
-                  0x02, 0x01, 0x00,  // maxAttributeCount (no limit)
+                  0x02, 0x01, 0x00,  // maxReturnLength (no limit)
                   0x04, 0x00         // the cookie 
         } );
 
@@ -105,7 +105,7 @@ public class AdDirSyncControlTest extend
         AdDirSync adDirSync = ( AdDirSync ) ( ( AdDirSyncDecorator ) decorator ).decode(
bb.array() );
 
         assertEquals( 0, adDirSync.getParentFirst() );
-        assertEquals( 0, adDirSync.getMaxAttributeCount() );
+        assertEquals( 0, adDirSync.getMaxReturnLength() );
         assertEquals( "", Strings.utf8ToString( adDirSync.getCookie() ) );
 
         // test encoding
@@ -133,7 +133,7 @@ public class AdDirSyncControlTest extend
             {
                 0x30, 0x06,
                   0x02, 0x01, 0x00,  // parentFirst (false)
-                  0x02, 0x01, 0x00   // maxAttributeCount (no limit)
+                  0x02, 0x01, 0x00   // maxReturnLength (no limit)
         } );
 
         bb.flip();
@@ -160,7 +160,7 @@ public class AdDirSyncControlTest extend
         bb.put( new byte[]
             {
                 0x30, 0x05,
-                  0x02, 0x01, 0x00,  // maxAttributeCount (no limit)
+                  0x02, 0x01, 0x00,  // maxReturnLength (no limit)
                   0x04, 0x00         // cookie
         } );
 



Mime
View raw message