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 2006/09/07 07:26:32 UTC

svn commit: r440978 - /directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/asn1ber/messages/LdapBerTags.java

Author: elecharny
Date: Wed Sep  6 22:26:31 2006
New Revision: 440978

URL: http://svn.apache.org/viewvc?view=rev&rev=440978
Log:
Added a first version of this enum which will partially replace the previous LdapConstants

Added:
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/asn1ber/messages/LdapBerTags.java

Added: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/asn1ber/messages/LdapBerTags.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/asn1ber/messages/LdapBerTags.java?view=auto&rev=440978
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/asn1ber/messages/LdapBerTags.java (added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/asn1ber/messages/LdapBerTags.java Wed Sep  6 22:26:31 2006
@@ -0,0 +1,196 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.codec.asn1ber.messages;
+
+/**
+ * Tags of all the Ldap TLVs
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum LdapBerTags
+{
+    /** 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;
+    */
+    BIND_REQUEST_TAG( (byte)0x60 ),
+    /*
+    public static final byte BIND_RESPONSE_TAG = 0x61;
+
+    public static final byte SEARCH_REQUEST_TAG = 0x63;
+
+    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;
+
+    // The following tags are ints, because bytes above 127 are negative
+    // numbers, and we can't use them as array indexes.
+     * */
+    
+    BIND_REQUEST_SIMPLE_TAG( (byte)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 SUBSTRINGS_FILTER_INITIAL_TAG = 0x80;
+
+    public static final int EXTENDED_REQUEST_VALUE_TAG = 0x81;
+
+    public static final int SEARCH_MATCHING_RULE_TAG = 0x81;
+
+    public static final int SUBSTRINGS_FILTER_ANY_TAG = 0x81;
+
+    public static final int MATCHING_RULE_ASSERTION_TYPE_TAG = 0x82;
+
+    public static final int SUBSTRINGS_FILTER_FINAL_TAG = 0x82;
+
+    public static final int SEARCH_MATCH_VALUE_TAG = 0x83;
+
+    public static final int DN_ATTRIBUTES_FILTER_TAG = 0x84;
+
+    public static final int SERVER_SASL_CREDENTIAL_TAG = 0x87;
+
+    public static final int PRESENT_FILTER_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_TAG = 0xA0;
+
+    public static final int AND_FILTER_TAG = 0xA0;
+
+    public static final int OR_FILTER_TAG = 0xA1;
+
+    public static final int NOT_FILTER_TAG = 0xA2;
+    */
+    
+    BIND_REQUEST_SASL_TAG( (byte)0xA3 );
+
+    /*
+    public static final int LDAP_RESULT_REFERRAL_SEQUENCE_TAG = 0xA3;
+
+    public static final int EQUALITY_MATCH_FILTER_TAG = 0xA3;
+
+    public static final int SUBSTRINGS_FILTER_TAG = 0xA4;
+
+    public static final int GREATER_OR_EQUAL_FILTER_TAG = 0xA5;
+
+    public static final int LESS_OR_EQUAL_FILTER_TAG = 0xA6;
+
+    public static final int APPROX_MATCH_FILTER_TAG = 0xA8;
+
+    public static final int EXTENSIBLE_MATCH_FILTER_TAG = 0xA9;
+
+    // The messages types
+    public static final int ABANDON_REQUEST = 0;
+
+    public static final int ADD_REQUEST = 1;
+
+    public static final int ADD_RESPONSE = 2;
+
+    public static final int BIND_REQUEST = 3;
+
+    public static final int BIND_RESPONSE = 4;
+
+    public static final int COMPARE_REQUEST = 5;
+
+    public static final int COMPARE_RESPONSE = 6;
+
+    public static final int DEL_REQUEST = 7;
+
+    public static final int DEL_RESPONSE = 8;
+
+    public static final int EXTENDED_REQUEST = 9;
+
+    public static final int EXTENDED_RESPONSE = 10;
+
+    public static final int MODIFYDN_REQUEST = 11;
+
+    public static final int MODIFYDN_RESPONSE = 12;
+
+    public static final int MODIFY_REQUEST = 13;
+
+    public static final int MODIFY_RESPONSE = 14;
+
+    public static final int SEARCH_REQUEST = 15;
+
+    public static final int SEARCH_RESULT_DONE = 16;
+
+    public static final int SEARCH_RESULT_ENTRY = 17;
+
+    public static final int SEARCH_RESULT_REFERENCE = 18;
+
+    public static final int UNBIND_REQUEST = 19;
+
+    public static final int UNKNOWN = -1; // Just in case ...
+    */
+    
+    /** Tha tag value **/
+    private byte value;
+    
+    /**
+     * Creates a new instance of LdapBerTags.
+     *
+     * @param value The tag value
+     */
+    private LdapBerTags( byte value )
+    {
+        this.value = value;
+    }
+    
+    /**
+     * @return The byte for this tag
+     */
+    public byte getValue()
+    {
+        return value;
+    }
+}