directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208914 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Date Sun, 03 Jul 2005 12:33:18 GMT
Author: elecharny
Date: Sun Jul  3 05:33:17 2005
New Revision: 208914

URL: http://svn.apache.org/viewcvs?rev=208914&view=rev
Log:
Added the AddRequest 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=208914&r1=208913&r2=208914&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 05:33:17 2005
@@ -726,6 +726,64 @@
     public static int LAST_SEARCH_RESULT_REFERENCE_STATE_STATE = 5;
 
     //=========================================================================
+    // Add Request grammar states 
+    //=========================================================================
+    // Add Request ------------------------------------------------------------
+    /** Add Request Tag */
+    public static int ADD_REQUEST_TAG = 0;
+
+    /** Add Request Value */
+    public static int ADD_REQUEST_VALUE = 1;
+
+    // entry ------------------------------------------------------------------
+    /** Entry Tag */
+    public static int ADD_REQUEST_ENTRY_TAG = 2;
+
+    /** Entry Value */
+    public static int ADD_REQUEST_ENTRY_VALUE = 3;
+
+    // Attributes -------------------------------------------------------------
+    /** Attributes Tag */
+    public static int ADD_REQUEST_ATTRIBUTES_TAG = 4;
+
+    /** Attributes Value */
+    public static int ADD_REQUEST_ATTRIBUTES_VALUE = 5;
+    
+    // Attribute -------------------------------------------------------------è
+    /** Attribute Tag */
+    public static int ADD_REQUEST_ATTRIBUTE_TAG = 6;
+
+    /** Attribute Value */
+    public static int ADD_REQUEST_ATTRIBUTE_VALUE = 7;
+    
+    // Attribute type ---------------------------------------------------------
+    /** Attribute type Tag */
+    public static int ADD_REQUEST_ATTRIBUTES_TYPE_TAG = 8;
+
+    /** Attribute type Value */
+    public static int ADD_REQUEST_ATTRIBUTES_TYPE_VALUE = 9;
+    
+    // Attribute vals ---------------------------------------------------------
+    /** Attribute vals Tag */
+    public static int ADD_REQUEST_ATTRIBUTES_VALS_TAG = 10;
+
+    /** Attribute vals Value */
+    public static int ADD_REQUEST_ATTRIBUTES_VALS_VALUE = 11;
+    
+    // Attribute val ----------------------------------------------------------
+    /** Attribute val Tag */
+    public static int ADD_REQUEST_ATTRIBUTES_VAL_TAG = 10;
+
+    /** Attribute val Value */
+    public static int ADD_REQUEST_ATTRIBUTES_VAL_VALUE = 11;
+    
+    /** Attribute val Loop */
+    public static int ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END = 12;
+    
+    /** The last state */
+    public static int LAST_ADD_REQUEST_STATE = 13;
+
+    //=========================================================================
     // Filter substring grammar states 
     //=========================================================================
 
@@ -843,6 +901,12 @@
     /** SearchResultReference number */
     public static final int SEARCH_RESULT_REFERENCE_GRAMMAR = 17;
     
+    /** AddRequest Grammar */
+    public static final int ADD_REQUEST_GRAMMAR_SWITCH = 0x1300;
+
+    /** AddRequest number */
+    public static final int ADD_REQUEST_GRAMMAR = 18;
+    
     
     /** The total number of grammars used */
     public static final int NB_GRAMMARS = 20;
@@ -871,7 +935,8 @@
             "FILTER_GRAMMAR_SWITCH",
             "SEARCH_RESULT_ENTRY_GRAMMAR_SWITCH",
             "MODIFY_REQUEST_GRAMMAR_SWITCH",
-            "SEARCH_RESULT_REFERENCE_GRAMMAR_SWITCH"
+            "SEARCH_RESULT_REFERENCE_GRAMMAR_SWITCH",
+            "ADD_REQUEST_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -1160,7 +1225,26 @@
 			    "SEARCH_RESULT_REFERENCE_LOOP_OR_END_TAG"
         };
     
-    
+    /** A string representation of all the add request states */
+    private static String[] AddRequestString =
+        new String[]
+        {
+                "ADD_REQUEST_TAG",
+                "ADD_REQUEST_VALUE",
+                "ADD_REQUEST_ENTRY_TAG",
+                "ADD_REQUEST_ENTRY_VALUE",
+                "ADD_REQUEST_ATTRIBUTES_TAG",
+                "ADD_REQUEST_ATTRIBUTES_VALUE",
+                "ADD_REQUEST_ATTRIBUTE_TAG",
+                "ADD_REQUEST_ATTRIBUTE_VALUE",
+                "ADD_REQUEST_ATTRIBUTES_TYPE_TAG",
+                "ADD_REQUEST_ATTRIBUTES_TYPE_VALUE",
+                "ADD_REQUEST_ATTRIBUTES_VALS_TAG",
+                "ADD_REQUEST_ATTRIBUTES_VALS_VALUE",
+                "ADD_REQUEST_ATTRIBUTES_VAL_TAG",
+                "ADD_REQUEST_ATTRIBUTES_VAL_VALUE",
+                "ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END"
+        };
     
     /** The instance */
     private static LdapStatesEnum instance = new LdapStatesEnum();
@@ -1195,25 +1279,26 @@
     {
         switch (grammar)
         {
-            case LDAP_MESSAGE_GRAMMAR       : return "LDAP_MESSAGE_GRAMMAR";
-            case LDAP_RESULT_GRAMMAR        : return "LDAP_RESULT_GRAMMAR";
-            case LDAP_CONTROL_GRAMMAR       : return "LDAP_CONTROL_GRAMMAR";
-            case BIND_REQUEST_GRAMMAR       : return "BIND_REQUEST_GRAMMAR";
-            case BIND_RESPONSE_GRAMMAR      : return "BIND_RESPONSE_GRAMMAR";
-            case UNBIND_REQUEST_GRAMMAR     : return "UNBIND_REQUEST_GRAMMAR";
-            case ABANDON_REQUEST_GRAMMAR    : return "ABANDON_REQUEST_GRAMMAR";
-            case ADD_RESPONSE_GRAMMAR       : return "ADD_RESPONSE_GRAMMAR";
-            case COMPARE_RESPONSE_GRAMMAR   : return "COMPARE_RESPONSE_GRAMMAR";
-            case DEL_RESPONSE_GRAMMAR       : return "DEL_RESPONSE_GRAMMAR";
-            case MODIFY_RESPONSE_GRAMMAR    : return "MODIFY_RESPONSE_GRAMMAR";
-            case MODIFY_DN_RESPONSE_GRAMMAR : return "MODIFY_DN_RESPONSE_GRAMMAR";
-            case SEARCH_RESULT_DONE_GRAMMAR : return "SEARCH_RESULT_DONE_GRAMMAR";
-            case SEARCH_REQUEST_GRAMMAR     : return "SEARCH_REQUEST_GRAMMAR";
-            case FILTER_GRAMMAR             : return "FILTER_GRAMMAR";
-            case SEARCH_RESULT_ENTRY_GRAMMAR: return "SEARCH_RESULT_ENTRY_GRAMMAR";
-            case MODIFY_REQUEST_GRAMMAR         : return "MODIFY_REQUEST_GRAMMAR";
+            case LDAP_MESSAGE_GRAMMAR            : return "LDAP_MESSAGE_GRAMMAR";
+            case LDAP_RESULT_GRAMMAR             : return "LDAP_RESULT_GRAMMAR";
+            case LDAP_CONTROL_GRAMMAR            : return "LDAP_CONTROL_GRAMMAR";
+            case BIND_REQUEST_GRAMMAR            : return "BIND_REQUEST_GRAMMAR";
+            case BIND_RESPONSE_GRAMMAR           : return "BIND_RESPONSE_GRAMMAR";
+            case UNBIND_REQUEST_GRAMMAR          : return "UNBIND_REQUEST_GRAMMAR";
+            case ABANDON_REQUEST_GRAMMAR         : return "ABANDON_REQUEST_GRAMMAR";
+            case ADD_RESPONSE_GRAMMAR            : return "ADD_RESPONSE_GRAMMAR";
+            case COMPARE_RESPONSE_GRAMMAR        : return "COMPARE_RESPONSE_GRAMMAR";
+            case DEL_RESPONSE_GRAMMAR            : return "DEL_RESPONSE_GRAMMAR";
+            case MODIFY_RESPONSE_GRAMMAR         : return "MODIFY_RESPONSE_GRAMMAR";
+            case MODIFY_DN_RESPONSE_GRAMMAR      : return "MODIFY_DN_RESPONSE_GRAMMAR";
+            case SEARCH_RESULT_DONE_GRAMMAR      : return "SEARCH_RESULT_DONE_GRAMMAR";
+            case SEARCH_REQUEST_GRAMMAR          : return "SEARCH_REQUEST_GRAMMAR";
+            case FILTER_GRAMMAR                  : return "FILTER_GRAMMAR";
+            case SEARCH_RESULT_ENTRY_GRAMMAR     : return "SEARCH_RESULT_ENTRY_GRAMMAR";
+            case MODIFY_REQUEST_GRAMMAR          : return "MODIFY_REQUEST_GRAMMAR";
             case SEARCH_RESULT_REFERENCE_GRAMMAR : return "SEARCH_RESULT_REFERENCE_GRAMMAR";
-        	default                         : return "UNKNOWN";
+            case ADD_REQUEST_GRAMMAR             : return "ADD_REQUEST_GRAMMAR";
+        	default                              : return "UNKNOWN";
         }
     }
 
@@ -1296,6 +1381,10 @@
         {
             return "SEARCH_RESULT_REFERENCE_GRAMMAR";
         }
+        else if (grammar instanceof AddRequestGrammar)
+        {
+            return "ADD_REQUEST_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -1376,6 +1465,9 @@
                     
                 case MODIFY_REQUEST_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "MODIFY_REQUEST_END_STATE" : ModifyRequestString[state]
);
+                    
+                case ADD_REQUEST_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "ADD_REQUEST_END_STATE" : AddRequestString[state]
);
                     
                 default :
                     return "UNKNOWN";



Mime
View raw message