directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r179537 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Date Thu, 02 Jun 2005 07:05:51 GMT
Author: elecharny
Date: Thu Jun  2 00:05:51 2005
New Revision: 179537

URL: http://svn.apache.org/viewcvs?rev=179537&view=rev
Log:
Added the ModifyResponse 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=179537&r1=179536&r2=179537&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
Thu Jun  2 00:05:51 2005
@@ -301,6 +301,24 @@
     public static int LAST_DEL_RESPONSE_STATE = 4;
 
     //=========================================================================
+    // ModifyResponse 
+    //=========================================================================
+    /**  Modify Response Tag */
+    public static int MODIFY_RESPONSE_TAG = 0;
+
+    /**  Modify Response Length */
+    public static int MODIFY_RESPONSE_LENGTH = 1;
+
+    /**  Modify Response Value */
+    public static int MODIFY_RESPONSE_VALUE = 2;
+
+    /**  Modify Response Ldap Result (we will switch the grammar here) */
+    public static int MODIFY_RESPONSE_LDAP_RESULT = 3;
+
+    /** Last state */
+    public static int LAST_MODIFY_RESPONSE_STATE = 4;
+
+    //=========================================================================
     // LdapResult grammar states 
     //=========================================================================
     /** LdapResult Code Tag */
@@ -418,6 +436,12 @@
     /** DelResponse number */
     public static final int DEL_RESPONSE_GRAMMAR = 9;
     
+    /** ModifyResponse Grammar */
+    public static final int MODIFY_RESPONSE_GRAMMAR_SWITCH = 0x0B00;
+
+    /** ModifyResponse number */
+    public static final int MODIFY_RESPONSE_GRAMMAR = 10;
+    
     /** The total number of grammars used */
     public static final int NB_GRAMMARS = 20;
 
@@ -437,7 +461,8 @@
             "ABANDON_RESPONSE_GRAMMAR_SWITCH",
             "ADD_RESPONSE_GRAMMAR_SWITCH",
             "COMPARE_RESPONSE_GRAMMAR_SWITCH",
-            "DEL_RESPONSE_GRAMMAR_SWITCH"
+            "DEL_RESPONSE_GRAMMAR_SWITCH",
+            "MODIFY_RESPONSE_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -587,6 +612,16 @@
             "DEL_RESPONSE_LDAP_RESULT"
         };
 
+    /** A string representation of all the Modify Response states */
+    private static String[] ModifyResponseString =
+        new String[]
+        {
+            "MODIFY_RESPONSE_TAG", 
+            "MODIFY_RESPONSE_LENGTH",
+            "MODIFY_RESPONSE_VALUE",
+            "MODIFY_RESPONSE_LDAP_RESULT"
+        };
+
     /** The instance */
     private static LdapStatesEnum instance = new LdapStatesEnum();
 
@@ -630,6 +665,7 @@
             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";
         	default : return "UNKNOWN";
         }
     }
@@ -681,6 +717,10 @@
         {
             return "DEL_RESPONSE_GRAMMAR";
         }
+        else if (grammar instanceof ModifyResponseGrammar)
+        {
+            return "MODIFY_RESPONSE_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -737,6 +777,9 @@
 
                 case DEL_RESPONSE_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "DEL_RESPONSE_END_STATE" : DelResponseString[state]
);
+
+                case MODIFY_RESPONSE_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "MODIFY_RESPONSE_END_STATE" : ModifyResponseString[state]
);
 
                 default :
                     return "UNKNOWN";



Mime
View raw message