View Javadoc
1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  package org.apache.directory.api.ldap.codec.api;
21  
22  
23  /**
24   * This class contains a list of constants used in the LDAP coder/decoder.
25   * 
26   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
27   */
28  public final class LdapCodecConstants
29  {
30      /** The scope constants */
31      public static final int SCOPE_BASE_OBJECT = 0;
32  
33      public static final int SCOPE_SINGLE_LEVEL = 1;
34  
35      public static final int SCOPE_WHOLE_SUBTREE = 2;
36  
37      /** The DerefAlias constants */
38      public static final int NEVER_DEREF_ALIASES = 0;
39  
40      public static final int DEREF_IN_SEARCHING = 1;
41  
42      public static final int DEREF_FINDING_BASE_OBJ = 2;
43  
44      public static final int DEREF_ALWAYS = 3;
45  
46      /** The operations */
47      public static final int OPERATION_ADD = 0;
48  
49      public static final int OPERATION_DELETE = 1;
50  
51      public static final int OPERATION_REPLACE = 2;
52  
53      /** The filters */
54      public static final int EQUALITY_MATCH_FILTER = 0;
55  
56      public static final int GREATER_OR_EQUAL_FILTER = 1;
57  
58      public static final int LESS_OR_EQUAL_FILTER = 2;
59  
60      public static final int APPROX_MATCH_FILTER = 3;
61  
62      /** LDAP contextual tags */
63      public static final byte UNBIND_REQUEST_TAG = 0x42;
64  
65      public static final byte DEL_REQUEST_TAG = 0x4A;
66  
67      public static final byte ABANDON_REQUEST_TAG = 0x50;
68  
69      public static final byte BIND_REQUEST_TAG = 0x60;
70  
71      public static final byte BIND_RESPONSE_TAG = 0x61;
72  
73      public static final byte SEARCH_REQUEST_TAG = 0x63;
74  
75      public static final byte SEARCH_RESULT_ENTRY_TAG = 0x64;
76  
77      public static final byte SEARCH_RESULT_DONE_TAG = 0x65;
78  
79      public static final byte MODIFY_REQUEST_TAG = 0x66;
80  
81      public static final byte MODIFY_RESPONSE_TAG = 0x67;
82  
83      public static final byte ADD_REQUEST_TAG = 0x68;
84  
85      public static final byte ADD_RESPONSE_TAG = 0x69;
86  
87      public static final byte DEL_RESPONSE_TAG = 0x6B;
88  
89      public static final byte MODIFY_DN_REQUEST_TAG = 0x6C;
90  
91      public static final byte MODIFY_DN_RESPONSE_TAG = 0x6D;
92  
93      public static final byte COMPARE_REQUEST_TAG = 0x6E;
94  
95      public static final byte COMPARE_RESPONSE_TAG = 0x6F;
96  
97      public static final byte SEARCH_RESULT_REFERENCE_TAG = 0x73;
98  
99      public static final byte EXTENDED_REQUEST_TAG = 0x77;
100 
101     public static final byte EXTENDED_RESPONSE_TAG = 0x78;
102 
103     public static final byte INTERMEDIATE_RESPONSE_TAG = 0x79;
104 
105     // The following tags are ints, because bytes above 127 are negative
106     // numbers, and we can't use them as array indexes.
107     public static final int BIND_REQUEST_SIMPLE_TAG = 0x80;
108 
109     public static final int EXTENDED_REQUEST_NAME_TAG = 0x80;
110 
111     public static final int MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG = 0x80;
112 
113     public static final int SUBSTRINGS_FILTER_INITIAL_TAG = 0x80;
114 
115     public static final int EXTENDED_REQUEST_VALUE_TAG = 0x81;
116 
117     public static final int MATCHING_RULE_ID_TAG = 0x81;
118 
119     public static final int SUBSTRINGS_FILTER_ANY_TAG = 0x81;
120 
121     public static final int MATCHING_RULE_TYPE_TAG = 0x82;
122 
123     public static final int SUBSTRINGS_FILTER_FINAL_TAG = 0x82;
124 
125     public static final int MATCH_VALUE_TAG = 0x83;
126 
127     public static final int DN_ATTRIBUTES_FILTER_TAG = 0x84;
128 
129     public static final int SERVER_SASL_CREDENTIAL_TAG = 0x87;
130 
131     public static final int PRESENT_FILTER_TAG = 0x87;
132 
133     public static final int EXTENDED_RESPONSE_RESPONSE_NAME_TAG = 0x8A;
134 
135     public static final int EXTENDED_RESPONSE_RESPONSE_TAG = 0x8B;
136 
137     public static final int CONTROLS_TAG = 0xA0;
138 
139     public static final int AND_FILTER_TAG = 0xA0;
140 
141     public static final int INTERMEDIATE_RESPONSE_NAME_TAG = 0x80;
142 
143     public static final int INTERMEDIATE_RESPONSE_VALUE_TAG = 0x81;
144 
145     public static final int OR_FILTER_TAG = 0xA1;
146 
147     public static final int NOT_FILTER_TAG = 0xA2;
148 
149     public static final int BIND_REQUEST_SASL_TAG = 0xA3;
150 
151     public static final int LDAP_RESULT_REFERRAL_SEQUENCE_TAG = 0xA3;
152 
153     public static final int EQUALITY_MATCH_FILTER_TAG = 0xA3;
154 
155     public static final int SUBSTRINGS_FILTER_TAG = 0xA4;
156 
157     public static final int GREATER_OR_EQUAL_FILTER_TAG = 0xA5;
158 
159     public static final int LESS_OR_EQUAL_FILTER_TAG = 0xA6;
160 
161     public static final int APPROX_MATCH_FILTER_TAG = 0xA8;
162 
163     public static final int EXTENSIBLE_MATCH_FILTER_TAG = 0xA9;
164 
165     
166     /**
167      * Private constructor.
168      */
169     private LdapCodecConstants()
170     {
171     }
172 }