001    /*
002     *  Licensed to the Apache Software Foundation (ASF) under one
003     *  or more contributor license agreements.  See the NOTICE file
004     *  distributed with this work for additional information
005     *  regarding copyright ownership.  The ASF licenses this file
006     *  to you under the Apache License, Version 2.0 (the
007     *  "License"); you may not use this file except in compliance
008     *  with the License.  You may obtain a copy of the License at
009     *  
010     *    http://www.apache.org/licenses/LICENSE-2.0
011     *  
012     *  Unless required by applicable law or agreed to in writing,
013     *  software distributed under the License is distributed on an
014     *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015     *  KIND, either express or implied.  See the License for the
016     *  specific language governing permissions and limitations
017     *  under the License. 
018     *  
019     */
020    package org.apache.directory.shared.ldap.codec;
021    
022    
023    /**
024     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
025     * @version $Rev: 910150 $, $Date: 2010-02-15 02:37:34 +0100 (Mon, 15 Feb 2010) $, 
026     */
027    public class LdapConstants
028    {
029        /** The scope constants */
030        public static final int SCOPE_BASE_OBJECT = 0;
031    
032        public static final int SCOPE_SINGLE_LEVEL = 1;
033    
034        public static final int SCOPE_WHOLE_SUBTREE = 2;
035    
036        /** The DerefAlias constants */
037        public static final int NEVER_DEREF_ALIASES = 0;
038    
039        public static final int DEREF_IN_SEARCHING = 1;
040    
041        public static final int DEREF_FINDING_BASE_OBJ = 2;
042    
043        public static final int DEREF_ALWAYS = 3;
044    
045        /** The operations */
046        public static final int OPERATION_ADD = 0;
047    
048        public static final int OPERATION_DELETE = 1;
049    
050        public static final int OPERATION_REPLACE = 2;
051    
052        /** The filters */
053        public static final int EQUALITY_MATCH_FILTER = 0;
054    
055        public static final int GREATER_OR_EQUAL_FILTER = 1;
056    
057        public static final int LESS_OR_EQUAL_FILTER = 2;
058    
059        public static final int APPROX_MATCH_FILTER = 3;
060    
061        /** LDAP contextual tags */
062        public static final byte UNBIND_REQUEST_TAG = 0x42;
063    
064        public static final byte DEL_REQUEST_TAG = 0x4A;
065    
066        public static final byte ABANDON_REQUEST_TAG = 0x50;
067    
068        public static final byte BIND_REQUEST_TAG = 0x60;
069    
070        public static final byte BIND_RESPONSE_TAG = 0x61;
071    
072        public static final byte SEARCH_REQUEST_TAG = 0x63;
073    
074        public static final byte SEARCH_RESULT_ENTRY_TAG = 0x64;
075    
076        public static final byte SEARCH_RESULT_DONE_TAG = 0x65;
077    
078        public static final byte MODIFY_REQUEST_TAG = 0x66;
079    
080        public static final byte MODIFY_RESPONSE_TAG = 0x67;
081    
082        public static final byte ADD_REQUEST_TAG = 0x68;
083    
084        public static final byte ADD_RESPONSE_TAG = 0x69;
085    
086        public static final byte DEL_RESPONSE_TAG = 0x6B;
087    
088        public static final byte MODIFY_DN_REQUEST_TAG = 0x6C;
089    
090        public static final byte MODIFY_DN_RESPONSE_TAG = 0x6D;
091    
092        public static final byte COMPARE_REQUEST_TAG = 0x6E;
093    
094        public static final byte COMPARE_RESPONSE_TAG = 0x6F;
095    
096        public static final byte SEARCH_RESULT_REFERENCE_TAG = 0x73;
097    
098        public static final byte EXTENDED_REQUEST_TAG = 0x77;
099    
100        public static final byte EXTENDED_RESPONSE_TAG = 0x78;
101    
102        public static final byte INTERMEDIATE_RESPONSE_TAG = 0x79;
103    
104        // The following tags are ints, because bytes above 127 are negative
105        // numbers, and we can't use them as array indexes.
106        public static final int BIND_REQUEST_SIMPLE_TAG = 0x80;
107    
108        public static final int EXTENDED_REQUEST_NAME_TAG = 0x80;
109    
110        public static final int MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG = 0x80;
111    
112        public static final int SUBSTRINGS_FILTER_INITIAL_TAG = 0x80;
113    
114        public static final int EXTENDED_REQUEST_VALUE_TAG = 0x81;
115    
116        public static final int MATCHING_RULE_ID_TAG = 0x81;
117    
118        public static final int SUBSTRINGS_FILTER_ANY_TAG = 0x81;
119    
120        public static final int MATCHING_RULE_TYPE_TAG = 0x82;
121    
122        public static final int SUBSTRINGS_FILTER_FINAL_TAG = 0x82;
123    
124        public static final int MATCH_VALUE_TAG = 0x83;
125    
126        public static final int DN_ATTRIBUTES_FILTER_TAG = 0x84;
127    
128        public static final int SERVER_SASL_CREDENTIAL_TAG = 0x87;
129    
130        public static final int PRESENT_FILTER_TAG = 0x87;
131    
132        public static final int EXTENDED_RESPONSE_RESPONSE_NAME_TAG = 0x8A;
133    
134        public static final int EXTENDED_RESPONSE_RESPONSE_TAG = 0x8B;
135    
136        public static final int CONTROLS_TAG = 0xA0;
137    
138        public static final int AND_FILTER_TAG = 0xA0;
139    
140        public static final int INTERMEDIATE_RESPONSE_NAME_TAG = 0x80;
141    
142        public static final int INTERMEDIATE_RESPONSE_VALUE_TAG = 0x81;
143    
144        public static final int OR_FILTER_TAG = 0xA1;
145    
146        public static final int NOT_FILTER_TAG = 0xA2;
147    
148        public static final int BIND_REQUEST_SASL_TAG = 0xA3;
149    
150        public static final int LDAP_RESULT_REFERRAL_SEQUENCE_TAG = 0xA3;
151    
152        public static final int EQUALITY_MATCH_FILTER_TAG = 0xA3;
153    
154        public static final int SUBSTRINGS_FILTER_TAG = 0xA4;
155    
156        public static final int GREATER_OR_EQUAL_FILTER_TAG = 0xA5;
157    
158        public static final int LESS_OR_EQUAL_FILTER_TAG = 0xA6;
159    
160        public static final int APPROX_MATCH_FILTER_TAG = 0xA8;
161    
162        public static final int EXTENSIBLE_MATCH_FILTER_TAG = 0xA9;
163    
164        // The messages types
165        /*
166        public static final int ABANDON_REQUEST = 0;
167    
168        public static final int ADD_REQUEST = 1;
169    
170        public static final int ADD_RESPONSE = 2;
171    
172        public static final int BIND_REQUEST = 3;
173    
174        public static final int BIND_RESPONSE = 4;
175    
176        public static final int COMPARE_REQUEST = 5;
177    
178        public static final int COMPARE_RESPONSE = 6;
179    
180        public static final int DEL_REQUEST = 7;
181    
182        public static final int DEL_RESPONSE = 8;
183    
184        public static final int EXTENDED_REQUEST = 9;
185    
186        public static final int EXTENDED_RESPONSE = 10;
187    
188        public static final int MODIFYDN_REQUEST = 11;
189    
190        public static final int MODIFYDN_RESPONSE = 12;
191    
192        public static final int MODIFY_REQUEST = 13;
193    
194        public static final int MODIFY_RESPONSE = 14;
195    
196        public static final int SEARCH_REQUEST = 15;
197    
198        public static final int SEARCH_RESULT_DONE = 16;
199    
200        public static final int SEARCH_RESULT_ENTRY = 17;
201    
202        public static final int SEARCH_RESULT_REFERENCE = 18;
203    
204        public static final int UNBIND_REQUEST = 19;
205        
206        public static final int INTERMEDIATE_RESPONSE = 20;
207    
208        public static final int UNKNOWN = -1; // Just in case ...
209        */
210    }