directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1156992 - in /directory/shared/trunk/ldap/extras: codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/ codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/
Date Fri, 12 Aug 2011 07:50:04 GMT
Author: elecharny
Date: Fri Aug 12 07:50:04 2011
New Revision: 1156992

URL: http://svn.apache.org/viewvc?rev=1156992&view=rev
Log:
o Added Javadoc
o Fixed some constant name

Modified:
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncModifyDnImpl.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnDecorator.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnGrammar.java

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncModifyDnImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncModifyDnImpl.java?rev=1156992&r1=1156991&r2=1156992&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncModifyDnImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncModifyDnImpl.java
Fri Aug 12 07:50:04 2011
@@ -42,6 +42,7 @@ public class SyncModifyDnImpl extends Ab
     /** flag to indicate whether to delete the old Rdn */
     private boolean deleteOldRdn = false;
 
+    /** The type of MODDN operation : MOVE, RENAME or MOVE_AND_RENAME */
     private SyncModifyDnType modDnType;
 
 
@@ -156,8 +157,6 @@ public class SyncModifyDnImpl extends Ab
     }
 
 
-
-
     /**
      * @see Object#hashCode()
      */

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnDecorator.java?rev=1156992&r1=1156991&r2=1156992&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnDecorator.java
Fri Aug 12 07:50:04 2011
@@ -31,8 +31,8 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.api.LdapApiService;
 import org.apache.directory.shared.ldap.codec.api.ControlDecorator;
+import org.apache.directory.shared.ldap.codec.api.LdapApiService;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDnImpl;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDnType;
@@ -55,6 +55,7 @@ public class SyncModifyDnDecorator exten
     /** global length for the control */
     private int syncModDnSeqLength;
 
+    /** Length for the encoded elements */
     private int renameLen = 0;
     private int moveAndRenameLen = 0;
 
@@ -62,12 +63,21 @@ public class SyncModifyDnDecorator exten
     private Asn1Decoder decoder = new Asn1Decoder();
 
 
+    /**
+     * Creates a new instance of SyncModifyDnDecorator
+     * @param codec The codec to use
+     */
     public SyncModifyDnDecorator( LdapApiService codec )
     {
         super( codec, new SyncModifyDnImpl() );
     }
 
 
+    /**
+     * Creates a new instance of SyncModifyDnDecorator
+     * @param codec The codec to use
+     * @param type The type of MODDN opertaion
+     */
     public SyncModifyDnDecorator( LdapApiService codec, SyncModifyDnType type )
     {
         this( codec );
@@ -75,6 +85,11 @@ public class SyncModifyDnDecorator exten
     }
 
 
+    /**
+     * Creates a new instance of SyncModifyDnDecorator
+     * @param codec The codec to use
+     * @param control The MODDN control
+     */
     public SyncModifyDnDecorator( LdapApiService codec, SyncModifyDn control )
     {
         super( codec, control );
@@ -118,7 +133,7 @@ public class SyncModifyDnDecorator exten
                 syncModDnSeqLength += 1 + TLV.getNbBytes( renameLen ) + renameLen;
                 break;
 
-            case MOVEANDRENAME:
+            case MOVE_AND_RENAME:
                 moveAndRenameLen = 1 + TLV.getNbBytes( newSuperiorDn.length() ) + newSuperiorDn.length();
                 moveAndRenameLen += 1 + TLV.getNbBytes( newRdn.length() ) + newRdn.length();
                 // deleteOldRdn
@@ -175,7 +190,7 @@ public class SyncModifyDnDecorator exten
                 Value.encode( buffer, getDecorated().isDeleteOldRdn() );
                 break;
 
-            case MOVEANDRENAME:
+            case MOVE_AND_RENAME:
                 buffer.put( ( byte ) SyncModifyDnTags.MOVEANDRENAME_TAG.getValue() );
                 buffer.put( TLV.getBytes( moveAndRenameLen ) );
                 Value.encode( buffer, newSuperiorDn );
@@ -227,7 +242,7 @@ public class SyncModifyDnDecorator exten
                         Value.encode( buffer, getDecorated().isDeleteOldRdn() );
                         break;
 
-                    case MOVEANDRENAME:
+                    case MOVE_AND_RENAME:
                         buffer.put( ( byte ) SyncModifyDnTags.MOVEANDRENAME_TAG.getValue()
);
                         buffer.put( TLV.getBytes( moveAndRenameLen ) );
                         Value.encode( buffer, newSuperiorDn );

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnGrammar.java?rev=1156992&r1=1156991&r2=1156992&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnGrammar.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnGrammar.java
Fri Aug 12 07:50:04 2011
@@ -264,7 +264,7 @@ public final class SyncModifyDnGrammar e
             {
                 public void action( SyncModifyDnContainer container ) throws DecoderException
                 {
-                    container.getSyncModifyDnControl().setModDnType( SyncModifyDnType.MOVEANDRENAME
);
+                    container.getSyncModifyDnControl().setModDnType( SyncModifyDnType.MOVE_AND_RENAME
);
                     container.setGrammarEndAllowed( false );
                 }
             } );



Mime
View raw message