directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r372996 - in /directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec: LdapStatesEnum.java add/AddRequestGrammar.java
Date Fri, 27 Jan 2006 21:50:28 GMT
Author: elecharny
Date: Fri Jan 27 13:50:20 2006
New Revision: 372996

URL: http://svn.apache.org/viewcvs?rev=372996&view=rev
Log:
- Correctly fixed the pop problem
- Modified the transition to be more easy to read them

Modified:
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/LdapStatesEnum.java
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/add/AddRequestGrammar.java

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/LdapStatesEnum.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/LdapStatesEnum.java?rev=372996&r1=372995&r2=372996&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/LdapStatesEnum.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/LdapStatesEnum.java
Fri Jan 27 13:50:20 2006
@@ -785,11 +785,11 @@
     public static int ADD_REQUEST_ENTRY_VALUE = 3;
 
     // Attributes -------------------------------------------------------------
-    /** Attributes Tag */
-    public static int ADD_REQUEST_ATTRIBUTES_TAG = 4;
+    /** Attribute list Tag */
+    public static int ADD_REQUEST_ATTRIBUTE_LIST_TAG = 4;
 
-    /** Attributes Value */
-    public static int ADD_REQUEST_ATTRIBUTES_VALUE = 5;
+    /** Attribute list Value */
+    public static int ADD_REQUEST_ATTRIBUTE_LIST_VALUE = 5;
 
     // Attribute -------------------------------------------------------------è
     /** Attribute Tag */
@@ -800,27 +800,27 @@
 
     // Attribute type ---------------------------------------------------------
     /** Attribute type Tag */
-    public static int ADD_REQUEST_ATTRIBUTES_TYPE_TAG = 8;
+    public static int ADD_REQUEST_ATTRIBUTE_TYPE_TAG = 8;
 
     /** Attribute type Value */
-    public static int ADD_REQUEST_ATTRIBUTES_TYPE_VALUE = 9;
+    public static int ADD_REQUEST_ATTRIBUTE_TYPE_VALUE = 9;
 
     // Attribute vals ---------------------------------------------------------
     /** Attribute vals Tag */
-    public static int ADD_REQUEST_ATTRIBUTES_VALS_TAG = 10;
+    public static int ADD_REQUEST_ATTRIBUTE_VALS_TAG = 10;
 
     /** Attribute vals Value */
-    public static int ADD_REQUEST_ATTRIBUTES_VALS_VALUE = 11;
+    public static int ADD_REQUEST_ATTRIBUTE_VALS_VALUE = 11;
 
     // Attribute val ----------------------------------------------------------
     /** Attribute val Tag */
-    public static int ADD_REQUEST_ATTRIBUTES_VAL_TAG = 10;
+    public static int ADD_REQUEST_ATTRIBUTE_VAL_TAG = 10;
 
     /** Attribute val Value */
-    public static int ADD_REQUEST_ATTRIBUTES_VAL_VALUE = 11;
+    public static int ADD_REQUEST_ATTRIBUTE_VAL_VALUE = 11;
 
     /** Attribute val Loop */
-    public static int ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END = 12;
+    public static int ADD_REQUEST_ATTRIBUTE_VAL_OR_ATTRIBUTE_OR_END = 12;
 
     /** The last state */
     public static int LAST_ADD_REQUEST_STATE = 13;
@@ -1442,17 +1442,17 @@
             "ADD_REQUEST_VALUE",
             "ADD_REQUEST_ENTRY_TAG",
             "ADD_REQUEST_ENTRY_VALUE",
-            "ADD_REQUEST_ATTRIBUTES_TAG",
-            "ADD_REQUEST_ATTRIBUTES_VALUE",
+            "ADD_REQUEST_ATTRIBUTE_LIST_TAG",
+            "ADD_REQUEST_ATTRIBUTE_LIST_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"
+            "ADD_REQUEST_ATTRIBUTE_TYPE_TAG",
+            "ADD_REQUEST_ATTRIBUTE_TYPE_VALUE",
+            "ADD_REQUEST_ATTRIBUTE_VALS_TAG",
+            "ADD_REQUEST_ATTRIBUTE_VALS_VALUE",
+            "ADD_REQUEST_ATTRIBUTE_VAL_TAG",
+            "ADD_REQUEST_ATTRIBUTE_VAL_VALUE",
+            "ADD_REQUEST_ATTRIBUTE_VAL_OR_ATTRIBUTE_OR_END"
         };
 
     /** A string representation of all the ModifyDN request states */

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/add/AddRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/add/AddRequestGrammar.java?rev=372996&r1=372995&r2=372996&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/add/AddRequestGrammar.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/add/AddRequestGrammar.java
Fri Jan 27 13:50:20 2006
@@ -122,7 +122,7 @@
         //    ...
         // Store the object name.
         super.transitions[LdapStatesEnum.ADD_REQUEST_ENTRY_VALUE][UniversalTag.OCTET_STRING_TAG]
= new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ENTRY_VALUE, LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TAG,
+                LdapStatesEnum.ADD_REQUEST_ENTRY_VALUE, LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_LIST_TAG,
                 new GrammarAction( "Store add request object Value" )
                 {
                     public void action( IAsn1Container container ) throws DecoderException
@@ -176,19 +176,19 @@
         //    attributes      AttributeList }
         // AttributeList ::= *SEQUENCE* OF SEQUENCE { (Tag)
         // Nothing to do
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TAG][UniversalTag.SEQUENCE_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_LIST_TAG][UniversalTag.SEQUENCE_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TAG,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALUE, null );
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_LIST_TAG,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_LIST_VALUE, null );
 
         // AddRequest ::= [APPLICATION 8] SEQUENCE {
         //    ...
         //    attributes      AttributeList }
         // AttributeList ::= *SEQUENCE* OF SEQUENCE { (Value)
         // Allocate the attributes ArrayList
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALUE][UniversalTag.SEQUENCE_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_LIST_VALUE][UniversalTag.SEQUENCE_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALUE,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_LIST_VALUE,
                 LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TAG,
                 new GrammarAction( "Init attributes array list" )
                 {
@@ -216,9 +216,9 @@
         //     ...
         // Nothing to do
         // This is a loop, when dealing with more than one attribute
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END][UniversalTag.SEQUENCE_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_OR_ATTRIBUTE_OR_END][UniversalTag.SEQUENCE_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_OR_ATTRIBUTE_OR_END,
                 LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE, null );
 
         // AttributeList ::= SEQUENCE OF *SEQUENCE* { (Value)
@@ -226,25 +226,25 @@
         super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE][UniversalTag.SEQUENCE_TAG]
=
             new GrammarTransition(
                 LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_TAG, null );
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TYPE_TAG, null );
 
         // AttributeList ::= SEQUENCE OF *SEQUENCE* {
         //    type    AttributeDescription, (Tag)
         //    ...
         // Nothing to do
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_TAG][UniversalTag.OCTET_STRING_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TYPE_TAG][UniversalTag.OCTET_STRING_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_TAG,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_VALUE, null );
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TYPE_TAG,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TYPE_VALUE, null );
 
         // AttributeList ::= SEQUENCE OF *SEQUENCE* {
         //    type    AttributeDescription, (Value)
         //    ...
         // Store the attribute type.
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_VALUE][UniversalTag.OCTET_STRING_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TYPE_VALUE][UniversalTag.OCTET_STRING_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_VALUE,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_TAG,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TYPE_VALUE,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALS_TAG,
                 new GrammarAction( "Store attribute type" )
                 {
                     public void action( IAsn1Container container ) throws DecoderException
@@ -293,54 +293,48 @@
         //     ...
         //     vals    *SET OF* AttributeValue } (Tag)
         // Nothing to do
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_TAG][UniversalTag.SET_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALS_TAG][UniversalTag.SET_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_TAG,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_VALUE, null );
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALS_TAG,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALS_VALUE, null );
 
         // AttributeTypeAndValues ::= SEQUENCE {
         //     ...
         //     vals    *SET OF* AttributeValue } (Value)
         // Nothing to do
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_VALUE][UniversalTag.SET_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALS_VALUE][UniversalTag.SET_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_VALUE,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_TAG, null );
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALS_VALUE,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_TAG, null );
 
         // AttributeTypeAndValues ::= SEQUENCE {
         //     ...
         //     vals    SET OF *AttributeValue* } (Tag)
         // Nothing to do
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_TAG][UniversalTag.OCTET_STRING_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_TAG][UniversalTag.OCTET_STRING_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_TAG,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE, null );
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_TAG,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_VALUE, null );
 
         // AttributeTypeAndValues ::= SEQUENCE {
         //     ...
         //     vals    SET OF *AttributeValue* } (Loop)
         // This is a loop, when dealing with multi-valued attributes
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END][UniversalTag.OCTET_STRING_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_OR_ATTRIBUTE_OR_END][UniversalTag.OCTET_STRING_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE, 
-                new GrammarAction( "Allow pop" )
-                {
-                    public void action( IAsn1Container container ) throws DecoderException
-                    {
-                        container.grammarPopAllowed( true );
-                    }
-                } );
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_OR_ATTRIBUTE_OR_END,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_VALUE, 
+                null);
 
         // AttributeTypeAndValues ::= SEQUENCE {
         //     ...
         //     vals    SET OF AttributeValue }
         // AttributeValue ::= OCTET STRING (Value)
         // Store a new attribute value.
-        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE][UniversalTag.OCTET_STRING_TAG]
=
+        super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_VALUE][UniversalTag.OCTET_STRING_TAG]
=
             new GrammarTransition(
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE,
-                LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_VALUE,
+                LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VAL_OR_ATTRIBUTE_OR_END,
                 new GrammarAction( "Store attribute value" )
                 {
                     public void action( IAsn1Container container )



Mime
View raw message