directory-commits mailing list archives

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

URL: http://svn.apache.org/viewcvs?rev=208983&view=rev
Log:
Added the ExtendedRequest 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=208983&r1=208982&r2=208983&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 14:42:06 2005
@@ -879,6 +879,33 @@
     public static int LAST_COMPARE_REQUEST_STATE = 10;
 
     //=========================================================================
+    // Extended Request grammar states 
+    //=========================================================================
+    // Extended Request -------------------------------------------------------
+    /** Extended Tag */
+    public static int EXTENDED_REQUEST_TAG = 0;
+    
+    /** Extended Value */
+    public static int EXTENDED_REQUEST_VALUE = 1;
+    
+    // Name -------------------------------------------------------------------
+    /** Name Tag */
+    public static int EXTENDED_REQUEST_NAME_TAG = 2;
+    
+    /** Name Value */
+    public static int EXTENDED_REQUEST_NAME_VALUE = 3;
+    
+    // Value ------------------------------------------------------------------
+    /** Value Tag */
+    public static int EXTENDED_REQUEST_VALUE_TAG = 4;
+    
+    /** Value Value */
+    public static int EXTENDED_REQUEST_VALUE_VALUE = 5;
+    
+    /** The last state */
+    public static int LAST_EXTENDED_REQUEST_STATE = 6;
+    
+    //=========================================================================
     // Grammars declaration.
     //=========================================================================
     /** Ldap Message Grammar */
@@ -1013,6 +1040,12 @@
     /** CompareRequest number */
     public static final int COMPARE_REQUEST_GRAMMAR = 21;
     
+    /** ExtendedRequest Grammar */
+    public static final int EXTENDED_REQUEST_GRAMMAR_SWITCH = 0x1700;
+
+    /** ExtendedRequest number */
+    public static final int EXTENDED_REQUEST_GRAMMAR = 22;
+    
     /** The total number of grammars used */
     public static final int NB_GRAMMARS = 25;
 
@@ -1044,7 +1077,8 @@
             "ADD_REQUEST_GRAMMAR_SWITCH",
             "MODIFY_DN_REQUEST_GRAMMAR_SWITCH",
             "DEL_REQUEST_GRAMMAR_SWITCH",
-            "COMPARE_REQUEST_GRAMMAR_SWITCH"
+            "COMPARE_REQUEST_GRAMMAR_SWITCH",
+            "EXTENDED_REQUEST_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -1391,6 +1425,18 @@
 		    "COMPARE_REQUEST_ASSERTION_VALUE_VALUE"
         };
 
+    /** A string representation of all the extended request states */
+    private static String[] ExtendedRequestString =
+        new String[]
+        {
+		    "EXTENDED_REQUEST_TAG",
+		    "EXTENDED_REQUEST_VALUE",
+		    "EXTENDED_REQUEST_NAME_TAG",
+		    "EXTENDED_REQUEST_NAME_VALUE",
+		    "EXTENDED_REQUEST_VALUE_TAG",
+		    "EXTENDED_REQUEST_VALUE_VALUE"
+        };
+
     /** The instance */
     private static LdapStatesEnum instance = new LdapStatesEnum();
 
@@ -1446,6 +1492,7 @@
             case MODIFY_DN_REQUEST_GRAMMAR       : return "MODIFY_DN_REQUEST_GRAMMAR";
             case DEL_REQUEST_GRAMMAR             : return "DEL_REQUEST_GRAMMAR";
             case COMPARE_REQUEST_GRAMMAR         : return "COMPARE_REQUEST_GRAMMAR";
+            case EXTENDED_REQUEST_GRAMMAR        : return "EXTENDED_REQUEST_GRAMMAR";
 
         	default                              : return "UNKNOWN";
         }
@@ -1546,6 +1593,10 @@
         {
             return "COMPARE_REQUEST_GRAMMAR";
         }
+        else if (grammar instanceof ExtendedRequestGrammar)
+        {
+            return "EXTENDED_REQUEST_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -1638,6 +1689,9 @@
                                         
                 case COMPARE_REQUEST_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "COMPARE_REQUEST_END_STATE" : CompareRequestString[state]
);
+                                        
+                case EXTENDED_REQUEST_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "EXTENDED_REQUEST_END_STATE" : ExtendedRequestString[state]
);
                                         
                 default :
                     return "UNKNOWN";



Mime
View raw message