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