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 */
020package org.apache.directory.api.ldap.codec.api;
021
022
023/**
024 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
025 */
026public final class LdapConstants
027{
028    /**
029     * Private constructor.
030     */
031    private LdapConstants()
032    {
033    }
034
035    /** The scope constants */
036    public static final int SCOPE_BASE_OBJECT = 0;
037
038    public static final int SCOPE_SINGLE_LEVEL = 1;
039
040    public static final int SCOPE_WHOLE_SUBTREE = 2;
041
042    /** The DerefAlias constants */
043    public static final int NEVER_DEREF_ALIASES = 0;
044
045    public static final int DEREF_IN_SEARCHING = 1;
046
047    public static final int DEREF_FINDING_BASE_OBJ = 2;
048
049    public static final int DEREF_ALWAYS = 3;
050
051    /** The operations */
052    public static final int OPERATION_ADD = 0;
053
054    public static final int OPERATION_DELETE = 1;
055
056    public static final int OPERATION_REPLACE = 2;
057
058    /** The filters */
059    public static final int EQUALITY_MATCH_FILTER = 0;
060
061    public static final int GREATER_OR_EQUAL_FILTER = 1;
062
063    public static final int LESS_OR_EQUAL_FILTER = 2;
064
065    public static final int APPROX_MATCH_FILTER = 3;
066
067    /** LDAP contextual tags */
068    public static final byte UNBIND_REQUEST_TAG = 0x42;
069
070    public static final byte DEL_REQUEST_TAG = 0x4A;
071
072    public static final byte ABANDON_REQUEST_TAG = 0x50;
073
074    public static final byte BIND_REQUEST_TAG = 0x60;
075
076    public static final byte BIND_RESPONSE_TAG = 0x61;
077
078    public static final byte SEARCH_REQUEST_TAG = 0x63;
079
080    public static final byte SEARCH_RESULT_ENTRY_TAG = 0x64;
081
082    public static final byte SEARCH_RESULT_DONE_TAG = 0x65;
083
084    public static final byte MODIFY_REQUEST_TAG = 0x66;
085
086    public static final byte MODIFY_RESPONSE_TAG = 0x67;
087
088    public static final byte ADD_REQUEST_TAG = 0x68;
089
090    public static final byte ADD_RESPONSE_TAG = 0x69;
091
092    public static final byte DEL_RESPONSE_TAG = 0x6B;
093
094    public static final byte MODIFY_DN_REQUEST_TAG = 0x6C;
095
096    public static final byte MODIFY_DN_RESPONSE_TAG = 0x6D;
097
098    public static final byte COMPARE_REQUEST_TAG = 0x6E;
099
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}