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