You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/07/31 23:17:52 UTC
svn commit: r226696 - in
/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1: ber/tlv/
ldap/codec/ ldap/codec/grammars/ ldap/pojo/
Author: elecharny
Date: Sun Jul 31 14:17:34 2005
New Revision: 226696
URL: http://svn.apache.org/viewcvs?rev=226696&view=rev
Log:
Moved the Universal ASN.1 tags from LdapConstants to UniversalTag class,
where they deserved to be in the first place.
Modified:
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/UniversalTag.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/Value.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/LdapConstants.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddRequestGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddResponseGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindRequestGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindResponseGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareRequestGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareResponseGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/DelResponseGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ExtendedResponseGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNRequestGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNResponseGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyResponseGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultDoneGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultEntryGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultReferenceGrammar.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AddRequest.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapResult.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultEntry.java
directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultReference.java
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/UniversalTag.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/UniversalTag.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/UniversalTag.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/UniversalTag.java Sun Jul 31 14:17:34 2005
@@ -334,6 +334,17 @@
"RESERVED_31"
};
+ /** ASN.1 primitive tag values */
+ public static final byte BOOLEAN_TAG = 0x01;
+ public static final byte INTEGER_TAG = 0x02;
+
+ public static final byte OCTET_STRING_TAG = 0x04;
+
+ public static final byte ENUMERATED_TAG = 0x0A;
+
+ public static final byte SEQUENCE_TAG = 0x30;
+ public static final byte SET_TAG = 0x31;
+
//~ Methods ------------------------------------------------------------------------------------
// -----------------------------------------------------------------------
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/Value.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/Value.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/Value.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/tlv/Value.java Sun Jul 31 14:17:34 2005
@@ -17,7 +17,6 @@
package org.apache.asn1.ber.tlv;
import org.apache.asn1.EncoderException;
-import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.primitives.OctetString;
import org.apache.asn1.util.MutableString;
import org.apache.asn1.util.StringUtils;
@@ -241,7 +240,7 @@
try
{
- buffer.put( LdapConstants.OCTET_STRING_TAG );
+ buffer.put( UniversalTag.OCTET_STRING_TAG );
byte[] value = string.getBytes();
buffer.put( Length.getBytes( value.length ) );
@@ -274,7 +273,7 @@
try
{
- buffer.put( LdapConstants.OCTET_STRING_TAG );
+ buffer.put( UniversalTag.OCTET_STRING_TAG );
buffer.put( Length.getBytes( string.getLength() ) );
if ( string.getLength() != 0 )
@@ -305,7 +304,7 @@
try
{
- buffer.put( LdapConstants.OCTET_STRING_TAG );
+ buffer.put( UniversalTag.OCTET_STRING_TAG );
buffer.put( Length.getBytes( string.getLength() ) );
if ( string.getLength() != 0 )
@@ -336,7 +335,7 @@
try
{
- buffer.put( LdapConstants.INTEGER_TAG );
+ buffer.put( UniversalTag.INTEGER_TAG );
buffer.put( Length.getBytes( Length.getNbBytes( value ) ) );
buffer.put( getBytes( value ) );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/LdapConstants.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/LdapConstants.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/LdapConstants.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/LdapConstants.java Sun Jul 31 14:17:34 2005
@@ -42,44 +42,37 @@
public static final int LESS_OR_EQUAL_FILTER = 2;
public static final int APPROX_MATCH_FILTER = 3;
- /** ASN.1 primitive tags */
- public static final byte BOOLEAN_TAG = 0x01;
- public static final byte INTEGER_TAG = 0x02;
- public static final byte OCTET_STRING_TAG = 0x04;
- public static final byte ENUMERATED_TAG = 0x0A;
- public static final byte SEQUENCE_TAG = 0x30;
- public static final byte SET_TAG = 0x31;
-
/** LDAP contextual tags */
- public static final byte UNBIND_REQUEST_TAG = 0x42;
- public static final byte DEL_REQUEST_TAG = 0x4A;
- public static final byte ABANDON_REQUEST_TAG = 0x50;
- public static final byte BIND_REQUEST_TAG = 0x60;
- public static final byte BIND_RESPONSE_TAG = 0x61;
- public static final byte SEARCH_RESULT_ENTRY_TAG = 0x64;
- public static final byte SEARCH_RESULT_DONE_TAG = 0x65;
- public static final byte MODIFY_RESPONSE_TAG = 0x67;
- public static final byte ADD_REQUEST_TAG = 0x68;
- public static final byte ADD_RESPONSE_TAG = 0x69;
- public static final byte DEL_RESPONSE_TAG = 0x6B;
- public static final byte MODIFY_DN_REQUEST_TAG = 0x6C;
- public static final byte MODIFY_DN_RESPONSE_TAG = 0x6D;
- public static final byte COMPARE_REQUEST_TAG = 0x6E;
- public static final byte COMPARE_RESPONSE_TAG = 0x6F;
+ public static final byte UNBIND_REQUEST_TAG = 0x42;
+ public static final byte DEL_REQUEST_TAG = 0x4A;
+ public static final byte ABANDON_REQUEST_TAG = 0x50;
+ public static final byte BIND_REQUEST_TAG = 0x60;
+ public static final byte BIND_RESPONSE_TAG = 0x61;
+ public static final byte SEARCH_RESULT_ENTRY_TAG = 0x64;
+ public static final byte SEARCH_RESULT_DONE_TAG = 0x65;
+ public static final byte MODIFY_REQUEST_TAG = 0x66;
+ public static final byte MODIFY_RESPONSE_TAG = 0x67;
+ public static final byte ADD_REQUEST_TAG = 0x68;
+ public static final byte ADD_RESPONSE_TAG = 0x69;
+ public static final byte DEL_RESPONSE_TAG = 0x6B;
+ public static final byte MODIFY_DN_REQUEST_TAG = 0x6C;
+ public static final byte MODIFY_DN_RESPONSE_TAG = 0x6D;
+ public static final byte COMPARE_REQUEST_TAG = 0x6E;
+ public static final byte COMPARE_RESPONSE_TAG = 0x6F;
public static final byte SEARCH_RESULT_REFERENCE_TAG = 0x73;
- public static final byte EXTENDED_REQUEST_TAG = 0x77;
- public static final byte EXTENDED_RESPONSE_TAG = 0x78;
+ public static final byte EXTENDED_REQUEST_TAG = 0x77;
+ public static final byte EXTENDED_RESPONSE_TAG = 0x78;
// The following tags are ints, because bytes above 127 are negative
// numbers, and we can't use them as array indexes.
- public static final int BIND_REQUEST_SIMPLE_TAG = 0x80;
- public static final int EXTENDED_REQUEST_NAME_TAG = 0x80;
- public static final int MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG = 0x80;
- public static final int EXTENDED_REQUEST_VALUE_TAG = 0x81;
- public static final int BIND_REQUEST_SASL_TAG = 0x83;
- public static final int LDAP_RESULT_REFERRAL_SEQUENCE_TAG = 0x83;
- public static final int SERVER_SASL_CREDENTIAL_TAG = 0x87;
+ public static final int BIND_REQUEST_SIMPLE_TAG = 0x80;
+ public static final int EXTENDED_REQUEST_NAME_TAG = 0x80;
+ public static final int MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG = 0x80;
+ public static final int EXTENDED_REQUEST_VALUE_TAG = 0x81;
+ public static final int BIND_REQUEST_SASL_TAG = 0x83;
+ public static final int LDAP_RESULT_REFERRAL_SEQUENCE_TAG = 0x83;
+ public static final int SERVER_SASL_CREDENTIAL_TAG = 0x87;
public static final int EXTENDED_RESPONSE_RESPONSE_NAME_TAG = 0x8A;
- public static final int EXTENDED_RESPONSE_RESPONSE_TAG = 0x8B;
- public static final int CONTROLS_SEQUENCE_TAG = 0x90;
+ public static final int EXTENDED_RESPONSE_RESPONSE_TAG = 0x8B;
+ public static final int CONTROLS_SEQUENCE_TAG = 0x90;
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddRequestGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddRequestGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddRequestGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,8 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
import org.apache.asn1.ldap.codec.primitives.LdapString;
@@ -71,13 +73,13 @@
// LdapMessage ::= ... AddRequest ...
// AddRequest ::= [APPLICATION 8] SEQUENCE { (Tag)
// Nothing to do.
- super.transitions[LdapStatesEnum.ADD_REQUEST_TAG][0x68] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.ADD_REQUEST_TAG][LdapConstants.ADD_REQUEST_TAG] = new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_TAG, LdapStatesEnum.ADD_REQUEST_VALUE, null );
// LdapMessage ::= ... AddRequest ...
// AddRequest ::= [APPLICATION 8] SEQUENCE { (Value)
// Create the structure
- super.transitions[LdapStatesEnum.ADD_REQUEST_VALUE][0x68] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.ADD_REQUEST_VALUE][LdapConstants.ADD_REQUEST_TAG] = new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_VALUE, LdapStatesEnum.ADD_REQUEST_ENTRY_TAG,
new GrammarAction( "Init addRequest" )
{
@@ -99,7 +101,7 @@
// entry LDAPDN, (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ENTRY_TAG][0x04] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ENTRY_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ENTRY_TAG, LdapStatesEnum.ADD_REQUEST_ENTRY_VALUE,
null );
@@ -107,7 +109,7 @@
// entry LDAPDN, (Value)
// ...
// Store the object name.
- super.transitions[LdapStatesEnum.ADD_REQUEST_ENTRY_VALUE][0x04] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ENTRY_VALUE][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ENTRY_VALUE, LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TAG,
new GrammarAction( "Store add request object Value" )
{
@@ -141,7 +143,7 @@
// attributes AttributeList }
// AttributeList ::= *SEQUENCE* OF SEQUENCE { (Tag)
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TAG][0x30] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TAG][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TAG,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALUE, null );
@@ -151,7 +153,7 @@
// attributes AttributeList }
// AttributeList ::= *SEQUENCE* OF SEQUENCE { (Value)
// Allocate the attributes ArrayList
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALUE][0x30] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALUE][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALUE,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TAG,
@@ -173,7 +175,7 @@
// AttributeList ::= SEQUENCE OF *SEQUENCE* { (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TAG][0x30] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TAG][UniversalTag.SEQUENCE_TAG] = new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_TAG,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE, null );
@@ -181,14 +183,14 @@
// ...
// 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][0x30] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE, null );
// AttributeList ::= SEQUENCE OF *SEQUENCE* { (Value)
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE][0x30] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTE_VALUE,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_TAG, null );
@@ -197,7 +199,7 @@
// type AttributeDescription, (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_TAG][0x04] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_TAG,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_VALUE, null );
@@ -206,7 +208,7 @@
// type AttributeDescription, (Value)
// ...
// Store the attribute type.
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_VALUE][0x04] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_TYPE_VALUE,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_TAG,
@@ -241,7 +243,7 @@
// ...
// vals *SET OF* AttributeValue } (Tag)
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_TAG][0x31] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_TAG][UniversalTag.SET_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_TAG,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_VALUE, null );
@@ -250,7 +252,7 @@
// ...
// vals *SET OF* AttributeValue } (Value)
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_VALUE][0x31] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_VALUE][UniversalTag.SET_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VALS_VALUE,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_TAG, null );
@@ -259,7 +261,7 @@
// ...
// vals SET OF *AttributeValue* } (Tag)
// Nothing to do
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_TAG][0x04] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_TAG,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE, null );
@@ -268,7 +270,7 @@
// ...
// 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][0x04] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_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, null );
@@ -278,7 +280,7 @@
// vals SET OF AttributeValue }
// AttributeValue ::= OCTET STRING (Value)
// Store a new attribute value.
- super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE][0x04] =
+ super.transitions[LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_VALUE,
LdapStatesEnum.ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END,
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddResponseGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddResponseGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddResponseGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AddResponseGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.AddResponse;
@@ -106,7 +107,7 @@
// LdapMessage ::= ... AddResponse ...
// AddResponse ::= [APPLICATION 9] LDAPResult (Value)
// Ok, we have a LDAPResult Tag (0x0A). So we have to switch the grammar.
- super.transitions[LdapStatesEnum.ADD_RESPONSE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.ADD_RESPONSE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.ADD_RESPONSE_LDAP_RESULT, LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH, null );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindRequestGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindRequestGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindRequestGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
@@ -117,12 +118,12 @@
// BindRequest ::= ... version INTEGER (1 .. 127 ), ... (Tag)
// Nothing to do.
- super.transitions[LdapStatesEnum.BIND_REQUEST_VERSION_TAG][LdapConstants.INTEGER_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.BIND_REQUEST_VERSION_TAG][UniversalTag.INTEGER_TAG] = new GrammarTransition(
LdapStatesEnum.BIND_REQUEST_VERSION_TAG, LdapStatesEnum.BIND_REQUEST_VERSION_VALUE, null );
// BindRequest ::= ... version INTEGER (1 .. 127 ), ... (value)
// Checks that the Version is in [1, 127]
- super.transitions[LdapStatesEnum.BIND_REQUEST_VERSION_VALUE][LdapConstants.INTEGER_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.BIND_REQUEST_VERSION_VALUE][UniversalTag.INTEGER_TAG] = new GrammarTransition(
LdapStatesEnum.BIND_REQUEST_VERSION_VALUE, LdapStatesEnum.BIND_REQUEST_NAME_TAG,
new GrammarAction( "Store version" )
{
@@ -150,12 +151,12 @@
// BindRequest ::= ... name LDAPDN, ... (Tag)
// Nothing to do. The tag is supposed to be 0x04
- super.transitions[LdapStatesEnum.BIND_REQUEST_NAME_TAG][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.BIND_REQUEST_NAME_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.BIND_REQUEST_NAME_TAG, LdapStatesEnum.BIND_REQUEST_NAME_VALUE, null );
// BindRequest ::= ... name LDAPDN, ... (Value)
// We have to store the name
- super.transitions[LdapStatesEnum.BIND_REQUEST_NAME_VALUE][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.BIND_REQUEST_NAME_VALUE][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.BIND_REQUEST_NAME_VALUE,
LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CHOICE_TAG,
new GrammarAction( "Store Bind Name value" )
@@ -307,7 +308,7 @@
// - any other value is an error.
//
// It's a credential if it's 0x04
- super.transitions[LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CREDENTIALS_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CREDENTIALS_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition( LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CREDENTIALS_TAG,
LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CREDENTIALS_VALUE, null );
@@ -326,7 +327,7 @@
// - or nothing at all (end of the BindRequest).
// We just have to transit to the first case, which will accept or not the transition.
// This is done by transiting to the GRAMMAR_END state
- super.transitions[LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CREDENTIALS_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CREDENTIALS_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition( LdapStatesEnum.BIND_REQUEST_AUTHENTICATION_CREDENTIALS_VALUE,
LdapStatesEnum.GRAMMAR_END,
new GrammarAction( "Store Bind sasl Authentication credentials value" )
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindResponseGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindResponseGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindResponseGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/BindResponseGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.BindResponse;
@@ -107,7 +108,7 @@
// COMPONENTS OF LDAPResult, ...
// The Tag will be the LDAPResult Tag (0x0A). So we have to switch the grammar.
// The current state will be stored.
- super.transitions[LdapStatesEnum.BIND_RESPONSE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.BIND_RESPONSE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.BIND_RESPONSE_LDAP_RESULT, LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH,
null );
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareRequestGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareRequestGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareRequestGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
@@ -99,7 +100,7 @@
// entry LDAPDN, (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_ENTRY_TAG][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_ENTRY_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_ENTRY_TAG,
LdapStatesEnum.COMPARE_REQUEST_ENTRY_VALUE, null );
@@ -107,7 +108,7 @@
// entry LDAPDN, (Tag)
// ...
// Store the DN to be compared
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_ENTRY_VALUE][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_ENTRY_VALUE][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_ENTRY_VALUE, LdapStatesEnum.COMPARE_REQUEST_AVA_TAG,
new GrammarAction( "Store entry" )
{
@@ -142,7 +143,7 @@
// ava AttributeValueAssertion }
// AttributeValueAssertion ::= SEQUENCE { (Tag)
// Nothing to do
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_AVA_TAG][LdapConstants.SEQUENCE_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_AVA_TAG][UniversalTag.SEQUENCE_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_AVA_TAG,
LdapStatesEnum.COMPARE_REQUEST_AVA_VALUE, null );
@@ -151,14 +152,14 @@
// ava AttributeValueAssertion }
// AttributeValueAssertion ::= SEQUENCE { (Value)
// Nothing to do
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_AVA_VALUE][LdapConstants.SEQUENCE_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_AVA_VALUE][UniversalTag.SEQUENCE_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_AVA_VALUE, LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_TAG, null);
// AttributeValueAssertion ::= SEQUENCE {
// attributeDesc AttributeDescription, (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_TAG][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_TAG,
LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_VALUE, null );
@@ -166,7 +167,7 @@
// attributeDesc AttributeDescription, (Value)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_VALUE][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_VALUE][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_ATTRIBUTE_DESC_VALUE,
LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_TAG,
new GrammarAction( "Store attribute desc" )
@@ -201,7 +202,7 @@
// ...
// assertionValue AssertionValue } (Tag)
// Nothing to do
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_TAG][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_TAG,
LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_VALUE, null );
@@ -209,7 +210,7 @@
// ...
// assertionValue AssertionValue } (Value)
// Nothing to do
- super.transitions[LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_VALUE][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_VALUE][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_ASSERTION_VALUE_VALUE,
LdapStatesEnum.END_STATE,
new GrammarAction( "Store assertion value" )
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareResponseGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareResponseGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareResponseGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/CompareResponseGrammar.java Sun Jul 31 14:17:34 2005
@@ -22,6 +22,7 @@
import org.apache.asn1.ber.grammar.GrammarAction;
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.CompareResponse;
@@ -96,7 +97,7 @@
// LdapMessage ::= ... CompareResponse ...
// CompareResponse ::= [APPLICATION 15] LDAPResult (Value)
// Ok, we have a LDAPResult Tag (0x0A). So we have to switch the grammar.
- super.transitions[LdapStatesEnum.COMPARE_RESPONSE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.COMPARE_RESPONSE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.COMPARE_RESPONSE_LDAP_RESULT, LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH, null );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/DelResponseGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/DelResponseGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/DelResponseGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/DelResponseGrammar.java Sun Jul 31 14:17:34 2005
@@ -22,6 +22,7 @@
import org.apache.asn1.ber.grammar.GrammarAction;
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.DelResponse;
@@ -97,7 +98,7 @@
// LdapMessage ::= ... DelResponse ...
// DelResponse ::= [APPLICATION 11] LDAPResult (Value)
// Ok, we have a LDAPResult Tag (0x0A). So we have to switch the grammar.
- super.transitions[LdapStatesEnum.DEL_RESPONSE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.DEL_RESPONSE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.DEL_RESPONSE_LDAP_RESULT, LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH, null );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ExtendedResponseGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ExtendedResponseGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ExtendedResponseGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ExtendedResponseGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.ExtendedResponse;
@@ -99,7 +100,7 @@
// ...
// The Tag will be the LDAPResult Tag (0x0A). So we have to switch the grammar.
// The current state will be stored.
- super.transitions[LdapStatesEnum.EXTENDED_RESPONSE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.EXTENDED_RESPONSE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.EXTENDED_RESPONSE_LDAP_RESULT,
LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH, null );
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,8 +23,8 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
-import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.codec.utils.IntegerDecoder;
import org.apache.asn1.ldap.pojo.LdapMessage;
@@ -72,7 +72,7 @@
//============================================================================================
// LDAPMessage --> SEQUENCE { ... (Tag)
// We have a LDAPMessage, and the tag must be 0x30
- super.transitions[LdapStatesEnum.LDAP_MESSAGE_TAG][LdapConstants.SEQUENCE_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.LDAP_MESSAGE_TAG][UniversalTag.SEQUENCE_TAG] = new GrammarTransition(
LdapStatesEnum.LDAP_MESSAGE_TAG, LdapStatesEnum.LDAP_MESSAGE_VALUE,
new GrammarAction( "LdapMessage Tag" )
{
@@ -94,7 +94,7 @@
// LDAPMessage --> SEQUENCE { ... (Value)
// Nothing to do, it's a constructed TLV. It's just a phantom transition ...
- super.transitions[LdapStatesEnum.LDAP_MESSAGE_VALUE][LdapConstants.SEQUENCE_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.LDAP_MESSAGE_VALUE][UniversalTag.SEQUENCE_TAG] = new GrammarTransition(
LdapStatesEnum.LDAP_MESSAGE_VALUE, LdapStatesEnum.LDAP_MESSAGE_ID_TAG, null );
//--------------------------------------------------------------------------------------------
@@ -102,13 +102,13 @@
//--------------------------------------------------------------------------------------------
// LDAPMessage --> ... MessageId ...(Tag)
// The tag must be 0x02. Nothing special to do.
- super.transitions[LdapStatesEnum.LDAP_MESSAGE_ID_TAG][0x02] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.LDAP_MESSAGE_ID_TAG][UniversalTag.INTEGER_TAG] = new GrammarTransition(
LdapStatesEnum.LDAP_MESSAGE_ID_TAG, LdapStatesEnum.LDAP_MESSAGE_ID_VALUE, null );
// LDAPMessage --> ... MessageId ...(Value)
// Checks that MessageId is in [0 .. 2147483647] and store the value in the LdapMessage Object
// (2147483647 = Integer.MAX_VALUE)
- super.transitions[LdapStatesEnum.LDAP_MESSAGE_ID_VALUE][0x02] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.LDAP_MESSAGE_ID_VALUE][UniversalTag.INTEGER_TAG] = new GrammarTransition(
LdapStatesEnum.LDAP_MESSAGE_ID_VALUE, LdapStatesEnum.PROTOCOL_OP_TAG,
new GrammarAction( "Store MessageId" )
{
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
@@ -78,7 +79,7 @@
// resultCode ENUMERATED { ... (Tag)
// We have a LDAPResult, and the tag may be 0x0A
// Nothing to do
- super.transitions[LdapStatesEnum.LDAP_RESULT_CODE_TAG][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.LDAP_RESULT_CODE_TAG][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_CODE_TAG, LdapStatesEnum.LDAP_RESULT_CODE_VALUE, null );
// LDAPResult --> SEQUENCE {
@@ -132,7 +133,7 @@
// other (80) },
// -- 81-90 reserved for APIs --
//
- super.transitions[LdapStatesEnum.LDAP_RESULT_CODE_VALUE][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.LDAP_RESULT_CODE_VALUE][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_CODE_VALUE, LdapStatesEnum.LDAP_RESULT_MATCHED_DN_TAG,
new GrammarAction( "Store resultCode" )
{
@@ -213,7 +214,7 @@
// ...
// matchedDN LDAPDN, (Tag)
// The tag is 0x04. Nothing to do
- super.transitions[LdapStatesEnum.LDAP_RESULT_MATCHED_DN_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.LDAP_RESULT_MATCHED_DN_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_MATCHED_DN_TAG,
LdapStatesEnum.LDAP_RESULT_MATCHED_DN_VALUE, null );
@@ -222,7 +223,7 @@
// ...
// matchedDN LDAPDN, (Value)
// We store the LDAPDN after having checked that it is valid.
- super.transitions[LdapStatesEnum.LDAP_RESULT_MATCHED_DN_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.LDAP_RESULT_MATCHED_DN_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_MATCHED_DN_VALUE,
LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_TAG,
@@ -259,7 +260,7 @@
// ...
// errorMessage LDAPString, (Tag)
// The tag is 0x04. Nothing to do
- super.transitions[LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_TAG,
LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_VALUE, null );
@@ -268,7 +269,7 @@
// ...
// errorMessage LDAPString, (Value)
// Stores the value.
- super.transitions[LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition( LdapStatesEnum.LDAP_RESULT_ERROR_MESSAGE_VALUE,
LdapStatesEnum.LDAP_RESULT_REFERRAL_SEQUENCE_TAG,
new GrammarAction( "Store Ldap Result error message" )
@@ -328,7 +329,7 @@
// Referral ::= SEQUENCE OF LDAPURL (Tag)
// This is a SEQUENCE, we will have at least one referral, but may be many.
// As this is the tag, we don't have anything to do.
- super.transitions[LdapStatesEnum.LDAP_RESULT_REFERRAL_TAG][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.LDAP_RESULT_REFERRAL_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_REFERRAL_TAG,
LdapStatesEnum.LDAP_RESULT_REFERRAL_VALUE, null );
@@ -337,7 +338,7 @@
// To handle those different cases, we have to transit to a special state, which
// will do this brancing.
// Here, we store the referral in the ldapResult.
- super.transitions[LdapStatesEnum.LDAP_RESULT_REFERRAL_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.LDAP_RESULT_REFERRAL_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_REFERRAL_VALUE,
LdapStatesEnum.LDAP_RESULT_REFERRAL_LOOP_TAG,
@@ -374,7 +375,7 @@
// Those different cases are handled here.
// This is a referral. We have to transit to its Length state
- super.transitions[LdapStatesEnum.LDAP_RESULT_REFERRAL_LOOP_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.LDAP_RESULT_REFERRAL_LOOP_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.LDAP_RESULT_REFERRAL_LOOP_TAG,
LdapStatesEnum.LDAP_RESULT_REFERRAL_VALUE, null );
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNRequestGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNRequestGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNRequestGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
@@ -102,7 +103,7 @@
// entry LDAPDN, (Tag)
// ...
// The tag is 0x04. Nothing to do
- super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_ENTRY_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_ENTRY_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.MODIFY_DN_REQUEST_ENTRY_TAG,
LdapStatesEnum.MODIFY_DN_REQUEST_ENTRY_VALUE, null );
@@ -111,7 +112,7 @@
// entry LDAPDN, (Value)
// ...
// We store the entry. It must not be null.
- super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_ENTRY_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_ENTRY_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.MODIFY_DN_REQUEST_ENTRY_VALUE,
LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_TAG,
@@ -150,7 +151,7 @@
// ...
// The tag is 0x04. A RelativeLDAPDN is a component of a
// LDAPDN. Nothing to do
- super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_TAG,
LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_VALUE, null );
@@ -161,7 +162,7 @@
// ...
// A RelativeLDAPDN is a component of a LDAPDN. We have to check that it is
// valid.
- super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition( LdapStatesEnum.MODIFY_DN_REQUEST_NEW_RDN_VALUE,
LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG,
new GrammarAction( "Store new RDN" )
@@ -197,7 +198,7 @@
// deleteoldrdn BOOLEAN, (Tag)
// ...
// Nothing to do.
- super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG][LdapConstants.BOOLEAN_TAG] =
+ super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG][UniversalTag.BOOLEAN_TAG] =
new GrammarTransition( LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG,
LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE, null );
@@ -206,7 +207,7 @@
// deleteoldrdn BOOLEAN, (Value)
// ...
// Store the flag
- super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE][LdapConstants.BOOLEAN_TAG] =
+ super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE][UniversalTag.BOOLEAN_TAG] =
new GrammarTransition( LdapStatesEnum.MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE,
LdapStatesEnum.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG,
new GrammarAction( "Store matching dnAttributes Value" )
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNResponseGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNResponseGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNResponseGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyDNResponseGrammar.java Sun Jul 31 14:17:34 2005
@@ -22,6 +22,7 @@
import org.apache.asn1.ber.grammar.GrammarAction;
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.LdapMessage;
@@ -95,7 +96,7 @@
// LdapMessage ::= ... ModifyDNResponse ...
// ModifyDNResponse ::= [APPLICATION 13] LDAPResult (Value)
// Ok, we have a LDAPResult Tag (0x0A). So we have to switch the grammar.
- super.transitions[LdapStatesEnum.MODIFY_DN_RESPONSE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.MODIFY_DN_RESPONSE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.MODIFY_DN_RESPONSE_LDAP_RESULT, LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH, null );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyResponseGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyResponseGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyResponseGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/ModifyResponseGrammar.java Sun Jul 31 14:17:34 2005
@@ -22,6 +22,7 @@
import org.apache.asn1.ber.grammar.GrammarAction;
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.LdapMessage;
@@ -95,7 +96,7 @@
// LdapMessage ::= ... ModifyResponse ...
// ModifyResponse ::= [APPLICATION 7] LDAPResult (Value)
// Ok, we have a LDAPResult Tag (0x0A). So we have to switch the grammar.
- super.transitions[LdapStatesEnum.MODIFY_RESPONSE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.MODIFY_RESPONSE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.MODIFY_RESPONSE_LDAP_RESULT, LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH, null );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultDoneGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultDoneGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultDoneGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultDoneGrammar.java Sun Jul 31 14:17:34 2005
@@ -22,6 +22,7 @@
import org.apache.asn1.ber.grammar.GrammarAction;
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.pojo.LdapMessage;
@@ -95,7 +96,7 @@
// LdapMessage ::= ... SearchResultDone ...
// SearchResultDone ::= [APPLICATION 5] LDAPResult (Value)
// Ok, we have a LDAPResult Tag (0x0A). So we have to switch the grammar.
- super.transitions[LdapStatesEnum.SEARCH_RESULT_DONE_LDAP_RESULT][LdapConstants.ENUMERATED_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_DONE_LDAP_RESULT][UniversalTag.ENUMERATED_TAG] = new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_DONE_LDAP_RESULT, LdapStatesEnum.LDAP_RESULT_GRAMMAR_SWITCH, null );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultEntryGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultEntryGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultEntryGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultEntryGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
@@ -111,7 +112,7 @@
// objectName LDAPDN, (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_OBJECT_NAME_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_OBJECT_NAME_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_OBJECT_NAME_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_OBJECT_NAME_VALUE, null );
@@ -121,7 +122,7 @@
// objectName LDAPDN, (Value)
// ...
// Store the object name.
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_OBJECT_NAME_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_OBJECT_NAME_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_OBJECT_NAME_VALUE,
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_TAG,
@@ -158,7 +159,7 @@
// PartialAttributeList ::= *SEQUENCE* OF SEQUENCE { (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_TAG][LdapConstants.SEQUENCE_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_TAG][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_VALUE, null );
@@ -168,7 +169,7 @@
// PartialAttributeList ::= *SEQUENCE* OF SEQUENCE { (Tag)
// ...
// We may have many attributes. Nothing to do
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_VALUE][LdapConstants.SEQUENCE_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_VALUE][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTES_VALUE,
LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_TAG, null );
@@ -176,7 +177,7 @@
// PartialAttributeList ::= SEQUENCE OF *SEQUENCE* { (Tag)
// ...
// Nothing to do
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_TAG][LdapConstants.SEQUENCE_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_TAG][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_VALUE, null );
@@ -186,7 +187,7 @@
// PartialAttributeList ::= SEQUENCE OF *SEQUENCE* { (Tag)
// ...
// Loop.
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG][LdapConstants.SEQUENCE_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_VALUE, null );
@@ -194,7 +195,7 @@
// PartialAttributeList ::= SEQUENCE OF *SEQUENCE* { (Value)
// ...
// We may have many attributes. We also have to store a previously decoded AttributeValue
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_VALUE][LdapConstants.SEQUENCE_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_VALUE][UniversalTag.SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_VALUE,
LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_TAG,
@@ -218,7 +219,7 @@
// type AttributeDescription, (Tag)
// ...
// Nothing to do.
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_VALUE, null );
@@ -227,7 +228,7 @@
// type AttributeDescription, (Value)
// ...
// Store the attribute's name.
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_TYPE_VALUE,
LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_TAG,
@@ -263,7 +264,7 @@
// ...
// vals *SET OF* AttributeValue} (Tag)
// Nothing to do
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_TAG][LdapConstants.SET_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_TAG][UniversalTag.SET_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_VALUE, null );
@@ -272,7 +273,7 @@
// ...
// vals *SET OF* AttributeValue} (Value)
// We may have many values. Nothing to do
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_VALUE][LdapConstants.SET_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_VALUE][UniversalTag.SET_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_VALS_VALUE,
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_TAG, null );
@@ -281,7 +282,7 @@
// ...
// vals SET OF *AttributeValue*} (Tag)
// Nothing to do
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_VALUE, null );
@@ -290,7 +291,7 @@
// ...
// vals SET OF *AttributeValue*} (Tag)
// The loop.
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG,
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_VALUE, null );
@@ -299,7 +300,7 @@
// ...
// vals SET OF *AttributeValue*} (Value)
// We may have many values. Store the current one in the current Attribute Value
- super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_VALUE][LdapConstants.OCTET_STRING_TAG] =
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_VALUE][UniversalTag.OCTET_STRING_TAG] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_VALUE,
LdapStatesEnum.SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG,
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultReferenceGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultReferenceGrammar.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultReferenceGrammar.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/SearchResultReferenceGrammar.java Sun Jul 31 14:17:34 2005
@@ -23,6 +23,7 @@
import org.apache.asn1.ber.grammar.GrammarTransition;
import org.apache.asn1.ber.grammar.IGrammar;
import org.apache.asn1.ber.tlv.TLV;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.LdapMessageContainer;
import org.apache.asn1.ldap.codec.primitives.LdapURL;
@@ -100,17 +101,17 @@
} );
// LDAPURL (Tag)
- super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_TAG][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_TAG, LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_VALUE,
null );
// LDAPURL loop (Tag)
- super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_LOOP_OR_END_TAG][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_LOOP_OR_END_TAG][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_REFERENCE_LOOP_OR_END_TAG, LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_VALUE,
null );
// LDAPURL (Value)
- super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_VALUE][LdapConstants.OCTET_STRING_TAG] = new GrammarTransition(
+ super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_VALUE][UniversalTag.OCTET_STRING_TAG] = new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_REFERENCE_LDAP_URL_VALUE,
LdapStatesEnum.SEARCH_RESULT_REFERENCE_LOOP_OR_END_TAG,
new GrammarAction( "Store ldapUrl value" )
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AddRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AddRequest.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AddRequest.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AddRequest.java Sun Jul 31 14:17:34 2005
@@ -19,6 +19,7 @@
import org.apache.asn1.Asn1Object;
import org.apache.asn1.EncoderException;
import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
@@ -307,7 +308,7 @@
Value.encode( buffer, entry );
// The attributes sequence
- buffer.put( LdapConstants.SEQUENCE_TAG );
+ buffer.put( UniversalTag.SEQUENCE_TAG );
buffer.put( Length.getBytes( attributesLength ) ) ;
// The partial attribute list
@@ -322,7 +323,7 @@
Attribute attribute = (Attribute)attributeIterator.next();
// The attributes list sequence
- buffer.put( LdapConstants.SEQUENCE_TAG );
+ buffer.put( UniversalTag.SEQUENCE_TAG );
int localAttributeLength = ( (Integer)attributeLength.get( attributeNumber ) ).intValue();
buffer.put( Length.getBytes( localAttributeLength ) );
@@ -330,7 +331,7 @@
Value.encode( buffer, attribute.getID() );
// The values
- buffer.put( LdapConstants.SET_TAG );
+ buffer.put( UniversalTag.SET_TAG );
int localValuesLength = ( (Integer)valuesLength.get( attributeNumber ) ).intValue();
buffer.put( Length.getBytes( localValuesLength ) );
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/CompareRequest.java Sun Jul 31 14:17:34 2005
@@ -21,6 +21,7 @@
import org.apache.asn1.EncoderException;
import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
@@ -203,7 +204,7 @@
Value.encode( buffer, entry );
// The attributeValueAssertion sequence Tag
- buffer.put( LdapConstants.SEQUENCE_TAG );
+ buffer.put( UniversalTag.SEQUENCE_TAG );
buffer.put( Length.getBytes( avaLength ) ) ;
}
catch ( BufferOverflowException boe )
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java Sun Jul 31 14:17:34 2005
@@ -19,6 +19,7 @@
import org.apache.asn1.Asn1Object;
import org.apache.asn1.EncoderException;
import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
@@ -457,7 +458,7 @@
try
{
// The LdapMessage Sequence
- bb.put( LdapConstants.SEQUENCE_TAG );
+ bb.put( UniversalTag.SEQUENCE_TAG );
// The length has been calculated by the computeLength method
bb.put( Length.getBytes( ldapMessageLength ) );
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapResult.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapResult.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapResult.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapResult.java Sun Jul 31 14:17:34 2005
@@ -19,6 +19,7 @@
import org.apache.asn1.Asn1Object;
import org.apache.asn1.EncoderException;
import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
@@ -271,7 +272,7 @@
try
{
// The result code
- buffer.put( LdapConstants.ENUMERATED_TAG );
+ buffer.put( UniversalTag.ENUMERATED_TAG );
buffer.put( ( byte ) 1 );
buffer.put( ( byte ) resultCode );
}
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultEntry.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultEntry.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultEntry.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultEntry.java Sun Jul 31 14:17:34 2005
@@ -19,6 +19,7 @@
import org.apache.asn1.Asn1Object;
import org.apache.asn1.EncoderException;
import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
@@ -328,7 +329,7 @@
Value.encode( buffer, objectName );
// The attributes sequence
- buffer.put( LdapConstants.SEQUENCE_TAG );
+ buffer.put( UniversalTag.SEQUENCE_TAG );
buffer.put( Length.getBytes( attributesLength ) ) ;
// The partial attribute list
@@ -343,7 +344,7 @@
Attribute attribute = (Attribute)attributeIterator.next();
// The partial attribute list sequence
- buffer.put( LdapConstants.SEQUENCE_TAG );
+ buffer.put( UniversalTag.SEQUENCE_TAG );
int localAttributeLength = ( (Integer)attributeLength.get( attributeNumber ) ).intValue();
buffer.put( Length.getBytes( localAttributeLength ) );
@@ -351,7 +352,7 @@
Value.encode( buffer, attribute.getID() );
// The values
- buffer.put( LdapConstants.SET_TAG );
+ buffer.put( UniversalTag.SET_TAG );
int localValuesLength = ( (Integer)valsLength.get( attributeNumber ) ).intValue();
buffer.put( Length.getBytes( localValuesLength ) );
Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultReference.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultReference.java?rev=226696&r1=226695&r2=226696&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultReference.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SearchResultReference.java Sun Jul 31 14:17:34 2005
@@ -19,6 +19,7 @@
import org.apache.asn1.Asn1Object;
import org.apache.asn1.EncoderException;
import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
import org.apache.asn1.ldap.codec.LdapConstants;
import org.apache.asn1.ldap.codec.primitives.LdapURL;
@@ -143,9 +144,7 @@
LdapURL reference = ((LdapURL)referencesIterator.next());
// Encode the reference
- buffer.put( LdapConstants.OCTET_STRING_TAG );
- buffer.put( Length.getBytes( reference.getLength() ) );
- buffer.put( reference.getData() );
+ Value.encode( buffer, reference );
}
}
catch ( BufferOverflowException boe )