directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208941 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Date Sun, 03 Jul 2005 16:08:12 GMT
Author: elecharny
Date: Sun Jul  3 09:08:11 2005
New Revision: 208941

URL: http://svn.apache.org/viewcvs?rev=208941&view=rev
Log:
Added the DelRequest 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=208941&r1=208940&r2=208941&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 09:08:11 2005
@@ -825,11 +825,17 @@
     public static int LAST_MODIFY_DN_REQUEST_STATE = 10;
 
     //=========================================================================
-    // Filter substring grammar states 
+    // Del Request grammar states 
     //=========================================================================
+    // Del Request ------------------------------------------------------------
+    /** Del Tag */
+    public static int DEL_REQUEST_TAG = 0;
+
+    /** Del Value */
+    public static int DEL_REQUEST_VALUE = 1;
 
     /** The last state */
-    //public static int LAST_FILTER_SUBSTRINGS_STATE = 16;
+    public static int LAST_DEL_REQUEST_STATE = 2;
 
     //=========================================================================
     // Grammars declaration.
@@ -954,8 +960,14 @@
     /** ModifyDNRequest number */
     public static final int MODIFY_DN_REQUEST_GRAMMAR = 19;
     
+    /** DelRequest Grammar */
+    public static final int DEL_REQUEST_GRAMMAR_SWITCH = 0x1500;
+
+    /** DelRequest number */
+    public static final int DEL_REQUEST_GRAMMAR = 20;
+    
     /** The total number of grammars used */
-    public static final int NB_GRAMMARS = 20;
+    public static final int NB_GRAMMARS = 25;
 
     //=========================================================================
     // Grammar switches debug strings 
@@ -983,7 +995,8 @@
             "MODIFY_REQUEST_GRAMMAR_SWITCH",
             "SEARCH_RESULT_REFERENCE_GRAMMAR_SWITCH",
             "ADD_REQUEST_GRAMMAR_SWITCH",
-            "MODIFY_DN_REQUEST_GRAMMAR_SWITCH"
+            "MODIFY_DN_REQUEST_GRAMMAR_SWITCH",
+            "DEL_REQUEST_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -1309,6 +1322,14 @@
 			    "MODIFY_DN_REQUEST_NEW_SUPERIOR_VALUE"
         };
 
+    /** A string representation of all the delete request states */
+    private static String[] DelRequestString =
+        new String[]
+        {
+			    "DEL_REQUEST_TAG",
+			    "DEL_REQUEST_VALUE"
+        };
+
     /** The instance */
     private static LdapStatesEnum instance = new LdapStatesEnum();
 
@@ -1362,6 +1383,7 @@
             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";
+            case DEL_REQUEST_GRAMMAR             : return "DEL_REQUEST_GRAMMAR";
 
         	default                              : return "UNKNOWN";
         }
@@ -1454,6 +1476,10 @@
         {
             return "MODIFY_DN_REQUEST_GRAMMAR";
         }
+        else if (grammar instanceof DelRequestGrammar)
+        {
+            return "DEL_REQUEST_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -1540,6 +1566,9 @@
 
                 case MODIFY_DN_REQUEST_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "MODIFY_DN_REQUEST_END_STATE" : ModifyDNRequestString[state]
);
+                                        
+                case DEL_REQUEST_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "DEL_REQUEST_END_STATE" : DelRequestString[state]
);
                                         
                 default :
                     return "UNKNOWN";



Mime
View raw message