directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208923 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Date Sun, 03 Jul 2005 14:59:23 GMT
Author: elecharny
Date: Sun Jul  3 07:59:23 2005
New Revision: 208923

URL: http://svn.apache.org/viewcvs?rev=208923&view=rev
Log:
Added the ModifyDNRequest states

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java?rev=208923&r1=208922&r2=208923&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Sun Jul  3 07:59:23 2005
@@ -784,11 +784,52 @@
     public static int LAST_ADD_REQUEST_STATE = 13;
 
     //=========================================================================
+    // Modify DN Request grammar states 
+    //=========================================================================
+    // Modify DN Request ------------------------------------------------------
+    /** Modify DN Tag */
+    public static int MODIFY_DN_REQUEST_TAG = 0;
+
+    /** Modify DN Value */
+    public static int MODIFY_DN_REQUEST_VALUE = 1;
+
+    // entry ------------------------------------------------------------------
+    /** Entry Tag */
+    public static int MODIFY_DN_REQUEST_ENTRY_TAG = 2;
+
+    /** Entry Value */
+    public static int MODIFY_DN_REQUEST_ENTRY_VALUE = 3;
+
+    // New RDN ----------------------------------------------------------------
+    /** New RDN Tag */
+    public static int MODIFY_DN_REQUEST_NEW_RDN_TAG = 4;
+
+    /** Enw RDN Value */
+    public static int MODIFY_DN_REQUEST_NEW_RDN_VALUE = 5;
+    
+    // Delete old RDN ---------------------------------------------------------
+    /** Delete old RDN Tag */
+    public static int MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG = 6;
+
+    /** Delete old RDN Value */
+    public static int MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE = 7;
+    
+    // New superior -----------------------------------------------------------
+    /** New superior Tag */
+    public static int MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG = 8;
+
+    /** New superior Value */
+    public static int MODIFY_DN_REQUEST_NEW_SUPERIOR_VALUE = 9;
+    
+    /** The last state */
+    public static int LAST_MODIFY_DN_REQUEST_STATE = 10;
+
+    //=========================================================================
     // Filter substring grammar states 
     //=========================================================================
 
     /** The last state */
-    public static int LAST_FILTER_SUBSTRINGS_STATE = 16;
+    //public static int LAST_FILTER_SUBSTRINGS_STATE = 16;
 
     //=========================================================================
     // Grammars declaration.
@@ -907,6 +948,11 @@
     /** AddRequest number */
     public static final int ADD_REQUEST_GRAMMAR = 18;
     
+    /** ModifyDNRequest Grammar */
+    public static final int MODIFY_DN_REQUEST_GRAMMAR_SWITCH = 0x1400;
+
+    /** ModifyDNRequest number */
+    public static final int MODIFY_DN_REQUEST_GRAMMAR = 19;
     
     /** The total number of grammars used */
     public static final int NB_GRAMMARS = 20;
@@ -936,7 +982,8 @@
             "SEARCH_RESULT_ENTRY_GRAMMAR_SWITCH",
             "MODIFY_REQUEST_GRAMMAR_SWITCH",
             "SEARCH_RESULT_REFERENCE_GRAMMAR_SWITCH",
-            "ADD_REQUEST_GRAMMAR_SWITCH"
+            "ADD_REQUEST_GRAMMAR_SWITCH",
+            "MODIFY_DN_REQUEST_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -1246,6 +1293,22 @@
                 "ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END"
         };
     
+    /** A string representation of all the ModifyDN request states */
+    private static String[] ModifyDNRequestString =
+        new String[]
+        {
+			    "MODIFY_DN_REQUEST_TAG",
+			    "MODIFY_DN_REQUEST_VALUE",
+			    "MODIFY_DN_REQUEST_ENTRY_TAG",
+			    "MODIFY_DN_REQUEST_ENTRY_VALUE",
+			    "MODIFY_DN_REQUEST_NEW_RDN_TAG",
+			    "MODIFY_DN_REQUEST_NEW_RDN_VALUE",
+			    "MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG",
+			    "MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE",
+			    "MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG",
+			    "MODIFY_DN_REQUEST_NEW_SUPERIOR_VALUE"
+        };
+
     /** The instance */
     private static LdapStatesEnum instance = new LdapStatesEnum();
 
@@ -1298,6 +1361,8 @@
             case MODIFY_REQUEST_GRAMMAR          : return "MODIFY_REQUEST_GRAMMAR";
             case SEARCH_RESULT_REFERENCE_GRAMMAR : return "SEARCH_RESULT_REFERENCE_GRAMMAR";
             case ADD_REQUEST_GRAMMAR             : return "ADD_REQUEST_GRAMMAR";
+            case MODIFY_DN_REQUEST_GRAMMAR       : return "MODIFY_DN_REQUEST_GRAMMAR";
+
         	default                              : return "UNKNOWN";
         }
     }
@@ -1385,6 +1450,10 @@
         {
             return "ADD_REQUEST_GRAMMAR";
         }
+        else if (grammar instanceof ModifyDNRequestGrammar)
+        {
+            return "MODIFY_DN_REQUEST_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -1468,7 +1537,10 @@
                     
                 case ADD_REQUEST_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "ADD_REQUEST_END_STATE" : AddRequestString[state]
);
-                    
+
+                case MODIFY_DN_REQUEST_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "MODIFY_DN_REQUEST_END_STATE" : ModifyDNRequestString[state]
);
+                                        
                 default :
                     return "UNKNOWN";
             }



Mime
View raw message