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      /**
31       * Private constructor.
32       */
33      private LdapCodecConstants()
34      {
35      }
36  
37      /** The scope constants */
38      public static final int SCOPE_BASE_OBJECT = 0;
39  
40      public static final int SCOPE_SINGLE_LEVEL = 1;
41  
42      public static final int SCOPE_WHOLE_SUBTREE = 2;
43  
44      /** The DerefAlias constants */
45      public static final int NEVER_DEREF_ALIASES = 0;
46  
47      public static final int DEREF_IN_SEARCHING = 1;
48  
49      public static final int DEREF_FINDING_BASE_OBJ = 2;
50  
51      public static final int DEREF_ALWAYS = 3;
52  
53      /** The operations */
54      public static final int OPERATION_ADD = 0;
55  
56      public static final int OPERATION_DELETE = 1;
57  
58      public static final int OPERATION_REPLACE = 2;
59  
60      /** The filters */
61      public static final int EQUALITY_MATCH_FILTER = 0;
62  
63      public static final int GREATER_OR_EQUAL_FILTER = 1;
64  
65      public static final int LESS_OR_EQUAL_FILTER = 2;
66  
67      public static final int APPROX_MATCH_FILTER = 3;
68  
69      /** LDAP contextual tags */
70      public static final byte UNBIND_REQUEST_TAG = 0x42;
71  
72      public static final byte DEL_REQUEST_TAG = 0x4A;
73  
74      public static final byte ABANDON_REQUEST_TAG = 0x50;
75  
76      public static final byte BIND_REQUEST_TAG = 0x60;
77  
78      public static final byte BIND_RESPONSE_TAG = 0x61;
79  
80      public static final byte SEARCH_REQUEST_TAG = 0x63;
81  
82      public static final byte SEARCH_RESULT_ENTRY_TAG = 0x64;
83  
84      public static final byte SEARCH_RESULT_DONE_TAG = 0x65;
85  
86      public static final byte MODIFY_REQUEST_TAG = 0x66;
87  
88      public static final byte MODIFY_RESPONSE_TAG = 0x67;
89  
90      public static final byte ADD_REQUEST_TAG = 0x68;
91  
92      public static final byte ADD_RESPONSE_TAG = 0x69;
93  
94      public static final byte DEL_RESPONSE_TAG = 0x6B;
95  
96      public static final byte MODIFY_DN_REQUEST_TAG = 0x6C;
97  
98      public static final byte MODIFY_DN_RESPONSE_TAG = 0x6D;
99  
100     public static final byte COMPARE_REQUEST_TAG = 0x6E;
101 
102     public static final byte COMPARE_RESPONSE_TAG = 0x6F;
103 
104     public static final byte SEARCH_RESULT_REFERENCE_TAG = 0x73;
105 
106     public static final byte EXTENDED_REQUEST_TAG = 0x77;
107 
108     public static final byte EXTENDED_RESPONSE_TAG = 0x78;
109 
110     public static final byte INTERMEDIATE_RESPONSE_TAG = 0x79;
111 
112     // The following tags are ints, because bytes above 127 are negative
113     // numbers, and we can't use them as array indexes.
114     public static final int BIND_REQUEST_SIMPLE_TAG = 0x80;
115 
116     public static final int EXTENDED_REQUEST_NAME_TAG = 0x80;
117 
118     public static final int MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG = 0x80;
119 
120     public static final int SUBSTRINGS_FILTER_INITIAL_TAG = 0x80;
121 
122     public static final int EXTENDED_REQUEST_VALUE_TAG = 0x81;
123 
124     public static final int MATCHING_RULE_ID_TAG = 0x81;
125 
126     public static final int SUBSTRINGS_FILTER_ANY_TAG = 0x81;
127 
128     public static final int MATCHING_RULE_TYPE_TAG = 0x82;
129 
130     public static final int SUBSTRINGS_FILTER_FINAL_TAG = 0x82;
131 
132     public static final int MATCH_VALUE_TAG = 0x83;
133 
134     public static final int DN_ATTRIBUTES_FILTER_TAG = 0x84;
135 
136     public static final int SERVER_SASL_CREDENTIAL_TAG = 0x87;
137 
138     public static final int PRESENT_FILTER_TAG = 0x87;
139 
140     public static final int EXTENDED_RESPONSE_RESPONSE_NAME_TAG = 0x8A;
141 
142     public static final int EXTENDED_RESPONSE_RESPONSE_TAG = 0x8B;
143 
144     public static final int CONTROLS_TAG = 0xA0;
145 
146     public static final int AND_FILTER_TAG = 0xA0;
147 
148     public static final int INTERMEDIATE_RESPONSE_NAME_TAG = 0x80;
149 
150     public static final int INTERMEDIATE_RESPONSE_VALUE_TAG = 0x81;
151 
152     public static final int OR_FILTER_TAG = 0xA1;
153 
154     public static final int NOT_FILTER_TAG = 0xA2;
155 
156     public static final int BIND_REQUEST_SASL_TAG = 0xA3;
157 
158     public static final int LDAP_RESULT_REFERRAL_SEQUENCE_TAG = 0xA3;
159 
160     public static final int EQUALITY_MATCH_FILTER_TAG = 0xA3;
161 
162     public static final int SUBSTRINGS_FILTER_TAG = 0xA4;
163 
164     public static final int GREATER_OR_EQUAL_FILTER_TAG = 0xA5;
165 
166     public static final int LESS_OR_EQUAL_FILTER_TAG = 0xA6;
167 
168     public static final int APPROX_MATCH_FILTER_TAG = 0xA8;
169 
170     public static final int EXTENSIBLE_MATCH_FILTER_TAG = 0xA9;
171 }