directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r940986 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap: codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java message/control/replication/SyncStateTypeEnum.java
Date Tue, 04 May 2010 18:00:09 GMT
Author: kayyagari
Date: Tue May  4 18:00:09 2010
New Revision: 940986

URL: http://svn.apache.org/viewvc?rev=940986&view=rev
Log:
o added constants to support  move,rename and moveAndRename operations
o updated the integer parsing limits

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncStateTypeEnum.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java?rev=940986&r1=940985&r2=940986&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
Tue May  4 18:00:09 2010
@@ -119,7 +119,7 @@ public class SyncStateValueControlGramma
                     {
                         // Check that the value is into the allowed interval
                         int syncStateType = IntegerDecoder.parse( value, SyncStateTypeEnum.PRESENT.getValue(),
-                            SyncStateTypeEnum.DELETE.getValue() );
+                            SyncStateTypeEnum.MOVEANDRENAME.getValue() );
 
                         SyncStateTypeEnum syncStateTypeEnum = SyncStateTypeEnum.getSyncStateType(
syncStateType );
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncStateTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncStateTypeEnum.java?rev=940986&r1=940985&r2=940986&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncStateTypeEnum.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncStateTypeEnum.java
Tue May  4 18:00:09 2010
@@ -30,7 +30,12 @@ import org.apache.directory.shared.i18n.
  *            present (0),
  *            add (1),
  *            modify (2),
- *            delete (3)
+ *            delete (3),
+ *            
+ *            #includes the below ApacheDS specific values
+ *            move(4),
+ *            rename(5),
+ *            moveAndRename(6)
  *   }
  *   
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -38,7 +43,7 @@ import org.apache.directory.shared.i18n.
  */
 public enum SyncStateTypeEnum
 {
-    PRESENT(0), ADD(1), MODIFY(2), DELETE(3);
+    PRESENT(0), ADD(1), MODIFY(2), DELETE(3), MOVE(4), RENAME(5), MOVEANDRENAME(6);
 
     /** the internal value */
     private int value;
@@ -89,7 +94,19 @@ public enum SyncStateTypeEnum
         {
             return DELETE;
         }
-
+        else if ( value == MOVE.value )
+        {
+            return MOVE;
+        }
+        else if ( value == RENAME.value )
+        {
+            return RENAME;
+        }
+        else if ( value == MOVEANDRENAME.value )
+        {
+            return MOVEANDRENAME;
+        }
+        
         throw new IllegalArgumentException( I18n.err( I18n.ERR_04163, value ) );
     }
 



Mime
View raw message