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; 021 022 023import static org.apache.directory.api.asn1.ber.tlv.UniversalTag.BOOLEAN; 024import static org.apache.directory.api.asn1.ber.tlv.UniversalTag.ENUMERATED; 025import static org.apache.directory.api.asn1.ber.tlv.UniversalTag.INTEGER; 026import static org.apache.directory.api.asn1.ber.tlv.UniversalTag.OCTET_STRING; 027import static org.apache.directory.api.asn1.ber.tlv.UniversalTag.SEQUENCE; 028import static org.apache.directory.api.asn1.ber.tlv.UniversalTag.SET; 029 030import org.apache.directory.api.asn1.actions.CheckNotNullLength; 031import org.apache.directory.api.asn1.ber.grammar.AbstractGrammar; 032import org.apache.directory.api.asn1.ber.grammar.Grammar; 033import org.apache.directory.api.asn1.ber.grammar.GrammarTransition; 034import org.apache.directory.api.ldap.codec.actions.AllowGrammarEnd; 035import org.apache.directory.api.ldap.codec.actions.CheckLengthNotNull; 036import org.apache.directory.api.ldap.codec.actions.controls.StoreControlName; 037import org.apache.directory.api.ldap.codec.actions.controls.InitControls; 038import org.apache.directory.api.ldap.codec.actions.controls.StoreControlCriticality; 039import org.apache.directory.api.ldap.codec.actions.controls.StoreControlValue; 040import org.apache.directory.api.ldap.codec.actions.ldapMessage.InitLdapMessage; 041import org.apache.directory.api.ldap.codec.actions.ldapMessage.StoreMessageId; 042import org.apache.directory.api.ldap.codec.actions.ldapResult.AddReferral; 043import org.apache.directory.api.ldap.codec.actions.ldapResult.InitReferrals; 044import org.apache.directory.api.ldap.codec.actions.ldapResult.StoreErrorMessage; 045import org.apache.directory.api.ldap.codec.actions.ldapResult.StoreMatchedDN; 046import org.apache.directory.api.ldap.codec.actions.ldapResult.StoreResultCode; 047import org.apache.directory.api.ldap.codec.actions.request.abandon.InitAbandonRequest; 048import org.apache.directory.api.ldap.codec.actions.request.add.AddAddRequestAttributeType; 049import org.apache.directory.api.ldap.codec.actions.request.add.AddAttributeValue; 050import org.apache.directory.api.ldap.codec.actions.request.add.InitAddRequest; 051import org.apache.directory.api.ldap.codec.actions.request.add.StoreAddRequestEntryName; 052import org.apache.directory.api.ldap.codec.actions.request.bind.InitBindRequest; 053import org.apache.directory.api.ldap.codec.actions.request.bind.InitSaslBind; 054import org.apache.directory.api.ldap.codec.actions.request.bind.StoreName; 055import org.apache.directory.api.ldap.codec.actions.request.bind.StoreSaslCredentials; 056import org.apache.directory.api.ldap.codec.actions.request.bind.StoreSaslMechanism; 057import org.apache.directory.api.ldap.codec.actions.request.bind.StoreSimpleAuth; 058import org.apache.directory.api.ldap.codec.actions.request.bind.StoreVersion; 059import org.apache.directory.api.ldap.codec.actions.request.compare.InitCompareRequest; 060import org.apache.directory.api.ldap.codec.actions.request.compare.StoreCompareRequestAssertionValue; 061import org.apache.directory.api.ldap.codec.actions.request.compare.StoreCompareRequestAttributeDesc; 062import org.apache.directory.api.ldap.codec.actions.request.compare.StoreCompareRequestEntryName; 063import org.apache.directory.api.ldap.codec.actions.request.del.InitDelRequest; 064import org.apache.directory.api.ldap.codec.actions.request.extended.InitExtendedRequest; 065import org.apache.directory.api.ldap.codec.actions.request.extended.StoreExtendedRequestName; 066import org.apache.directory.api.ldap.codec.actions.request.extended.StoreExtendedRequestValue; 067import org.apache.directory.api.ldap.codec.actions.request.modify.AddModifyRequestAttribute; 068import org.apache.directory.api.ldap.codec.actions.request.modify.InitAttributeVals; 069import org.apache.directory.api.ldap.codec.actions.request.modify.InitModifyRequest; 070import org.apache.directory.api.ldap.codec.actions.request.modify.StoreModifyRequestAttributeValue; 071import org.apache.directory.api.ldap.codec.actions.request.modify.StoreModifyRequestObjectName; 072import org.apache.directory.api.ldap.codec.actions.request.modify.StoreOperationType; 073import org.apache.directory.api.ldap.codec.actions.request.modifydn.InitModifyDnRequest; 074import org.apache.directory.api.ldap.codec.actions.request.modifydn.StoreModifyDnRequestDeleteOldRdn; 075import org.apache.directory.api.ldap.codec.actions.request.modifydn.StoreModifyDnRequestEntryName; 076import org.apache.directory.api.ldap.codec.actions.request.modifydn.StoreModifyDnRequestNewRdn; 077import org.apache.directory.api.ldap.codec.actions.request.modifydn.StoreModifyDnRequestNewSuperior; 078import org.apache.directory.api.ldap.codec.actions.request.search.InitSearchRequest; 079import org.apache.directory.api.ldap.codec.actions.request.search.InitSearchRequestAttributeDescList; 080import org.apache.directory.api.ldap.codec.actions.request.search.StoreSearchRequestAttributeDesc; 081import org.apache.directory.api.ldap.codec.actions.request.search.StoreSearchRequestBaseObject; 082import org.apache.directory.api.ldap.codec.actions.request.search.StoreSearchRequestDerefAlias; 083import org.apache.directory.api.ldap.codec.actions.request.search.StoreSearchRequestScope; 084import org.apache.directory.api.ldap.codec.actions.request.search.StoreSearchRequestSizeLimit; 085import org.apache.directory.api.ldap.codec.actions.request.search.StoreSearchRequestTimeLimit; 086import org.apache.directory.api.ldap.codec.actions.request.search.StoreSearchRequestTypesOnly; 087import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitAndFilter; 088import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitApproxMatchFilter; 089import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitAssertionValueFilter; 090import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitAttributeDescFilter; 091import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitEqualityMatchFilter; 092import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitExtensibleMatchFilter; 093import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitGreaterOrEqualFilter; 094import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitLessOrEqualFilter; 095import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitNotFilter; 096import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitOrFilter; 097import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitPresentFilter; 098import org.apache.directory.api.ldap.codec.actions.request.search.filter.InitSubstringsFilter; 099import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreAny; 100import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreFinal; 101import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreInitial; 102import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreMatchValue; 103import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreMatchingRuleDnAttributes; 104import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreMatchingRuleId; 105import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreSubstringFilterType; 106import org.apache.directory.api.ldap.codec.actions.request.search.filter.StoreMatchingRuleType; 107import org.apache.directory.api.ldap.codec.actions.request.unbind.InitUnbindRequest; 108import org.apache.directory.api.ldap.codec.actions.response.add.InitAddResponse; 109import org.apache.directory.api.ldap.codec.actions.response.bind.InitBindResponse; 110import org.apache.directory.api.ldap.codec.actions.response.bind.StoreServerSASLCreds; 111import org.apache.directory.api.ldap.codec.actions.response.compare.InitCompareResponse; 112import org.apache.directory.api.ldap.codec.actions.response.del.InitDelResponse; 113import org.apache.directory.api.ldap.codec.actions.response.extended.InitExtendedResponse; 114import org.apache.directory.api.ldap.codec.actions.response.extended.StoreExtendedResponseName; 115import org.apache.directory.api.ldap.codec.actions.response.extended.StoreExtendedResponseValue; 116import org.apache.directory.api.ldap.codec.actions.response.intermediate.InitIntermediateResponse; 117import org.apache.directory.api.ldap.codec.actions.response.intermediate.StoreIntermediateResponseName; 118import org.apache.directory.api.ldap.codec.actions.response.intermediate.StoreIntermediateResponseValue; 119import org.apache.directory.api.ldap.codec.actions.response.modify.InitModifyResponse; 120import org.apache.directory.api.ldap.codec.actions.response.modifydn.InitModifyDnResponse; 121import org.apache.directory.api.ldap.codec.actions.response.search.done.InitSearchResultDone; 122import org.apache.directory.api.ldap.codec.actions.response.search.entry.AddAttributeType; 123import org.apache.directory.api.ldap.codec.actions.response.search.entry.InitSearchResultEntry; 124import org.apache.directory.api.ldap.codec.actions.response.search.entry.StoreSearchResultAttributeValue; 125import org.apache.directory.api.ldap.codec.actions.response.search.entry.StoreSearchResultEntryObjectName; 126import org.apache.directory.api.ldap.codec.actions.response.search.reference.InitSearchResultReference; 127import org.apache.directory.api.ldap.codec.actions.response.search.reference.StoreReference; 128import org.apache.directory.api.ldap.codec.api.LdapCodecConstants; 129import org.apache.directory.api.ldap.codec.api.LdapMessageContainer; 130import org.apache.directory.api.ldap.model.message.AbstractMessage; 131import org.apache.directory.api.ldap.model.message.SearchRequest; 132import org.slf4j.Logger; 133import org.slf4j.LoggerFactory; 134 135 136/** 137 * This class implements the LdapMessage message. All the actions are declared 138 * in this class. As it is a singleton, these declaration are only done once. If 139 * an action is to be added or modified, this is where the work is to be done ! 140 * 141 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 142 */ 143public final class LdapMessageGrammar extends 144 AbstractGrammar<LdapMessageContainer<AbstractMessage>> 145{ 146 /** The logger */ 147 static final Logger LOG = LoggerFactory.getLogger( LdapMessageGrammar.class ); 148 149 /** The instance of grammar. LdapMessageGrammar is a singleton */ 150 private static Grammar<LdapMessageContainer<AbstractMessage>> instance = 151 new LdapMessageGrammar(); 152 153 154 /** 155 * Creates a new LdapMessageGrammar object. 156 */ 157 @SuppressWarnings( 158 { "unchecked", "rawtypes" }) 159 private LdapMessageGrammar() 160 { 161 162 setName( LdapMessageGrammar.class.getName() ); 163 164 // Create the transitions table 165 super.transitions = new GrammarTransition[LdapStatesEnum.LAST_LDAP_STATE.ordinal()][256]; 166 167 // ============================================================================================ 168 // Transition from START to LdapMessage 169 // ============================================================================================ 170 // This is the starting state : 171 // LDAPMessage --> SEQUENCE { ... 172 // 173 // We have a LDAPMessage, and the tag must be 0x30. 174 // 175 // The next state will be LDAP_MESSAGE_STATE 176 // 177 // We will just check that the length is not null 178 super.transitions[LdapStatesEnum.START_STATE.ordinal()][SEQUENCE.getValue()] = 179 new GrammarTransition( 180 LdapStatesEnum.START_STATE, 181 LdapStatesEnum.LDAP_MESSAGE_STATE, 182 SEQUENCE, 183 new InitLdapMessage() ); 184 185 // -------------------------------------------------------------------------------------------- 186 // Transition from LdapMessage to Message ID 187 // -------------------------------------------------------------------------------------------- 188 // LDAPMessage --> ... MessageId ... 189 // 190 // Checks that MessageId is in [0 .. 2147483647] and store the value in 191 // the LdapMessage Object 192 // 193 // (2147483647 = Integer.MAX_VALUE) 194 // The next state will be MESSAGE_ID_STATE 195 // 196 // The message ID will be temporarily stored in the container, because we can't store it 197 // into an object. 198 super.transitions[LdapStatesEnum.LDAP_MESSAGE_STATE.ordinal()][INTEGER.getValue()] = 199 new GrammarTransition( 200 LdapStatesEnum.LDAP_MESSAGE_STATE, 201 LdapStatesEnum.MESSAGE_ID_STATE, 202 INTEGER, 203 new StoreMessageId() ); 204 205 // ******************************************************************************************** 206 // We have a ProtocolOp : 207 // If the Tag is 0x42, then it's an UnBindRequest. 208 // If the Tag is 0x4A, then it's a DelRequest. 209 // If the Tag is 0x50, then it's an AbandonRequest. 210 // If the Tag is 0x60, then it's a BindRequest. 211 // If the Tag is 0x61, then it's a BindResponse. 212 // If the Tag is 0x63, then it's a SearchRequest. 213 // If the Tag is 0x64, then it's a SearchResultEntry. 214 // If the Tag is 0x65, then it's a SearchResultDone 215 // If the Tag is 0x66, then it's a ModifyRequest 216 // If the Tag is 0x67, then it's a ModifyResponse. 217 // If the Tag is 0x68, then it's an AddRequest. 218 // If the Tag is 0x69, then it's an AddResponse. 219 // If the Tag is 0x6B, then it's a DelResponse. 220 // If the Tag is 0x6C, then it's a ModifyDNRequest. 221 // If the Tag is 0x6D, then it's a ModifyDNResponse. 222 // If the Tag is 0x6E, then it's a CompareRequest 223 // If the Tag is 0x6F, then it's a CompareResponse. 224 // If the Tag is 0x73, then it's a SearchResultReference. 225 // If the Tag is 0x77, then it's an ExtendedRequest. 226 // If the Tag is 0x78, then it's an ExtendedResponse. 227 // 228 // We create the associated object in this transition, and store it into the container. 229 // ******************************************************************************************** 230 231 // -------------------------------------------------------------------------------------------- 232 // Transition from Message ID to UnBindRequest Message. 233 // -------------------------------------------------------------------------------------------- 234 // LdapMessage ::= ... UnBindRequest ... 235 // unbindRequest ::= [APPLICATION 2] NULL 236 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.UNBIND_REQUEST_TAG] = 237 new GrammarTransition( 238 LdapStatesEnum.MESSAGE_ID_STATE, 239 LdapStatesEnum.UNBIND_REQUEST_STATE, 240 LdapCodecConstants.UNBIND_REQUEST_TAG, 241 new InitUnbindRequest() ); 242 243 // -------------------------------------------------------------------------------------------- 244 // transition from UnBindRequest Message to Controls. 245 // -------------------------------------------------------------------------------------------- 246 // unbindRequest UnbindRequest, 247 // ... }, 248 // controls [0] Controls OPTIONAL } 249 // 250 super.transitions[LdapStatesEnum.UNBIND_REQUEST_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 251 new GrammarTransition( 252 LdapStatesEnum.UNBIND_REQUEST_STATE, 253 LdapStatesEnum.CONTROLS_STATE, 254 LdapCodecConstants.CONTROLS_TAG, 255 new InitControls() ); 256 257 // -------------------------------------------------------------------------------------------- 258 // Transition from Message ID to DelRequest Message. 259 // -------------------------------------------------------------------------------------------- 260 // LdapMessage ::= ... DelRequest ... 261 // delRequest ::= [APPLICATION 10] LDAPDN 262 // 263 // We store the Dn to bve deleted into the DelRequest object 264 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.DEL_REQUEST_TAG] = 265 new GrammarTransition( 266 LdapStatesEnum.MESSAGE_ID_STATE, 267 LdapStatesEnum.DEL_REQUEST_STATE, 268 LdapCodecConstants.DEL_REQUEST_TAG, 269 new InitDelRequest() ); 270 271 // -------------------------------------------------------------------------------------------- 272 // transition from DelRequest Message to Controls. 273 // -------------------------------------------------------------------------------------------- 274 // delRequest DelRequest, 275 // ... }, 276 // controls [0] Controls OPTIONAL } 277 // 278 super.transitions[LdapStatesEnum.DEL_REQUEST_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 279 new GrammarTransition( 280 LdapStatesEnum.DEL_REQUEST_STATE, 281 LdapStatesEnum.CONTROLS_STATE, 282 LdapCodecConstants.CONTROLS_TAG, 283 new InitControls() ); 284 285 // -------------------------------------------------------------------------------------------- 286 // Transition from Message ID to AbandonRequest Message. 287 // -------------------------------------------------------------------------------------------- 288 // LdapMessage ::= ... AbandonRequest ... 289 // AbandonRequest ::= [APPLICATION 16] MessageID 290 // 291 // Create the AbandonRequest object, and store the ID in it 292 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.ABANDON_REQUEST_TAG] = 293 new GrammarTransition( 294 LdapStatesEnum.MESSAGE_ID_STATE, 295 LdapStatesEnum.ABANDON_REQUEST_STATE, 296 LdapCodecConstants.ABANDON_REQUEST_TAG, 297 new InitAbandonRequest() ); 298 299 // -------------------------------------------------------------------------------------------- 300 // transition from AbandonRequest Message to Controls. 301 // -------------------------------------------------------------------------------------------- 302 // abandonRequest AbandonRequest, 303 // ... }, 304 // controls [0] Controls OPTIONAL } 305 // 306 super.transitions[LdapStatesEnum.ABANDON_REQUEST_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 307 new GrammarTransition( 308 LdapStatesEnum.ABANDON_REQUEST_STATE, 309 LdapStatesEnum.CONTROLS_STATE, 310 LdapCodecConstants.CONTROLS_TAG, 311 new InitControls() ); 312 313 // -------------------------------------------------------------------------------------------- 314 // Transition from Message ID to BindRequest Message. 315 // -------------------------------------------------------------------------------------------- 316 // LdapMessage ::= ... BindRequest ... 317 // BindRequest ::= [APPLICATION 0] SEQUENCE { ... 318 // 319 // We have to allocate a BindRequest 320 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.BIND_REQUEST_TAG] = 321 new GrammarTransition( 322 LdapStatesEnum.MESSAGE_ID_STATE, 323 LdapStatesEnum.BIND_REQUEST_STATE, 324 LdapCodecConstants.BIND_REQUEST_TAG, 325 new InitBindRequest() ); 326 327 // -------------------------------------------------------------------------------------------- 328 // Transition from BindRequest to version 329 // -------------------------------------------------------------------------------------------- 330 // BindRequest ::= [APPLICATION 0] SEQUENCE { 331 // version INTEGER (1 .. 127), 332 // .... 333 // 334 // The Ldap version is parsed and stored into the BindRequest object 335 super.transitions[LdapStatesEnum.BIND_REQUEST_STATE.ordinal()][INTEGER.getValue()] = 336 new GrammarTransition( 337 LdapStatesEnum.BIND_REQUEST_STATE, 338 LdapStatesEnum.VERSION_STATE, 339 INTEGER, 340 new StoreVersion() ); 341 342 // -------------------------------------------------------------------------------------------- 343 // Transition from version to name 344 // -------------------------------------------------------------------------------------------- 345 // BindRequest ::= [APPLICATION 0] SEQUENCE { 346 // .... 347 // name LDAPDN, 348 // .... 349 // 350 // The Ldap name is stored into the BindRequest object 351 super.transitions[LdapStatesEnum.VERSION_STATE.ordinal()][OCTET_STRING.getValue()] = 352 new GrammarTransition( 353 LdapStatesEnum.VERSION_STATE, 354 LdapStatesEnum.NAME_STATE, 355 OCTET_STRING, 356 new StoreName() ); 357 358 // -------------------------------------------------------------------------------------------- 359 // Transition from name to Simple Authentication 360 // -------------------------------------------------------------------------------------------- 361 // BindRequest ::= [APPLICATION 0] SEQUENCE { 362 // .... 363 // authentication AuthenticationChoice } 364 // 365 // AuthenticationChoice ::= CHOICE { 366 // simple [0] OCTET STRING, 367 // ... 368 // 369 // We have to create an Authentication Object to store the credentials. 370 super.transitions[LdapStatesEnum.NAME_STATE.ordinal()][LdapCodecConstants.BIND_REQUEST_SIMPLE_TAG] = 371 new GrammarTransition( 372 LdapStatesEnum.NAME_STATE, 373 LdapStatesEnum.SIMPLE_STATE, 374 LdapCodecConstants.BIND_REQUEST_SIMPLE_TAG, 375 new StoreSimpleAuth() ); 376 377 // -------------------------------------------------------------------------------------------- 378 // transition from Simple Authentication to Controls. 379 // -------------------------------------------------------------------------------------------- 380 // bindRequest BindRequest, 381 // ... }, 382 // controls [0] Controls OPTIONAL } 383 // 384 super.transitions[LdapStatesEnum.SIMPLE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 385 new GrammarTransition( 386 LdapStatesEnum.SIMPLE_STATE, 387 LdapStatesEnum.CONTROLS_STATE, 388 LdapCodecConstants.CONTROLS_TAG, 389 new InitControls() ); 390 391 // -------------------------------------------------------------------------------------------- 392 // Transition from name to SASL Authentication 393 // -------------------------------------------------------------------------------------------- 394 // BindRequest ::= [APPLICATION 0] SEQUENCE { 395 // .... 396 // authentication AuthenticationChoice } 397 // 398 // AuthenticationChoice ::= CHOICE { 399 // ... 400 // sasl [3] SaslCredentials } 401 // ... 402 // 403 // We have to create an Authentication Object to store the credentials. 404 super.transitions[LdapStatesEnum.NAME_STATE.ordinal()][LdapCodecConstants.BIND_REQUEST_SASL_TAG] = 405 new GrammarTransition( 406 LdapStatesEnum.NAME_STATE, 407 LdapStatesEnum.SASL_STATE, 408 LdapCodecConstants.BIND_REQUEST_SASL_TAG, 409 new InitSaslBind() ); 410 411 // -------------------------------------------------------------------------------------------- 412 // Transition from SASL Authentication to Mechanism 413 // -------------------------------------------------------------------------------------------- 414 // SaslCredentials ::= SEQUENCE { 415 // mechanism LDAPSTRING, 416 // ... 417 // 418 // We have to store the mechanism. 419 super.transitions[LdapStatesEnum.SASL_STATE.ordinal()][OCTET_STRING.getValue()] = 420 new GrammarTransition( 421 LdapStatesEnum.SASL_STATE, 422 LdapStatesEnum.MECHANISM_STATE, 423 OCTET_STRING, 424 new StoreSaslMechanism() ); 425 426 // -------------------------------------------------------------------------------------------- 427 // Transition from Mechanism to Credentials 428 // -------------------------------------------------------------------------------------------- 429 // SaslCredentials ::= SEQUENCE { 430 // ... 431 // credentials OCTET STRING OPTIONAL } 432 // 433 // We have to store the mechanism. 434 super.transitions[LdapStatesEnum.MECHANISM_STATE.ordinal()][OCTET_STRING.getValue()] = 435 new GrammarTransition( 436 LdapStatesEnum.MECHANISM_STATE, 437 LdapStatesEnum.CREDENTIALS_STATE, 438 OCTET_STRING, 439 new StoreSaslCredentials() ); 440 441 // -------------------------------------------------------------------------------------------- 442 // transition from from Mechanism to Controls. 443 // -------------------------------------------------------------------------------------------- 444 // bindRequest BindRequest, 445 // ... }, 446 // controls [0] Controls OPTIONAL } 447 // 448 super.transitions[LdapStatesEnum.MECHANISM_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 449 new GrammarTransition( 450 LdapStatesEnum.MECHANISM_STATE, 451 LdapStatesEnum.CONTROLS_STATE, 452 LdapCodecConstants.CONTROLS_TAG, 453 new InitControls() ); 454 455 // -------------------------------------------------------------------------------------------- 456 // transition from credentials to Controls. 457 // -------------------------------------------------------------------------------------------- 458 // bindRequest BindRequest, 459 // ... }, 460 // controls [0] Controls OPTIONAL } 461 // 462 super.transitions[LdapStatesEnum.CREDENTIALS_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 463 new GrammarTransition( 464 LdapStatesEnum.CREDENTIALS_STATE, 465 LdapStatesEnum.CONTROLS_STATE, 466 LdapCodecConstants.CONTROLS_TAG, 467 new InitControls() ); 468 469 // -------------------------------------------------------------------------------------------- 470 // Transition from MessageId to BindResponse message 471 // -------------------------------------------------------------------------------------------- 472 // LdapMessage ::= ... BindResponse ... 473 // BindResponse ::= [APPLICATION 1] SEQUENCE { ... 474 // We have to switch to the BindResponse grammar 475 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.BIND_RESPONSE_TAG] = 476 new GrammarTransition( 477 LdapStatesEnum.MESSAGE_ID_STATE, 478 LdapStatesEnum.BIND_RESPONSE_STATE, 479 LdapCodecConstants.BIND_RESPONSE_TAG, 480 new InitBindResponse() ); 481 482 // -------------------------------------------------------------------------------------------- 483 // Transition from BindResponse message to Result Code BR 484 // -------------------------------------------------------------------------------------------- 485 // BindResponse ::= [APPLICATION 1] SEQUENCE { 486 // COMPONENTS OF LDAPResult, 487 // ... 488 // 489 // LDAPResult ::= SEQUENCE { 490 // resultCode ENUMERATED { 491 // ... 492 // 493 // Stores the result code into the Bind Response object 494 super.transitions[LdapStatesEnum.BIND_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] = 495 new GrammarTransition( 496 LdapStatesEnum.BIND_RESPONSE_STATE, 497 LdapStatesEnum.RESULT_CODE_BR_STATE, 498 ENUMERATED, 499 new StoreResultCode() ); 500 501 // -------------------------------------------------------------------------------------------- 502 // Transition from Result Code BR to Matched Dn BR 503 // -------------------------------------------------------------------------------------------- 504 // LDAPResult ::= SEQUENCE { 505 // ... 506 // matchedDN LDAPDN, 507 // ... 508 // 509 // Stores the matched Dn 510 super.transitions[LdapStatesEnum.RESULT_CODE_BR_STATE.ordinal()][OCTET_STRING.getValue()] = 511 new GrammarTransition( 512 LdapStatesEnum.RESULT_CODE_BR_STATE, 513 LdapStatesEnum.MATCHED_DN_BR_STATE, 514 OCTET_STRING, 515 new StoreMatchedDN() ); 516 517 // -------------------------------------------------------------------------------------------- 518 // Transition from Matched Dn BR to Error Message BR 519 // -------------------------------------------------------------------------------------------- 520 // LDAPResult ::= SEQUENCE { 521 // ... 522 // errorMessage LDAPString, 523 // ... 524 // 525 // Stores the error message 526 super.transitions[LdapStatesEnum.MATCHED_DN_BR_STATE.ordinal()][OCTET_STRING.getValue()] = 527 new GrammarTransition( 528 LdapStatesEnum.MATCHED_DN_BR_STATE, 529 LdapStatesEnum.ERROR_MESSAGE_BR_STATE, 530 OCTET_STRING, 531 new StoreErrorMessage() ); 532 533 // -------------------------------------------------------------------------------------------- 534 // Transition from Error Message BR to Server SASL credentials 535 // -------------------------------------------------------------------------------------------- 536 // BindResponse ::= APPLICATION 1] SEQUENCE { 537 // ... 538 // serverSaslCreds [7] OCTET STRING OPTIONAL } 539 // 540 // Stores the sasl credentials 541 super.transitions[LdapStatesEnum.ERROR_MESSAGE_BR_STATE.ordinal()][LdapCodecConstants.SERVER_SASL_CREDENTIAL_TAG] = 542 new GrammarTransition( 543 LdapStatesEnum.ERROR_MESSAGE_BR_STATE, 544 LdapStatesEnum.SERVER_SASL_CREDENTIALS_STATE, 545 LdapCodecConstants.SERVER_SASL_CREDENTIAL_TAG, 546 new StoreServerSASLCreds() ); 547 548 // -------------------------------------------------------------------------------------------- 549 // Transition from Error Message BR to Referrals BR 550 // -------------------------------------------------------------------------------------------- 551 // LDAPResult ::= SEQUENCE { 552 // ... 553 // referral [3] Referral OPTIONNAL } 554 // 555 // Initialiaze the referrals list 556 super.transitions[LdapStatesEnum.ERROR_MESSAGE_BR_STATE.ordinal()][LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG] = 557 new GrammarTransition( 558 LdapStatesEnum.ERROR_MESSAGE_BR_STATE, 559 LdapStatesEnum.REFERRALS_BR_STATE, 560 LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG, 561 new InitReferrals() ); 562 563 // -------------------------------------------------------------------------------------------- 564 // Transition from Referrals BR to Referral BR 565 // -------------------------------------------------------------------------------------------- 566 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 567 // URI ::= LDAPString 568 // 569 // Add a first Referral 570 super.transitions[LdapStatesEnum.REFERRALS_BR_STATE.ordinal()][OCTET_STRING.getValue()] = 571 new GrammarTransition( 572 LdapStatesEnum.REFERRALS_BR_STATE, 573 LdapStatesEnum.REFERRAL_BR_STATE, 574 OCTET_STRING, 575 new AddReferral() ); 576 577 // -------------------------------------------------------------------------------------------- 578 // Transition from Referral BR to Referral BR 579 // -------------------------------------------------------------------------------------------- 580 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 581 // URI ::= LDAPString 582 // 583 // Adda new Referral 584 super.transitions[LdapStatesEnum.REFERRAL_BR_STATE.ordinal()][OCTET_STRING.getValue()] = 585 new GrammarTransition( 586 LdapStatesEnum.REFERRAL_BR_STATE, 587 LdapStatesEnum.REFERRAL_BR_STATE, 588 OCTET_STRING, 589 new AddReferral() ); 590 591 // -------------------------------------------------------------------------------------------- 592 // Transition from Referral BR to Server SASL Credentials 593 // -------------------------------------------------------------------------------------------- 594 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 595 // URI ::= LDAPString 596 // 597 // Adda new Referral 598 super.transitions[LdapStatesEnum.REFERRAL_BR_STATE.ordinal()][LdapCodecConstants.SERVER_SASL_CREDENTIAL_TAG] = 599 new GrammarTransition( 600 LdapStatesEnum.REFERRAL_BR_STATE, 601 LdapStatesEnum.SERVER_SASL_CREDENTIALS_STATE, 602 LdapCodecConstants.SERVER_SASL_CREDENTIAL_TAG, 603 new StoreServerSASLCreds() ); 604 605 // -------------------------------------------------------------------------------------------- 606 // Transition from Referral BR to Controls 607 // -------------------------------------------------------------------------------------------- 608 // bindResponse BindResponse, 609 // ... }, 610 // controls [0] Controls OPTIONAL } 611 // 612 // Adda new Referral 613 super.transitions[LdapStatesEnum.REFERRAL_BR_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 614 new GrammarTransition( 615 LdapStatesEnum.REFERRAL_BR_STATE, 616 LdapStatesEnum.CONTROLS_STATE, 617 LdapCodecConstants.CONTROLS_TAG, 618 new InitControls() ); 619 620 // -------------------------------------------------------------------------------------------- 621 // Transition from Error Message BR to controls 622 // -------------------------------------------------------------------------------------------- 623 // bindResponse BindResponse, 624 // ... }, 625 // controls [0] Controls OPTIONAL } 626 // 627 // 628 super.transitions[LdapStatesEnum.ERROR_MESSAGE_BR_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 629 new GrammarTransition( 630 LdapStatesEnum.ERROR_MESSAGE_BR_STATE, 631 LdapStatesEnum.CONTROLS_STATE, 632 LdapCodecConstants.CONTROLS_TAG, 633 new InitControls() ); 634 635 // -------------------------------------------------------------------------------------------- 636 // Transition from Server SASL credentials to Controls 637 // -------------------------------------------------------------------------------------------- 638 // bindResponse BindResponse, 639 // ... }, 640 // controls [0] Controls OPTIONAL } 641 // 642 super.transitions[LdapStatesEnum.SERVER_SASL_CREDENTIALS_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 643 new GrammarTransition( 644 LdapStatesEnum.SERVER_SASL_CREDENTIALS_STATE, 645 LdapStatesEnum.CONTROLS_STATE, 646 LdapCodecConstants.CONTROLS_TAG, 647 new InitControls() ); 648 649 // -------------------------------------------------------------------------------------------- 650 // Transition from Result Code to Matched Dn 651 // -------------------------------------------------------------------------------------------- 652 // LDAPResult ::= SEQUENCE { 653 // ... 654 // matchedDN LDAPDN, 655 // ... 656 // 657 // Stores the matched Dn 658 super.transitions[LdapStatesEnum.RESULT_CODE_STATE.ordinal()][OCTET_STRING.getValue()] = 659 new GrammarTransition( 660 LdapStatesEnum.RESULT_CODE_STATE, 661 LdapStatesEnum.MATCHED_DN_STATE, 662 OCTET_STRING, 663 new StoreMatchedDN() ); 664 665 // -------------------------------------------------------------------------------------------- 666 // Transition from Matched Dn to Error Message 667 // -------------------------------------------------------------------------------------------- 668 // LDAPResult ::= SEQUENCE { 669 // ... 670 // errorMessage LDAPString, 671 // ... 672 // 673 // Stores the error message 674 super.transitions[LdapStatesEnum.MATCHED_DN_STATE.ordinal()][OCTET_STRING.getValue()] = 675 new GrammarTransition( 676 LdapStatesEnum.MATCHED_DN_STATE, 677 LdapStatesEnum.ERROR_MESSAGE_STATE, 678 OCTET_STRING, 679 new StoreErrorMessage() ); 680 681 // -------------------------------------------------------------------------------------------- 682 // Transition from Error Message to Referrals 683 // -------------------------------------------------------------------------------------------- 684 // LDAPResult ::= SEQUENCE { 685 // ... 686 // referral [3] Referral OPTIONNAL } 687 // 688 // Initialize the referrals list 689 super.transitions[LdapStatesEnum.ERROR_MESSAGE_STATE.ordinal()][LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG] = 690 new GrammarTransition( 691 LdapStatesEnum.ERROR_MESSAGE_STATE, 692 LdapStatesEnum.REFERRALS_STATE, 693 LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG, 694 new InitReferrals() ); 695 696 // -------------------------------------------------------------------------------------------- 697 // Transition from Referrals to Referral 698 // -------------------------------------------------------------------------------------------- 699 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 700 // URI ::= LDAPString 701 // 702 // Add a first Referral 703 super.transitions[LdapStatesEnum.REFERRALS_STATE.ordinal()][OCTET_STRING.getValue()] = 704 new GrammarTransition( 705 LdapStatesEnum.REFERRALS_STATE, 706 LdapStatesEnum.REFERRAL_STATE, 707 OCTET_STRING, 708 new AddReferral() ); 709 710 // -------------------------------------------------------------------------------------------- 711 // Transition from Referral to Referral 712 // -------------------------------------------------------------------------------------------- 713 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 714 // URI ::= LDAPString 715 // 716 // Adda new Referral 717 super.transitions[LdapStatesEnum.REFERRAL_STATE.ordinal()][OCTET_STRING.getValue()] = 718 new GrammarTransition( 719 LdapStatesEnum.REFERRAL_STATE, 720 LdapStatesEnum.REFERRAL_STATE, 721 OCTET_STRING, 722 new AddReferral() ); 723 724 // -------------------------------------------------------------------------------------------- 725 // Transition from Referral to Controls 726 // -------------------------------------------------------------------------------------------- 727 // xxxResponse xxxResponse, 728 // ... }, 729 // controls [0] Controls OPTIONAL } 730 // 731 // Adda new Referral 732 super.transitions[LdapStatesEnum.REFERRAL_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 733 new GrammarTransition( 734 LdapStatesEnum.REFERRAL_STATE, 735 LdapStatesEnum.CONTROLS_STATE, 736 LdapCodecConstants.CONTROLS_TAG, 737 new InitControls() ); 738 739 // -------------------------------------------------------------------------------------------- 740 // Transition from Error Message to controls 741 // -------------------------------------------------------------------------------------------- 742 // xxxResponse xxxResponse, 743 // ... }, 744 // controls [0] Controls OPTIONAL } 745 // 746 // 747 super.transitions[LdapStatesEnum.ERROR_MESSAGE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 748 new GrammarTransition( 749 LdapStatesEnum.ERROR_MESSAGE_STATE, 750 LdapStatesEnum.CONTROLS_STATE, 751 LdapCodecConstants.CONTROLS_TAG, 752 new InitControls() ); 753 754 // -------------------------------------------------------------------------------------------- 755 // Transition from MessageId to SearchResultEntry Message. 756 // -------------------------------------------------------------------------------------------- 757 // LdapMessage ::= ... SearchResultEntry ... 758 // SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ... 759 // 760 // Initialize the searchResultEntry object 761 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.SEARCH_RESULT_ENTRY_TAG] = 762 new GrammarTransition( 763 LdapStatesEnum.MESSAGE_ID_STATE, 764 LdapStatesEnum.SEARCH_RESULT_ENTRY_STATE, 765 LdapCodecConstants.SEARCH_RESULT_ENTRY_TAG, 766 new InitSearchResultEntry() ); 767 768 // -------------------------------------------------------------------------------------------- 769 // Transition from SearchResultEntry Message to ObjectName 770 // -------------------------------------------------------------------------------------------- 771 // SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ... 772 // objectName LDAPDN, 773 // ... 774 // 775 // Store the object name. 776 super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_STATE.ordinal()][OCTET_STRING.getValue()] = 777 new GrammarTransition( 778 LdapStatesEnum.SEARCH_RESULT_ENTRY_STATE, 779 LdapStatesEnum.OBJECT_NAME_STATE, 780 OCTET_STRING, 781 new StoreSearchResultEntryObjectName() ); 782 783 // -------------------------------------------------------------------------------------------- 784 // Transition from ObjectName to AttributesSR 785 // -------------------------------------------------------------------------------------------- 786 // SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ... 787 // ... 788 // attributes PartialAttributeList } 789 // 790 // PartialAttributeList ::= *SEQUENCE* OF SEQUENCE { 791 // ... 792 // 793 // We may have no attributes. Just allows the grammar to end 794 super.transitions[LdapStatesEnum.OBJECT_NAME_STATE.ordinal()][SEQUENCE.getValue()] = 795 new GrammarTransition( 796 LdapStatesEnum.OBJECT_NAME_STATE, 797 LdapStatesEnum.ATTRIBUTES_SR_STATE, 798 SEQUENCE, 799 new AllowGrammarEnd() ); 800 801 // -------------------------------------------------------------------------------------------- 802 // Transition from AttributesSR to PartialAttributesList 803 // -------------------------------------------------------------------------------------------- 804 // SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ... 805 // ... 806 // attributes PartialAttributeList } 807 // 808 // PartialAttributeList ::= SEQUENCE OF *SEQUENCE* { 809 // ... 810 // 811 // nothing to do 812 super.transitions[LdapStatesEnum.ATTRIBUTES_SR_STATE.ordinal()][SEQUENCE.getValue()] = 813 new GrammarTransition( 814 LdapStatesEnum.ATTRIBUTES_SR_STATE, 815 LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE, 816 SEQUENCE, 817 null ); 818 819 // -------------------------------------------------------------------------------------------- 820 // Transition from AttributesSR to Controls 821 // -------------------------------------------------------------------------------------------- 822 // searchResultEntry SearchResultEntry, 823 // ... }, 824 // controls [0] Controls OPTIONAL } 825 // 826 // Initialize the controls 827 super.transitions[LdapStatesEnum.ATTRIBUTES_SR_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 828 new GrammarTransition( 829 LdapStatesEnum.ATTRIBUTES_SR_STATE, 830 LdapStatesEnum.CONTROLS_STATE, 831 LdapCodecConstants.CONTROLS_TAG, 832 new InitControls() ); 833 834 // -------------------------------------------------------------------------------------------- 835 // Transition from PartialAttributesList to typeSR 836 // -------------------------------------------------------------------------------------------- 837 // SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ... 838 // ... 839 // attributes PartialAttributeList } 840 // 841 // PartialAttributeList ::= SEQUENCE OF SEQUENCE { 842 // type AttributeDescription, 843 // ... 844 // 845 // Store the attribute's name. 846 super.transitions[LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE.ordinal()][OCTET_STRING.getValue()] = 847 new GrammarTransition( 848 LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE, 849 LdapStatesEnum.TYPE_SR_STATE, 850 OCTET_STRING, 851 new AddAttributeType() ); 852 853 // -------------------------------------------------------------------------------------------- 854 // Transition from typeSR to ValsSR 855 // -------------------------------------------------------------------------------------------- 856 // SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ... 857 // ... 858 // attributes PartialAttributeList } 859 // 860 // PartialAttributeList ::= SEQUENCE OF SEQUENCE { 861 // ... 862 // vals SET OF AttributeValue } 863 // 864 // We may have no value. Just allows the grammar to end 865 super.transitions[LdapStatesEnum.TYPE_SR_STATE.ordinal()][SET.getValue()] = 866 new GrammarTransition( 867 LdapStatesEnum.TYPE_SR_STATE, 868 LdapStatesEnum.VALS_SR_STATE, 869 SET, 870 new AllowGrammarEnd() ); 871 872 // -------------------------------------------------------------------------------------------- 873 // Transition from ValsSR to AttributeValueSR 874 // -------------------------------------------------------------------------------------------- 875 // PartialAttributeList ::= SEQUENCE OF SEQUENCE { 876 // ... 877 // vals SET OF AttributeValue } 878 // 879 // AttributeValue ::= OCTET STRING 880 // 881 // Store the attribute value 882 super.transitions[LdapStatesEnum.VALS_SR_STATE.ordinal()][OCTET_STRING.getValue()] = 883 new GrammarTransition( 884 LdapStatesEnum.VALS_SR_STATE, 885 LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE, 886 OCTET_STRING, 887 new StoreSearchResultAttributeValue() ); 888 889 // -------------------------------------------------------------------------------------------- 890 // Transition from ValsSR to PartialAttributesList 891 // -------------------------------------------------------------------------------------------- 892 // PartialAttributeList ::= SEQUENCE OF SEQUENCE { 893 // ... 894 // vals SET OF AttributeValue } 895 // 896 // Loop when we don't have any attribute value. Nothing to do 897 super.transitions[LdapStatesEnum.VALS_SR_STATE.ordinal()][SEQUENCE.getValue()] = 898 new GrammarTransition( 899 LdapStatesEnum.VALS_SR_STATE, 900 LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE, 901 SEQUENCE ); 902 903 // -------------------------------------------------------------------------------------------- 904 // Transition from ValsSR to Controls 905 // -------------------------------------------------------------------------------------------- 906 // searchResultEntry SearchResultEntry, 907 // ... }, 908 // controls [0] Controls OPTIONAL } 909 // 910 // Initialize the controls 911 super.transitions[LdapStatesEnum.VALS_SR_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 912 new GrammarTransition( 913 LdapStatesEnum.VALS_SR_STATE, 914 LdapStatesEnum.CONTROLS_STATE, 915 LdapCodecConstants.CONTROLS_TAG, 916 new InitControls() ); 917 918 // -------------------------------------------------------------------------------------------- 919 // Transition from AttributeValueSR to AttributeValueSR 920 // -------------------------------------------------------------------------------------------- 921 // PartialAttributeList ::= SEQUENCE OF SEQUENCE { 922 // ... 923 // vals SET OF AttributeValue } 924 // 925 // AttributeValue ::= OCTET STRING 926 // 927 // Store the attribute value 928 super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE.ordinal()][OCTET_STRING.getValue()] = 929 new GrammarTransition( 930 LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE, 931 LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE, 932 OCTET_STRING, 933 new StoreSearchResultAttributeValue() ); 934 935 // -------------------------------------------------------------------------------------------- 936 // Transition from AttributeValueSR to PartialAttributesList 937 // -------------------------------------------------------------------------------------------- 938 // PartialAttributeList ::= SEQUENCE OF SEQUENCE { 939 // ... 940 // vals SET OF AttributeValue } 941 // 942 // Loop when we don't have any attribute value. Nothing to do 943 super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE.ordinal()][SEQUENCE.getValue()] = 944 new GrammarTransition( 945 LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE, 946 LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE, 947 SEQUENCE ); 948 949 // -------------------------------------------------------------------------------------------- 950 // Transition from AttributeValueSR to Controls 951 // -------------------------------------------------------------------------------------------- 952 // searchResultEntry SearchResultEntry, 953 // ... }, 954 // controls [0] Controls OPTIONAL } 955 // 956 // Initialize the controls 957 super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 958 new GrammarTransition( 959 LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE, 960 LdapStatesEnum.CONTROLS_STATE, 961 LdapCodecConstants.CONTROLS_TAG, 962 new InitControls() ); 963 964 // -------------------------------------------------------------------------------------------- 965 // SearchResultDone Message. 966 // -------------------------------------------------------------------------------------------- 967 // LdapMessage ::= ... SearchResultDone ... 968 // SearchResultDone ::= [APPLICATION 5] SEQUENCE { ... 969 // 970 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.SEARCH_RESULT_DONE_TAG] = 971 new GrammarTransition( 972 LdapStatesEnum.MESSAGE_ID_STATE, 973 LdapStatesEnum.SEARCH_RESULT_DONE_STATE, 974 LdapCodecConstants.SEARCH_RESULT_DONE_TAG, 975 new InitSearchResultDone() ); 976 977 // -------------------------------------------------------------------------------------------- 978 // SearchResultDone Message. 979 // -------------------------------------------------------------------------------------------- 980 // LdapMessage ::= ... SearchResultDone ... 981 // SearchResultDone ::= [APPLICATION 5] LDAPResult 982 // 983 // LDAPResult ::= SEQUENCE { 984 // resultCode ENUMERATED { 985 // ... 986 // 987 // Stores the result code 988 super.transitions[LdapStatesEnum.SEARCH_RESULT_DONE_STATE.ordinal()][ENUMERATED.getValue()] = 989 new GrammarTransition( 990 LdapStatesEnum.SEARCH_RESULT_DONE_STATE, 991 LdapStatesEnum.RESULT_CODE_STATE, 992 ENUMERATED, 993 new StoreResultCode() ); 994 995 // -------------------------------------------------------------------------------------------- 996 // Transition from Message ID to ModifyRequest Message 997 // -------------------------------------------------------------------------------------------- 998 // LdapMessage ::= ... ModifyRequest ... 999 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { ... 1000 // 1001 // Creates the Modify Request object 1002 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.MODIFY_REQUEST_TAG] = 1003 new GrammarTransition( 1004 LdapStatesEnum.MESSAGE_ID_STATE, 1005 LdapStatesEnum.MODIFY_REQUEST_STATE, 1006 LdapCodecConstants.MODIFY_REQUEST_TAG, 1007 new InitModifyRequest() ); 1008 1009 // -------------------------------------------------------------------------------------------- 1010 // Transition from ModifyRequest Message to Object 1011 // -------------------------------------------------------------------------------------------- 1012 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1013 // object LDAPDN, 1014 // ... 1015 // 1016 // Stores the object Dn 1017 super.transitions[LdapStatesEnum.MODIFY_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] = 1018 new GrammarTransition( 1019 LdapStatesEnum.MODIFY_REQUEST_STATE, 1020 LdapStatesEnum.OBJECT_STATE, 1021 OCTET_STRING, 1022 new StoreModifyRequestObjectName() ); 1023 1024 // -------------------------------------------------------------------------------------------- 1025 // Transition from Object to modifications 1026 // -------------------------------------------------------------------------------------------- 1027 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1028 // ... 1029 // modification *SEQUENCE OF* SEQUENCE { 1030 // ... 1031 // 1032 // Initialize the modifications list 1033 super.transitions[LdapStatesEnum.OBJECT_STATE.ordinal()][SEQUENCE.getValue()] = 1034 new GrammarTransition( 1035 LdapStatesEnum.OBJECT_STATE, 1036 LdapStatesEnum.MODIFICATIONS_STATE, 1037 SEQUENCE ); 1038 1039 // -------------------------------------------------------------------------------------------- 1040 // Transition from modifications to modification sequence 1041 // -------------------------------------------------------------------------------------------- 1042 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1043 // ... 1044 // modification SEQUENCE OF *SEQUENCE* { 1045 // ... 1046 // 1047 // Nothing to do 1048 super.transitions[LdapStatesEnum.MODIFICATIONS_STATE.ordinal()][SEQUENCE.getValue()] = 1049 new GrammarTransition( 1050 LdapStatesEnum.MODIFICATIONS_STATE, 1051 LdapStatesEnum.MODIFICATIONS_SEQ_STATE, 1052 SEQUENCE ); 1053 1054 // -------------------------------------------------------------------------------------------- 1055 // Transition from modification sequence to operation 1056 // -------------------------------------------------------------------------------------------- 1057 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1058 // ... 1059 // modification SEQUENCE OF SEQUENCE { 1060 // operation ENUMERATED { 1061 // ... 1062 // 1063 // Store operation type 1064 super.transitions[LdapStatesEnum.MODIFICATIONS_SEQ_STATE.ordinal()][ENUMERATED.getValue()] = 1065 new GrammarTransition( 1066 LdapStatesEnum.MODIFICATIONS_SEQ_STATE, 1067 LdapStatesEnum.OPERATION_STATE, 1068 ENUMERATED, 1069 new StoreOperationType() ); 1070 1071 // -------------------------------------------------------------------------------------------- 1072 // Transition from operation to modification 1073 // -------------------------------------------------------------------------------------------- 1074 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1075 // ... 1076 // modification SEQUENCE OF SEQUENCE { 1077 // ... 1078 // modification AttributeTypeAndValues } 1079 // 1080 // AttributeTypeAndValues ::= SEQUENCE { 1081 // ... 1082 // 1083 // Nothing to do 1084 super.transitions[LdapStatesEnum.OPERATION_STATE.ordinal()][SEQUENCE.getValue()] = 1085 new GrammarTransition( 1086 LdapStatesEnum.OPERATION_STATE, 1087 LdapStatesEnum.MODIFICATION_STATE, 1088 SEQUENCE ); 1089 1090 // -------------------------------------------------------------------------------------------- 1091 // Transition from modification to TypeMod 1092 // -------------------------------------------------------------------------------------------- 1093 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1094 // ... 1095 // modification SEQUENCE OF SEQUENCE { 1096 // ... 1097 // modification AttributeTypeAndValues } 1098 // 1099 // AttributeTypeAndValues ::= SEQUENCE { 1100 // type AttributeDescription, 1101 // ... 1102 // 1103 // Stores the type 1104 super.transitions[LdapStatesEnum.MODIFICATION_STATE.ordinal()][OCTET_STRING.getValue()] = 1105 new GrammarTransition( 1106 LdapStatesEnum.MODIFICATION_STATE, 1107 LdapStatesEnum.TYPE_MOD_STATE, 1108 OCTET_STRING, 1109 new AddModifyRequestAttribute() ); 1110 1111 // -------------------------------------------------------------------------------------------- 1112 // Transition from TypeMod to vals 1113 // -------------------------------------------------------------------------------------------- 1114 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1115 // ... 1116 // modification SEQUENCE OF SEQUENCE { 1117 // ... 1118 // modification AttributeTypeAndValues } 1119 // 1120 // AttributeTypeAndValues ::= SEQUENCE { 1121 // ... 1122 // vals SET OF AttributeValue } 1123 // 1124 // Initialize the list of values 1125 super.transitions[LdapStatesEnum.TYPE_MOD_STATE.ordinal()][SET.getValue()] = 1126 new GrammarTransition( 1127 LdapStatesEnum.TYPE_MOD_STATE, 1128 LdapStatesEnum.VALS_STATE, 1129 SET, 1130 new InitAttributeVals() ); 1131 1132 // -------------------------------------------------------------------------------------------- 1133 // Transition from vals to Attribute Value 1134 // -------------------------------------------------------------------------------------------- 1135 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1136 // ... 1137 // modification SEQUENCE OF SEQUENCE { 1138 // ... 1139 // modification AttributeTypeAndValues } 1140 // 1141 // AttributeTypeAndValues ::= SEQUENCE { 1142 // ... 1143 // vals SET OF AttributeValue } 1144 // 1145 // AttributeValue ::= OCTET STRING 1146 // 1147 // Stores a value 1148 super.transitions[LdapStatesEnum.VALS_STATE.ordinal()][OCTET_STRING.getValue()] = 1149 new GrammarTransition( 1150 LdapStatesEnum.VALS_STATE, 1151 LdapStatesEnum.ATTRIBUTE_VALUE_STATE, 1152 OCTET_STRING, 1153 new StoreModifyRequestAttributeValue() ); 1154 1155 // -------------------------------------------------------------------------------------------- 1156 // Transition from vals to ModificationsSeq 1157 // -------------------------------------------------------------------------------------------- 1158 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1159 // ... 1160 // modification SEQUENCE OF *SEQUENCE* { 1161 // ... 1162 // modification AttributeTypeAndValues } 1163 // 1164 // AttributeTypeAndValues ::= SEQUENCE { 1165 // ... 1166 // vals SET OF AttributeValue } 1167 // 1168 // AttributeValue ::= OCTET STRING 1169 // 1170 // Nothing to do 1171 super.transitions[LdapStatesEnum.VALS_STATE.ordinal()][SEQUENCE.getValue()] = 1172 new GrammarTransition( 1173 LdapStatesEnum.VALS_STATE, 1174 LdapStatesEnum.MODIFICATIONS_SEQ_STATE, 1175 SEQUENCE ); 1176 1177 // -------------------------------------------------------------------------------------------- 1178 // Transition from vals to Controls 1179 // -------------------------------------------------------------------------------------------- 1180 // modifyRequest ModifyRequest, 1181 // ... }, 1182 // controls [0] Controls OPTIONAL } 1183 // 1184 // Nothing to do 1185 super.transitions[LdapStatesEnum.VALS_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1186 new GrammarTransition( 1187 LdapStatesEnum.VALS_STATE, 1188 LdapStatesEnum.CONTROLS_STATE, 1189 LdapCodecConstants.CONTROLS_TAG, 1190 new InitControls() ); 1191 1192 // -------------------------------------------------------------------------------------------- 1193 // Transition from Attribute Value to Attribute Value 1194 // -------------------------------------------------------------------------------------------- 1195 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1196 // ... 1197 // modification SEQUENCE OF SEQUENCE { 1198 // ... 1199 // modification AttributeTypeAndValues } 1200 // 1201 // AttributeTypeAndValues ::= SEQUENCE { 1202 // ... 1203 // vals SET OF AttributeValue } 1204 // 1205 // AttributeValue ::= OCTET STRING 1206 // 1207 // Stores a value 1208 super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_STATE.ordinal()][OCTET_STRING.getValue()] = 1209 new GrammarTransition( 1210 LdapStatesEnum.ATTRIBUTE_VALUE_STATE, 1211 LdapStatesEnum.ATTRIBUTE_VALUE_STATE, 1212 OCTET_STRING, 1213 new StoreModifyRequestAttributeValue() ); 1214 1215 // -------------------------------------------------------------------------------------------- 1216 // Transition from Attribute Value to ModificationsSeq 1217 // -------------------------------------------------------------------------------------------- 1218 // ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1219 // ... 1220 // modification SEQUENCE OF *SEQUENCE* { 1221 // ... 1222 // modification AttributeTypeAndValues } 1223 // 1224 // AttributeTypeAndValues ::= SEQUENCE { 1225 // ... 1226 // vals SET OF AttributeValue } 1227 // 1228 // AttributeValue ::= OCTET STRING 1229 // 1230 // Nothing to do 1231 super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_STATE.ordinal()][SEQUENCE.getValue()] = 1232 new GrammarTransition( 1233 LdapStatesEnum.ATTRIBUTE_VALUE_STATE, 1234 LdapStatesEnum.MODIFICATIONS_SEQ_STATE, 1235 SEQUENCE ); 1236 1237 // -------------------------------------------------------------------------------------------- 1238 // Transition from Attribute Value to Controls 1239 // -------------------------------------------------------------------------------------------- 1240 // modifyRequest ModifyRequest, 1241 // ... }, 1242 // controls [0] Controls OPTIONAL } 1243 // 1244 // Nothing to do 1245 super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1246 new GrammarTransition( 1247 LdapStatesEnum.ATTRIBUTE_VALUE_STATE, 1248 LdapStatesEnum.CONTROLS_STATE, 1249 LdapCodecConstants.CONTROLS_TAG, 1250 new InitControls() ); 1251 1252 // -------------------------------------------------------------------------------------------- 1253 // ModifyResponse Message. 1254 // -------------------------------------------------------------------------------------------- 1255 // LdapMessage ::= ... ModifyResponse ... 1256 // ModifyResponse ::= [APPLICATION 7] SEQUENCE { ... 1257 // We have to switch to the ModifyResponse grammar 1258 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.MODIFY_RESPONSE_TAG] = 1259 new GrammarTransition( 1260 LdapStatesEnum.MESSAGE_ID_STATE, 1261 LdapStatesEnum.MODIFY_RESPONSE_STATE, 1262 LdapCodecConstants.MODIFY_RESPONSE_TAG, 1263 new InitModifyResponse() ); 1264 1265 // -------------------------------------------------------------------------------------------- 1266 // ModifyResponse Message. 1267 // -------------------------------------------------------------------------------------------- 1268 // LdapMessage ::= ... ModifyResponse ... 1269 // ModifyResponse ::= [APPLICATION 7] LDAPResult 1270 // 1271 // LDAPResult ::= SEQUENCE { 1272 // resultCode ENUMERATED { 1273 // ... 1274 // 1275 // Stores the result code 1276 super.transitions[LdapStatesEnum.MODIFY_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] = 1277 new GrammarTransition( 1278 LdapStatesEnum.MODIFY_RESPONSE_STATE, 1279 LdapStatesEnum.RESULT_CODE_STATE, 1280 ENUMERATED, 1281 new StoreResultCode() ); 1282 1283 // -------------------------------------------------------------------------------------------- 1284 // AddRequest Message. 1285 // -------------------------------------------------------------------------------------------- 1286 // LdapMessage ::= ... AddRequest ... 1287 // AddRequest ::= [APPLICATION 8] SEQUENCE { ... 1288 // 1289 // Initialize the AddRequest object 1290 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.ADD_REQUEST_TAG] = 1291 new GrammarTransition( 1292 LdapStatesEnum.MESSAGE_ID_STATE, 1293 LdapStatesEnum.ADD_REQUEST_STATE, 1294 LdapCodecConstants.ADD_REQUEST_TAG, 1295 new InitAddRequest() ); 1296 1297 // -------------------------------------------------------------------------------------------- 1298 // Transition from Add Request to Entry 1299 // -------------------------------------------------------------------------------------------- 1300 // AddRequest ::= [APPLICATION 8] SEQUENCE { 1301 // entry LDAPDN, 1302 // ... 1303 // 1304 // Stores the Dn 1305 super.transitions[LdapStatesEnum.ADD_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] = 1306 new GrammarTransition( 1307 LdapStatesEnum.ADD_REQUEST_STATE, 1308 LdapStatesEnum.ENTRY_STATE, 1309 OCTET_STRING, 1310 new StoreAddRequestEntryName() ); 1311 1312 // -------------------------------------------------------------------------------------------- 1313 // Transition from Entry to Attributes 1314 // -------------------------------------------------------------------------------------------- 1315 // AddRequest ::= [APPLICATION 8] SEQUENCE { 1316 // ... 1317 // attributes AttributeList } 1318 // 1319 // AttributeList ::= SEQUENCE OF ... 1320 // 1321 // Initialize the attribute list 1322 super.transitions[LdapStatesEnum.ENTRY_STATE.ordinal()][SEQUENCE.getValue()] = 1323 new GrammarTransition( 1324 LdapStatesEnum.ENTRY_STATE, 1325 LdapStatesEnum.ATTRIBUTES_STATE, 1326 SEQUENCE ); 1327 1328 // -------------------------------------------------------------------------------------------- 1329 // Transition from Attributes to Attribute 1330 // -------------------------------------------------------------------------------------------- 1331 // AttributeList ::= SEQUENCE OF SEQUENCE { 1332 // 1333 // We don't do anything in this transition. The attribute will be created when we met the type 1334 super.transitions[LdapStatesEnum.ATTRIBUTES_STATE.ordinal()][SEQUENCE.getValue()] = 1335 new GrammarTransition( 1336 LdapStatesEnum.ATTRIBUTES_STATE, 1337 LdapStatesEnum.ATTRIBUTE_STATE, 1338 SEQUENCE ); 1339 1340 // -------------------------------------------------------------------------------------------- 1341 // Transition from Attribute to type 1342 // -------------------------------------------------------------------------------------------- 1343 // AttributeList ::= SEQUENCE OF SEQUENCE { 1344 // type AttributeDescription, 1345 // ... 1346 // 1347 // AttributeDescription LDAPString 1348 // 1349 // We store the type in the current attribute 1350 super.transitions[LdapStatesEnum.ATTRIBUTE_STATE.ordinal()][OCTET_STRING.getValue()] = 1351 new GrammarTransition( 1352 LdapStatesEnum.ATTRIBUTE_STATE, 1353 LdapStatesEnum.TYPE_STATE, 1354 OCTET_STRING, 1355 new AddAddRequestAttributeType() ); 1356 1357 // -------------------------------------------------------------------------------------------- 1358 // Transition from type to vals 1359 // -------------------------------------------------------------------------------------------- 1360 // AttributeList ::= SEQUENCE OF SEQUENCE { 1361 // ... 1362 // vals SET OF AttributeValue } 1363 // 1364 // Nothing to do here. 1365 super.transitions[LdapStatesEnum.TYPE_STATE.ordinal()][SET.getValue()] = 1366 new GrammarTransition( 1367 LdapStatesEnum.TYPE_STATE, 1368 LdapStatesEnum.VALUES_STATE, 1369 SET ); 1370 1371 // -------------------------------------------------------------------------------------------- 1372 // Transition from vals to Value 1373 // -------------------------------------------------------------------------------------------- 1374 // AttributeList ::= SEQUENCE OF SEQUENCE { 1375 // ... 1376 // vals SET OF AttributeValue } 1377 // 1378 // AttributeValue OCTET STRING 1379 // 1380 // Store the value into the current attribute 1381 super.transitions[LdapStatesEnum.VALUES_STATE.ordinal()][OCTET_STRING.getValue()] = 1382 new GrammarTransition( 1383 LdapStatesEnum.VALUES_STATE, 1384 LdapStatesEnum.VALUE_STATE, 1385 OCTET_STRING, 1386 new AddAttributeValue() ); 1387 1388 // -------------------------------------------------------------------------------------------- 1389 // Transition from Value to Value 1390 // -------------------------------------------------------------------------------------------- 1391 // AttributeList ::= SEQUENCE OF SEQUENCE { 1392 // ... 1393 // vals SET OF AttributeValue } 1394 // 1395 // AttributeValue OCTET STRING 1396 // 1397 // Store the value into the current attribute 1398 super.transitions[LdapStatesEnum.VALUE_STATE.ordinal()][OCTET_STRING.getValue()] = 1399 new GrammarTransition( 1400 LdapStatesEnum.VALUE_STATE, 1401 LdapStatesEnum.VALUE_STATE, 1402 OCTET_STRING, 1403 new AddAttributeValue() ); 1404 1405 // -------------------------------------------------------------------------------------------- 1406 // Transition from Value to Attribute 1407 // -------------------------------------------------------------------------------------------- 1408 // AttributeList ::= SEQUENCE OF SEQUENCE { 1409 // 1410 // Nothing to do here. 1411 super.transitions[LdapStatesEnum.VALUE_STATE.ordinal()][SEQUENCE.getValue()] = 1412 new GrammarTransition( 1413 LdapStatesEnum.VALUE_STATE, 1414 LdapStatesEnum.ATTRIBUTE_STATE, 1415 SEQUENCE ); 1416 1417 // -------------------------------------------------------------------------------------------- 1418 // Transition from Value to Controls 1419 // -------------------------------------------------------------------------------------------- 1420 // AttributeList ::= SEQUENCE OF SEQUENCE { 1421 // 1422 // Initialize the controls 1423 super.transitions[LdapStatesEnum.VALUE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1424 new GrammarTransition( 1425 LdapStatesEnum.VALUE_STATE, 1426 LdapStatesEnum.CONTROLS_STATE, 1427 LdapCodecConstants.CONTROLS_TAG, 1428 new InitControls() ); 1429 1430 // -------------------------------------------------------------------------------------------- 1431 // AddResponse Message. 1432 // -------------------------------------------------------------------------------------------- 1433 // LdapMessage ::= ... AddResponse ... 1434 // AddResponse ::= [APPLICATION 9] LDAPResult 1435 // 1436 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.ADD_RESPONSE_TAG] = 1437 new GrammarTransition( 1438 LdapStatesEnum.MESSAGE_ID_STATE, 1439 LdapStatesEnum.ADD_RESPONSE_STATE, 1440 LdapCodecConstants.ADD_RESPONSE_TAG, 1441 new InitAddResponse() ); 1442 1443 // -------------------------------------------------------------------------------------------- 1444 // AddResponse Message. 1445 // -------------------------------------------------------------------------------------------- 1446 // LdapMessage ::= ... AddResponse ... 1447 // AddResponse ::= [APPLICATION 9] LDAPResult 1448 // 1449 // LDAPResult ::= SEQUENCE { 1450 // resultCode ENUMERATED { 1451 // ... 1452 // 1453 // Stores the result code 1454 super.transitions[LdapStatesEnum.ADD_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] = 1455 new GrammarTransition( 1456 LdapStatesEnum.ADD_RESPONSE_STATE, 1457 LdapStatesEnum.RESULT_CODE_STATE, 1458 ENUMERATED, 1459 new StoreResultCode() ); 1460 1461 // -------------------------------------------------------------------------------------------- 1462 // DelResponse Message. 1463 // -------------------------------------------------------------------------------------------- 1464 // LdapMessage ::= ... DelResponse ... 1465 // DelResponse ::= [APPLICATION 11] LDAPResult 1466 // We have to switch to the DelResponse grammar 1467 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.DEL_RESPONSE_TAG] = 1468 new GrammarTransition( 1469 LdapStatesEnum.MESSAGE_ID_STATE, 1470 LdapStatesEnum.DEL_RESPONSE_STATE, 1471 LdapCodecConstants.DEL_RESPONSE_TAG, 1472 new InitDelResponse() ); 1473 1474 // -------------------------------------------------------------------------------------------- 1475 // DelResponse Message. 1476 // -------------------------------------------------------------------------------------------- 1477 // LdapMessage ::= ... DelResponse ... 1478 // DelResponse ::= [APPLICATION 11] LDAPResult 1479 // 1480 // LDAPResult ::= SEQUENCE { 1481 // resultCode ENUMERATED { 1482 // ... 1483 // 1484 // Stores the result code 1485 super.transitions[LdapStatesEnum.DEL_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] = 1486 new GrammarTransition( 1487 LdapStatesEnum.DEL_RESPONSE_STATE, 1488 LdapStatesEnum.RESULT_CODE_STATE, 1489 ENUMERATED, 1490 new StoreResultCode() ); 1491 1492 // -------------------------------------------------------------------------------------------- 1493 // Transition from MessageID to ModifydDNRequest Message. 1494 // -------------------------------------------------------------------------------------------- 1495 // LdapMessage ::= ... ModifyDNRequest ... 1496 // ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ... 1497 // 1498 // Create the ModifyDNRequest Object 1499 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.MODIFY_DN_REQUEST_TAG] = 1500 new GrammarTransition( 1501 LdapStatesEnum.MESSAGE_ID_STATE, 1502 LdapStatesEnum.MODIFY_DN_REQUEST_STATE, 1503 LdapCodecConstants.MODIFY_DN_REQUEST_TAG, 1504 new InitModifyDnRequest() ); 1505 1506 // -------------------------------------------------------------------------------------------- 1507 // Transition from ModifydDNRequest Message to EntryModDN 1508 // -------------------------------------------------------------------------------------------- 1509 // ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ... 1510 // entry LDAPDN, 1511 // ... 1512 // 1513 // Stores the entry Dn 1514 super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] = 1515 new GrammarTransition( 1516 LdapStatesEnum.MODIFY_DN_REQUEST_STATE, 1517 LdapStatesEnum.ENTRY_MOD_DN_STATE, 1518 OCTET_STRING, 1519 new StoreModifyDnRequestEntryName() ); 1520 1521 // -------------------------------------------------------------------------------------------- 1522 // Transition from EntryModDN to NewRDN 1523 // -------------------------------------------------------------------------------------------- 1524 // ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ... 1525 // ... 1526 // newrdn RelativeRDN, 1527 // ... 1528 // 1529 // RelativeRDN :: LDAPString 1530 // 1531 // Stores the new Rdn 1532 super.transitions[LdapStatesEnum.ENTRY_MOD_DN_STATE.ordinal()][OCTET_STRING.getValue()] = 1533 new GrammarTransition( 1534 LdapStatesEnum.ENTRY_MOD_DN_STATE, 1535 LdapStatesEnum.NEW_RDN_STATE, 1536 OCTET_STRING, 1537 new StoreModifyDnRequestNewRdn() ); 1538 1539 // -------------------------------------------------------------------------------------------- 1540 // Transition from NewRDN to DeleteOldRDN 1541 // -------------------------------------------------------------------------------------------- 1542 // ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ... 1543 // ... 1544 // deleteoldrdn BOOLEAN, 1545 // ... 1546 // 1547 // Stores the deleteOldRDN flag 1548 super.transitions[LdapStatesEnum.NEW_RDN_STATE.ordinal()][BOOLEAN.getValue()] = 1549 new GrammarTransition( 1550 LdapStatesEnum.NEW_RDN_STATE, 1551 LdapStatesEnum.DELETE_OLD_RDN_STATE, 1552 BOOLEAN, 1553 new StoreModifyDnRequestDeleteOldRdn() ); 1554 1555 // -------------------------------------------------------------------------------------------- 1556 // Transition from DeleteOldRDN to NewSuperior 1557 // -------------------------------------------------------------------------------------------- 1558 // ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ... 1559 // ... 1560 // newSuperior [0] LDAPDN OPTIONAL } 1561 // 1562 // Stores the new superior 1563 super.transitions[LdapStatesEnum.DELETE_OLD_RDN_STATE.ordinal()][LdapCodecConstants.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG] = 1564 new GrammarTransition( 1565 LdapStatesEnum.DELETE_OLD_RDN_STATE, 1566 LdapStatesEnum.NEW_SUPERIOR_STATE, 1567 LdapCodecConstants.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG, 1568 new StoreModifyDnRequestNewSuperior() ); 1569 1570 // -------------------------------------------------------------------------------------------- 1571 // Transition from DeleteOldRDN to Controls 1572 // -------------------------------------------------------------------------------------------- 1573 // modifyDNRequest ModifyDNRequest, 1574 // ... }, 1575 // controls [0] Controls OPTIONAL } 1576 // 1577 // Stores the new superior 1578 super.transitions[LdapStatesEnum.DELETE_OLD_RDN_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1579 new GrammarTransition( 1580 LdapStatesEnum.DELETE_OLD_RDN_STATE, 1581 LdapStatesEnum.CONTROLS_STATE, 1582 LdapCodecConstants.CONTROLS_TAG, 1583 new InitControls() ); 1584 1585 // -------------------------------------------------------------------------------------------- 1586 // Transition from DeleteOldRDN to Controls 1587 // -------------------------------------------------------------------------------------------- 1588 // modifyDNRequest ModifyDNRequest, 1589 // ... }, 1590 // controls [0] Controls OPTIONAL } 1591 // 1592 // Stores the new superior 1593 super.transitions[LdapStatesEnum.NEW_SUPERIOR_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1594 new GrammarTransition( 1595 LdapStatesEnum.NEW_SUPERIOR_STATE, 1596 LdapStatesEnum.CONTROLS_STATE, 1597 LdapCodecConstants.CONTROLS_TAG, 1598 new InitControls() ); 1599 1600 // -------------------------------------------------------------------------------------------- 1601 // Transition from MessageID to ModifyDNResponse Message. 1602 // -------------------------------------------------------------------------------------------- 1603 // ModifyDNResponse ::= [APPLICATION 13] SEQUENCE { 1604 // ... 1605 // 1606 // Creates the ModifyDNResponse 1607 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.MODIFY_DN_RESPONSE_TAG] = 1608 new GrammarTransition( 1609 LdapStatesEnum.MESSAGE_ID_STATE, 1610 LdapStatesEnum.MODIFY_DN_RESPONSE_STATE, 1611 LdapCodecConstants.MODIFY_DN_RESPONSE_TAG, 1612 new InitModifyDnResponse() ); 1613 1614 // -------------------------------------------------------------------------------------------- 1615 // Transition from ModifyDNResponse Message to Result Code 1616 // -------------------------------------------------------------------------------------------- 1617 // LdapMessage ::= ... ModifyDNResponse ... 1618 // ModifyDNResponse ::= [APPLICATION 13] LDAPResult 1619 // 1620 // LDAPResult ::= SEQUENCE { 1621 // resultCode ENUMERATED { 1622 // ... 1623 // 1624 // Stores the result co // modifyDNRequest ModifyDNRequest, 1625 // ... }, 1626 // controls [0] Controls OPTIONAL } 1627 super.transitions[LdapStatesEnum.MODIFY_DN_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] = 1628 new GrammarTransition( 1629 LdapStatesEnum.MODIFY_DN_RESPONSE_STATE, 1630 LdapStatesEnum.RESULT_CODE_STATE, 1631 ENUMERATED, 1632 new StoreResultCode() ); 1633 1634 // -------------------------------------------------------------------------------------------- 1635 // Transition from Message ID to CompareResquest 1636 // -------------------------------------------------------------------------------------------- 1637 // LdapMessage ::= ... CompareRequest ... 1638 // 1639 // CompareRequest ::= [APPLICATION 14] SEQUENCE { 1640 // ... 1641 // 1642 // Initialize the Compare Request object 1643 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.COMPARE_REQUEST_TAG] = 1644 new GrammarTransition( 1645 LdapStatesEnum.MESSAGE_ID_STATE, 1646 LdapStatesEnum.COMPARE_REQUEST_STATE, 1647 LdapCodecConstants.COMPARE_REQUEST_TAG, 1648 new InitCompareRequest() ); 1649 1650 // -------------------------------------------------------------------------------------------- 1651 // Transition from CompareResquest to entryComp 1652 // -------------------------------------------------------------------------------------------- 1653 // CompareRequest ::= [APPLICATION 14] SEQUENCE { 1654 // entry LDAPDN, 1655 // ... 1656 // 1657 // Stores the compared Dn 1658 super.transitions[LdapStatesEnum.COMPARE_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] = 1659 new GrammarTransition( 1660 LdapStatesEnum.COMPARE_REQUEST_STATE, 1661 LdapStatesEnum.ENTRY_COMP_STATE, 1662 OCTET_STRING, 1663 new StoreCompareRequestEntryName() ); 1664 1665 // -------------------------------------------------------------------------------------------- 1666 // Transition from entryComp to ava 1667 // -------------------------------------------------------------------------------------------- 1668 // CompareRequest ::= [APPLICATION 14] SEQUENCE { 1669 // ... 1670 // ava AttributeValueAssertion } 1671 // 1672 // AttributeValueAssertion ::= SEQUENCE { 1673 // 1674 // Nothing to do 1675 super.transitions[LdapStatesEnum.ENTRY_COMP_STATE.ordinal()][SEQUENCE.getValue()] = 1676 new GrammarTransition( 1677 LdapStatesEnum.ENTRY_COMP_STATE, 1678 LdapStatesEnum.AVA_STATE, 1679 SEQUENCE ); 1680 1681 // -------------------------------------------------------------------------------------------- 1682 // Transition from ava to AttributeDesc 1683 // -------------------------------------------------------------------------------------------- 1684 // AttributeValueAssertion ::= SEQUENCE { 1685 // attributeDesc AttributeDescription, 1686 // ... 1687 // 1688 // AttributeDescription LDAPString 1689 // 1690 // Stores the attribute description 1691 super.transitions[LdapStatesEnum.AVA_STATE.ordinal()][OCTET_STRING.getValue()] = 1692 new GrammarTransition( 1693 LdapStatesEnum.AVA_STATE, 1694 LdapStatesEnum.ATTRIBUTE_DESC_STATE, 1695 OCTET_STRING, 1696 new StoreCompareRequestAttributeDesc() ); 1697 1698 // -------------------------------------------------------------------------------------------- 1699 // Transition from AttributeDesc to Assertion Value 1700 // -------------------------------------------------------------------------------------------- 1701 // AttributeValueAssertion ::= SEQUENCE { 1702 // ... 1703 // assertionValue AssertionValue } 1704 // 1705 // AssertionValue OCTET STRING 1706 // 1707 // Stores the attribute value 1708 super.transitions[LdapStatesEnum.ATTRIBUTE_DESC_STATE.ordinal()][OCTET_STRING.getValue()] = 1709 new GrammarTransition( 1710 LdapStatesEnum.ATTRIBUTE_DESC_STATE, 1711 LdapStatesEnum.ASSERTION_VALUE_STATE, 1712 OCTET_STRING, 1713 new StoreCompareRequestAssertionValue() ); 1714 1715 // -------------------------------------------------------------------------------------------- 1716 // Transition from Assertion Value to Controls 1717 // -------------------------------------------------------------------------------------------- 1718 // AttributeValueAssertion ::= SEQUENCE { 1719 // ... 1720 // assertionValue AssertionValue } 1721 // 1722 // AssertionValue OCTET STRING 1723 // 1724 // Stores the attribute value 1725 super.transitions[LdapStatesEnum.ASSERTION_VALUE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1726 new GrammarTransition( 1727 LdapStatesEnum.ASSERTION_VALUE_STATE, 1728 LdapStatesEnum.CONTROLS_STATE, 1729 LdapCodecConstants.CONTROLS_TAG, 1730 new InitControls() ); 1731 1732 // -------------------------------------------------------------------------------------------- 1733 // CompareResponse Message. 1734 // -------------------------------------------------------------------------------------------- 1735 // LdapMessage ::= ... CompareResponse ... 1736 // CompareResponse ::= [APPLICATION 15] LDAPResult 1737 // We have to switch to the CompareResponse grammar 1738 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.COMPARE_RESPONSE_TAG] = 1739 new GrammarTransition( 1740 LdapStatesEnum.MESSAGE_ID_STATE, 1741 LdapStatesEnum.COMPARE_RESPONSE_STATE, 1742 LdapCodecConstants.COMPARE_RESPONSE_TAG, 1743 new InitCompareResponse() ); 1744 1745 // -------------------------------------------------------------------------------------------- 1746 // CompareResponse Message. 1747 // -------------------------------------------------------------------------------------------- 1748 // LdapMessage ::= ... CompareResponse ... 1749 // CompareResponse ::= [APPLICATION 15] LDAPResult 1750 // 1751 // LDAPResult ::= SEQUENCE { 1752 // resultCode ENUMERATED { 1753 // ... 1754 // 1755 // Stores the result code 1756 super.transitions[LdapStatesEnum.COMPARE_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] = 1757 new GrammarTransition( 1758 LdapStatesEnum.COMPARE_RESPONSE_STATE, 1759 LdapStatesEnum.RESULT_CODE_STATE, 1760 ENUMERATED, 1761 new StoreResultCode() ); 1762 1763 // -------------------------------------------------------------------------------------------- 1764 // Transition from MessageID to SearchResultReference Message. 1765 // -------------------------------------------------------------------------------------------- 1766 // LdapMessage ::= ... SearchResultReference ... 1767 // SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 1768 // 1769 // Initialization of SearchResultReference object 1770 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.SEARCH_RESULT_REFERENCE_TAG] = 1771 new GrammarTransition( 1772 LdapStatesEnum.MESSAGE_ID_STATE, 1773 LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE, 1774 LdapCodecConstants.SEARCH_RESULT_REFERENCE_TAG, 1775 new InitSearchResultReference() ); 1776 1777 // -------------------------------------------------------------------------------------------- 1778 // Transition from SearchResultReference Message to Reference 1779 // -------------------------------------------------------------------------------------------- 1780 // LdapMessage ::= ... SearchResultReference ... 1781 // SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 1782 // 1783 // Initialization of SearchResultReference object 1784 super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE.ordinal()][OCTET_STRING.getValue()] = 1785 new GrammarTransition( 1786 LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE, 1787 LdapStatesEnum.REFERENCE_STATE, 1788 OCTET_STRING, 1789 new StoreReference() ); 1790 1791 // -------------------------------------------------------------------------------------------- 1792 // Transition from Reference to Reference 1793 // -------------------------------------------------------------------------------------------- 1794 // LdapMessage ::= ... SearchResultReference ... 1795 // SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 1796 // 1797 // Initialization of SearchResultReference object 1798 super.transitions[LdapStatesEnum.REFERENCE_STATE.ordinal()][OCTET_STRING.getValue()] = 1799 new GrammarTransition( 1800 LdapStatesEnum.REFERENCE_STATE, 1801 LdapStatesEnum.REFERENCE_STATE, 1802 OCTET_STRING, 1803 new StoreReference() ); 1804 1805 // -------------------------------------------------------------------------------------------- 1806 // Transition from Reference to Controls 1807 // -------------------------------------------------------------------------------------------- 1808 // searchResultReference SearchResultReference, 1809 // ... }, 1810 // controls [0] Controls OPTIONAL } 1811 // 1812 // Initialization the controls 1813 super.transitions[LdapStatesEnum.REFERENCE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1814 new GrammarTransition( 1815 LdapStatesEnum.REFERENCE_STATE, 1816 LdapStatesEnum.CONTROLS_STATE, 1817 LdapCodecConstants.CONTROLS_TAG, 1818 new InitControls() ); 1819 1820 // -------------------------------------------------------------------------------------------- 1821 // Transition from Message Id to ExtendedRequest Message 1822 // -------------------------------------------------------------------------------------------- 1823 // LdapMessage ::= ... ExtendedRequest ... 1824 // ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 1825 // 1826 // Creates the ExtendedRequest object 1827 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.EXTENDED_REQUEST_TAG] = 1828 new GrammarTransition( 1829 LdapStatesEnum.MESSAGE_ID_STATE, 1830 LdapStatesEnum.EXTENDED_REQUEST_STATE, 1831 LdapCodecConstants.EXTENDED_REQUEST_TAG, 1832 new InitExtendedRequest() ); 1833 1834 // -------------------------------------------------------------------------------------------- 1835 // Transition from ExtendedRequest Message to RequestName 1836 // -------------------------------------------------------------------------------------------- 1837 // ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 1838 // requestName [0] LDAPOID, 1839 // ... 1840 // 1841 // Stores the name 1842 super.transitions[LdapStatesEnum.EXTENDED_REQUEST_STATE.ordinal()][LdapCodecConstants.EXTENDED_REQUEST_NAME_TAG] = 1843 new GrammarTransition( 1844 LdapStatesEnum.EXTENDED_REQUEST_STATE, 1845 LdapStatesEnum.REQUEST_NAME_STATE, 1846 LdapCodecConstants.EXTENDED_REQUEST_NAME_TAG, 1847 new StoreExtendedRequestName() ); 1848 1849 // -------------------------------------------------------------------------------------------- 1850 // Transition from RequestName to RequestValue 1851 // -------------------------------------------------------------------------------------------- 1852 // ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 1853 // ... 1854 // requestValue [1] OCTET STRING OPTIONAL } 1855 // 1856 // Stores the value 1857 super.transitions[LdapStatesEnum.REQUEST_NAME_STATE.ordinal()][LdapCodecConstants.EXTENDED_REQUEST_VALUE_TAG] = 1858 new GrammarTransition( 1859 LdapStatesEnum.REQUEST_NAME_STATE, 1860 LdapStatesEnum.REQUEST_VALUE_STATE, 1861 LdapCodecConstants.EXTENDED_REQUEST_VALUE_TAG, 1862 new StoreExtendedRequestValue() ); 1863 1864 // -------------------------------------------------------------------------------------------- 1865 // Transition from RequestName to Controls 1866 // -------------------------------------------------------------------------------------------- 1867 // extendedRequest EtendedRequest, 1868 // ... }, 1869 // controls [0] Controls OPTIONAL } 1870 // 1871 // Stores the value 1872 super.transitions[LdapStatesEnum.REQUEST_NAME_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1873 new GrammarTransition( 1874 LdapStatesEnum.REQUEST_NAME_STATE, 1875 LdapStatesEnum.CONTROLS_STATE, 1876 LdapCodecConstants.CONTROLS_TAG, 1877 new InitControls() ); 1878 1879 // -------------------------------------------------------------------------------------------- 1880 // Transition from RequestValue to Controls 1881 // -------------------------------------------------------------------------------------------- 1882 // extendedRequest EtendedRequest, 1883 // ... }, 1884 // controls [0] Controls OPTIONAL } 1885 // 1886 // Stores the value 1887 super.transitions[LdapStatesEnum.REQUEST_VALUE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 1888 new GrammarTransition( 1889 LdapStatesEnum.REQUEST_VALUE_STATE, 1890 LdapStatesEnum.CONTROLS_STATE, 1891 LdapCodecConstants.CONTROLS_TAG, 1892 new InitControls() ); 1893 1894 // -------------------------------------------------------------------------------------------- 1895 // Transition from MessageId to ExtendedResponse Message. 1896 // -------------------------------------------------------------------------------------------- 1897 // LdapMessage ::= ... ExtendedResponse ... 1898 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1899 // 1900 // Creates the ExtendeResponse object 1901 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.EXTENDED_RESPONSE_TAG] = 1902 new GrammarTransition( 1903 LdapStatesEnum.MESSAGE_ID_STATE, 1904 LdapStatesEnum.EXTENDED_RESPONSE_STATE, 1905 LdapCodecConstants.EXTENDED_RESPONSE_TAG, 1906 new InitExtendedResponse() ); 1907 1908 // -------------------------------------------------------------------------------------------- 1909 // Transition from ExtendedResponse Message to Result Code ER 1910 // -------------------------------------------------------------------------------------------- 1911 // LdapMessage ::= ... ExtendedResponse ... 1912 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1913 // COMPONENTS OF LDAPResult, 1914 // ... 1915 // 1916 // Stores the result code 1917 super.transitions[LdapStatesEnum.EXTENDED_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] = 1918 new GrammarTransition( 1919 LdapStatesEnum.EXTENDED_RESPONSE_STATE, 1920 LdapStatesEnum.RESULT_CODE_ER_STATE, 1921 ENUMERATED, 1922 new StoreResultCode() ); 1923 1924 // -------------------------------------------------------------------------------------------- 1925 // Transition from Result Code ER to Matched Dn ER 1926 // -------------------------------------------------------------------------------------------- 1927 // LdapMessage ::= ... ExtendedResponse ... 1928 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1929 // COMPONENTS OF LDAPResult, 1930 // ... 1931 // 1932 // 1933 super.transitions[LdapStatesEnum.RESULT_CODE_ER_STATE.ordinal()][OCTET_STRING.getValue()] = 1934 new GrammarTransition( 1935 LdapStatesEnum.RESULT_CODE_ER_STATE, 1936 LdapStatesEnum.MATCHED_DN_ER_STATE, 1937 OCTET_STRING, 1938 new StoreMatchedDN() ); 1939 1940 // -------------------------------------------------------------------------------------------- 1941 // Transition from Matched Dn ER to Error Message ER 1942 // -------------------------------------------------------------------------------------------- 1943 // LdapMessage ::= ... ExtendedResponse ... 1944 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1945 // COMPONENTS OF LDAPResult, 1946 // ... 1947 // 1948 // 1949 super.transitions[LdapStatesEnum.MATCHED_DN_ER_STATE.ordinal()][OCTET_STRING.getValue()] = 1950 new GrammarTransition( 1951 LdapStatesEnum.MATCHED_DN_ER_STATE, 1952 LdapStatesEnum.ERROR_MESSAGE_ER_STATE, 1953 OCTET_STRING, 1954 new StoreErrorMessage() ); 1955 1956 // -------------------------------------------------------------------------------------------- 1957 // Transition from Error Message ER to Referrals ER 1958 // -------------------------------------------------------------------------------------------- 1959 // LdapMessage ::= ... ExtendedResponse ... 1960 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1961 // COMPONENTS OF LDAPResult, 1962 // ... 1963 // 1964 // 1965 super.transitions[LdapStatesEnum.ERROR_MESSAGE_ER_STATE.ordinal()][LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG] = 1966 new GrammarTransition( 1967 LdapStatesEnum.ERROR_MESSAGE_ER_STATE, 1968 LdapStatesEnum.REFERRALS_ER_STATE, 1969 LdapCodecConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG, 1970 new InitReferrals() ); 1971 1972 // -------------------------------------------------------------------------------------------- 1973 // Transition from Referrals ER to Referral ER 1974 // -------------------------------------------------------------------------------------------- 1975 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 1976 // URI ::= LDAPString 1977 // 1978 // Add a first Referral 1979 super.transitions[LdapStatesEnum.REFERRALS_ER_STATE.ordinal()][OCTET_STRING.getValue()] = 1980 new GrammarTransition( 1981 LdapStatesEnum.REFERRALS_ER_STATE, 1982 LdapStatesEnum.REFERRAL_ER_STATE, 1983 OCTET_STRING, 1984 new AddReferral() ); 1985 1986 // -------------------------------------------------------------------------------------------- 1987 // Transition from Referral ER to Referral ER 1988 // -------------------------------------------------------------------------------------------- 1989 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 1990 // URI ::= LDAPString 1991 // 1992 // Adda new Referral 1993 super.transitions[LdapStatesEnum.REFERRAL_ER_STATE.ordinal()][OCTET_STRING.getValue()] = 1994 new GrammarTransition( 1995 LdapStatesEnum.REFERRAL_ER_STATE, 1996 LdapStatesEnum.REFERRAL_ER_STATE, 1997 OCTET_STRING, 1998 new AddReferral() ); 1999 2000 // -------------------------------------------------------------------------------------------- 2001 // Transition from Referral ER to ResponseName 2002 // -------------------------------------------------------------------------------------------- 2003 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 2004 // URI ::= LDAPString 2005 // 2006 // Adda new Referral 2007 super.transitions[LdapStatesEnum.REFERRAL_ER_STATE.ordinal()][LdapCodecConstants.EXTENDED_RESPONSE_NAME_TAG] = 2008 new GrammarTransition( 2009 LdapStatesEnum.REFERRAL_ER_STATE, 2010 LdapStatesEnum.RESPONSE_NAME_STATE, 2011 LdapCodecConstants.EXTENDED_RESPONSE_NAME_TAG, 2012 new StoreExtendedResponseName() ); 2013 2014 // -------------------------------------------------------------------------------------------- 2015 // Transition from Referral ER to Response 2016 // -------------------------------------------------------------------------------------------- 2017 // Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511) 2018 // URI ::= LDAPString 2019 // 2020 // Add a new Referral 2021 super.transitions[LdapStatesEnum.REFERRAL_ER_STATE.ordinal()][LdapCodecConstants.EXTENDED_RESPONSE_VALUE_TAG] = 2022 new GrammarTransition( 2023 LdapStatesEnum.REFERRAL_ER_STATE, 2024 LdapStatesEnum.RESPONSE_STATE, 2025 LdapCodecConstants.EXTENDED_RESPONSE_VALUE_TAG, 2026 new StoreExtendedResponseValue() ); 2027 2028 // -------------------------------------------------------------------------------------------- 2029 // Transition from Referral ER to Controls 2030 // -------------------------------------------------------------------------------------------- 2031 // extendedResponse ExtendedResponse, 2032 // ... }, 2033 // controls [0] Controls OPTIONAL } 2034 // 2035 // Adda new Referral 2036 super.transitions[LdapStatesEnum.REFERRAL_ER_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 2037 new GrammarTransition( 2038 LdapStatesEnum.REFERRAL_ER_STATE, 2039 LdapStatesEnum.CONTROLS_STATE, 2040 LdapCodecConstants.CONTROLS_TAG, 2041 new InitControls() ); 2042 2043 // -------------------------------------------------------------------------------------------- 2044 // Transition from Error Message ER to Controls 2045 // -------------------------------------------------------------------------------------------- 2046 // LdapMessage ::= ... ExtendedResponse ... 2047 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2048 // COMPONENTS OF LDAPResult, 2049 // ... 2050 // 2051 // 2052 super.transitions[LdapStatesEnum.ERROR_MESSAGE_ER_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 2053 new GrammarTransition( 2054 LdapStatesEnum.ERROR_MESSAGE_ER_STATE, 2055 LdapStatesEnum.CONTROLS_STATE, 2056 LdapCodecConstants.CONTROLS_TAG, 2057 new InitControls() ); 2058 2059 // -------------------------------------------------------------------------------------------- 2060 // Transition from Error Message ER to ResponseName 2061 // -------------------------------------------------------------------------------------------- 2062 // LdapMessage ::= ... ExtendedResponse ... 2063 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2064 // COMPONENTS OF LDAPResult, 2065 // responseName [10] LDAPOID OPTIONAL, 2066 // ... 2067 // 2068 // Stores the response name 2069 super.transitions[LdapStatesEnum.ERROR_MESSAGE_ER_STATE.ordinal()][LdapCodecConstants.EXTENDED_RESPONSE_NAME_TAG] = 2070 new GrammarTransition( 2071 LdapStatesEnum.ERROR_MESSAGE_ER_STATE, 2072 LdapStatesEnum.RESPONSE_NAME_STATE, 2073 LdapCodecConstants.EXTENDED_RESPONSE_NAME_TAG, 2074 new StoreExtendedResponseName() ); 2075 2076 // -------------------------------------------------------------------------------------------- 2077 // Transition from Response Name to Response 2078 // -------------------------------------------------------------------------------------------- 2079 // LdapMessage ::= ... ExtendedResponse ... 2080 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2081 // ... 2082 // responseName [10] LDAPOID OPTIONAL, 2083 // response [11] OCTET STRING OPTIONAL} 2084 // 2085 // Stores the response 2086 super.transitions[LdapStatesEnum.RESPONSE_NAME_STATE.ordinal()][LdapCodecConstants.EXTENDED_RESPONSE_VALUE_TAG] = 2087 new GrammarTransition( 2088 LdapStatesEnum.RESPONSE_NAME_STATE, 2089 LdapStatesEnum.RESPONSE_STATE, 2090 LdapCodecConstants.EXTENDED_RESPONSE_VALUE_TAG, 2091 new StoreExtendedResponseValue() ); 2092 2093 // -------------------------------------------------------------------------------------------- 2094 // Transition from ResponseName to Controls 2095 // -------------------------------------------------------------------------------------------- 2096 // extendedRequest EtendedRequest, 2097 // ... }, 2098 // controls [0] Controls OPTIONAL } 2099 // 2100 // Init the controls 2101 super.transitions[LdapStatesEnum.RESPONSE_NAME_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 2102 new GrammarTransition( 2103 LdapStatesEnum.RESPONSE_NAME_STATE, 2104 LdapStatesEnum.CONTROLS_STATE, 2105 LdapCodecConstants.CONTROLS_TAG, 2106 new InitControls() ); 2107 2108 // -------------------------------------------------------------------------------------------- 2109 // Transition from Error Message ER to Response 2110 // -------------------------------------------------------------------------------------------- 2111 // LdapMessage ::= ... ExtendedResponse ... 2112 // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2113 // COMPONENTS OF LDAPResult, 2114 // ... 2115 // response [11] OCTET STRING OPTIONAL} 2116 // 2117 // Stores the response 2118 super.transitions[LdapStatesEnum.ERROR_MESSAGE_ER_STATE.ordinal()][LdapCodecConstants.EXTENDED_RESPONSE_VALUE_TAG] = 2119 new GrammarTransition( 2120 LdapStatesEnum.ERROR_MESSAGE_ER_STATE, 2121 LdapStatesEnum.RESPONSE_STATE, 2122 LdapCodecConstants.EXTENDED_RESPONSE_VALUE_TAG, 2123 new StoreExtendedResponseValue() ); 2124 2125 // -------------------------------------------------------------------------------------------- 2126 // Transition from Response to Controls 2127 // -------------------------------------------------------------------------------------------- 2128 // extendedRequest EtendedRequest, 2129 // ... }, 2130 // controls [0] Controls OPTIONAL } 2131 // 2132 // Init the controls 2133 super.transitions[LdapStatesEnum.RESPONSE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 2134 new GrammarTransition( 2135 LdapStatesEnum.RESPONSE_STATE, 2136 LdapStatesEnum.CONTROLS_STATE, 2137 LdapCodecConstants.CONTROLS_TAG, 2138 new InitControls() ); 2139 2140 // -------------------------------------------------------------------------------------------- 2141 // Transition from Message Id to IntermediateResponse Message 2142 // -------------------------------------------------------------------------------------------- 2143 // LdapMessage ::= ... IntermediateResponse ... 2144 // IntermediateResponse ::= [APPLICATION 25] SEQUENCE { 2145 // 2146 // Creates the IntermediateResponse object 2147 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.INTERMEDIATE_RESPONSE_TAG] = 2148 new GrammarTransition( 2149 LdapStatesEnum.MESSAGE_ID_STATE, 2150 LdapStatesEnum.INTERMEDIATE_RESPONSE_STATE, 2151 LdapCodecConstants.INTERMEDIATE_RESPONSE_TAG, 2152 new InitIntermediateResponse() ); 2153 2154 // -------------------------------------------------------------------------------------------- 2155 // Transition from IntermediateResponse Message to ResponseName 2156 // -------------------------------------------------------------------------------------------- 2157 // IntermediateResponse ::= [APPLICATION 25] SEQUENCE { 2158 // responseName [0] LDAPOID OPTIONAL, 2159 // ... 2160 // 2161 // Stores the name 2162 super.transitions[LdapStatesEnum.INTERMEDIATE_RESPONSE_STATE.ordinal()][LdapCodecConstants.INTERMEDIATE_RESPONSE_NAME_TAG] = 2163 new GrammarTransition( 2164 LdapStatesEnum.INTERMEDIATE_RESPONSE_STATE, 2165 LdapStatesEnum.INTERMEDIATE_RESPONSE_NAME_STATE, 2166 LdapCodecConstants.INTERMEDIATE_RESPONSE_NAME_TAG, 2167 new StoreIntermediateResponseName() ); 2168 2169 // -------------------------------------------------------------------------------------------- 2170 // Transition from IntermediateResponse Message to ResponseValue (ResponseName is null) 2171 // -------------------------------------------------------------------------------------------- 2172 // IntermediateResponse ::= [APPLICATION 25] SEQUENCE { 2173 // ... 2174 // responseValue [1] OCTET STRING OPTIONAL 2175 // } 2176 // 2177 // Stores the value 2178 super.transitions[LdapStatesEnum.INTERMEDIATE_RESPONSE_STATE.ordinal()][LdapCodecConstants.INTERMEDIATE_RESPONSE_VALUE_TAG] = 2179 new GrammarTransition( 2180 LdapStatesEnum.INTERMEDIATE_RESPONSE_STATE, 2181 LdapStatesEnum.INTERMEDIATE_RESPONSE_VALUE_STATE, 2182 LdapCodecConstants.INTERMEDIATE_RESPONSE_VALUE_TAG, 2183 new StoreIntermediateResponseValue() ); 2184 2185 // -------------------------------------------------------------------------------------------- 2186 // Transition from ResponseName to ResponseValue 2187 // -------------------------------------------------------------------------------------------- 2188 // IntermediateResponse ::= [APPLICATION 25] SEQUENCE { 2189 // ... 2190 // responseValue [1] OCTET STRING OPTIONAL } 2191 // 2192 // Stores the value 2193 super.transitions[LdapStatesEnum.INTERMEDIATE_RESPONSE_NAME_STATE.ordinal()][LdapCodecConstants.INTERMEDIATE_RESPONSE_VALUE_TAG] = 2194 new GrammarTransition( 2195 LdapStatesEnum.INTERMEDIATE_RESPONSE_NAME_STATE, 2196 LdapStatesEnum.INTERMEDIATE_RESPONSE_VALUE_STATE, 2197 LdapCodecConstants.INTERMEDIATE_RESPONSE_VALUE_TAG, 2198 new StoreIntermediateResponseValue() ); 2199 2200 // -------------------------------------------------------------------------------------------- 2201 // Transition from ResponseName to Controls 2202 // -------------------------------------------------------------------------------------------- 2203 // intermediateResponse IntermediateResponse, 2204 // ... }, 2205 // controls [0] Controls OPTIONAL } 2206 // 2207 // Stores the value 2208 super.transitions[LdapStatesEnum.INTERMEDIATE_RESPONSE_NAME_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 2209 new GrammarTransition( 2210 LdapStatesEnum.INTERMEDIATE_RESPONSE_NAME_STATE, 2211 LdapStatesEnum.CONTROLS_STATE, 2212 LdapCodecConstants.CONTROLS_TAG, 2213 new InitControls() ); 2214 2215 // -------------------------------------------------------------------------------------------- 2216 // Transition from ResponseValue to Controls 2217 // -------------------------------------------------------------------------------------------- 2218 // intermediateResponse IntermediateResponse, 2219 // ... }, 2220 // controls [0] Controls OPTIONAL } 2221 // 2222 // Stores the value 2223 super.transitions[LdapStatesEnum.INTERMEDIATE_RESPONSE_VALUE_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 2224 new GrammarTransition( 2225 LdapStatesEnum.INTERMEDIATE_RESPONSE_VALUE_STATE, 2226 LdapStatesEnum.CONTROLS_STATE, 2227 LdapCodecConstants.CONTROLS_TAG, 2228 new InitControls() ); 2229 2230 // ============================================================================================ 2231 // Transition from Controls to Control 2232 // ============================================================================================ 2233 // ... 2234 // Controls ::= SEQUENCE OF Control 2235 // ... 2236 // 2237 // Initialize the controls 2238 super.transitions[LdapStatesEnum.CONTROLS_STATE.ordinal()][SEQUENCE.getValue()] = 2239 new GrammarTransition( 2240 LdapStatesEnum.CONTROLS_STATE, 2241 LdapStatesEnum.CONTROL_STATE, 2242 SEQUENCE, 2243 new CheckLengthNotNull() ); 2244 2245 // ============================================================================================ 2246 // Transition from Control to ControlType 2247 // ============================================================================================ 2248 // Control ::= SEQUENCE { 2249 // ... 2250 // 2251 // Create a new Control object, and store it in the message Container 2252 super.transitions[LdapStatesEnum.CONTROL_STATE.ordinal()][OCTET_STRING.getValue()] = 2253 new GrammarTransition( 2254 LdapStatesEnum.CONTROL_STATE, 2255 LdapStatesEnum.CONTROL_TYPE_STATE, 2256 OCTET_STRING, 2257 new StoreControlName() ); 2258 2259 // ============================================================================================ 2260 // Transition from ControlType to Control Criticality 2261 // ============================================================================================ 2262 // Control ::= SEQUENCE { 2263 // ... 2264 // criticality BOOLEAN DEFAULT FALSE, 2265 // ... 2266 // 2267 // Store the value in the control object created before 2268 super.transitions[LdapStatesEnum.CONTROL_TYPE_STATE.ordinal()][BOOLEAN.getValue()] = 2269 new GrammarTransition( 2270 LdapStatesEnum.CONTROL_TYPE_STATE, 2271 LdapStatesEnum.CRITICALITY_STATE, 2272 OCTET_STRING, 2273 new StoreControlCriticality() ); 2274 2275 // ============================================================================================ 2276 // Transition from Control Criticality to Control Value 2277 // ============================================================================================ 2278 // Control ::= SEQUENCE { 2279 // ... 2280 // controlValue OCTET STRING OPTIONAL } 2281 // 2282 // Store the value in the control object created before 2283 super.transitions[LdapStatesEnum.CRITICALITY_STATE.ordinal()][OCTET_STRING.getValue()] = 2284 new GrammarTransition( 2285 LdapStatesEnum.CRITICALITY_STATE, 2286 LdapStatesEnum.CONTROL_VALUE_STATE, 2287 OCTET_STRING, 2288 new StoreControlValue() ); 2289 2290 // ============================================================================================ 2291 // Transition from Control Type to Control Value 2292 // ============================================================================================ 2293 // Control ::= SEQUENCE { 2294 // ... 2295 // controlValue OCTET STRING OPTIONAL } 2296 // 2297 // Store the value in the control object created before 2298 super.transitions[LdapStatesEnum.CONTROL_TYPE_STATE.ordinal()][OCTET_STRING.getValue()] = 2299 new GrammarTransition( 2300 LdapStatesEnum.CONTROL_TYPE_STATE, 2301 LdapStatesEnum.CONTROL_VALUE_STATE, 2302 OCTET_STRING, 2303 new StoreControlValue() ); 2304 2305 // ============================================================================================ 2306 // Transition from Control Type to Control 2307 // ============================================================================================ 2308 // Control ::= SEQUENCE { 2309 // ... 2310 // controlValue OCTET STRING OPTIONAL } 2311 // 2312 // Store the value in the control object created before 2313 super.transitions[LdapStatesEnum.CONTROL_TYPE_STATE.ordinal()][SEQUENCE.getValue()] = 2314 new GrammarTransition( 2315 LdapStatesEnum.CONTROL_TYPE_STATE, 2316 LdapStatesEnum.CONTROL_STATE, 2317 SEQUENCE, 2318 new CheckLengthNotNull() ); 2319 2320 // ============================================================================================ 2321 // Transition from Control Criticality to Control 2322 // ============================================================================================ 2323 // Control ::= SEQUENCE { 2324 // ... 2325 // controlValue OCTET STRING OPTIONAL } 2326 // 2327 // Store the value in the control object created before 2328 super.transitions[LdapStatesEnum.CRITICALITY_STATE.ordinal()][SEQUENCE.getValue()] = 2329 new GrammarTransition( 2330 LdapStatesEnum.CRITICALITY_STATE, 2331 LdapStatesEnum.CONTROL_STATE, 2332 SEQUENCE, 2333 new CheckLengthNotNull() ); 2334 2335 // ============================================================================================ 2336 // Transition from Control Value to Control 2337 // ============================================================================================ 2338 // Control ::= SEQUENCE { 2339 // ... 2340 // controlValue OCTET STRING OPTIONAL } 2341 // 2342 // Store the value in the control object created before 2343 super.transitions[LdapStatesEnum.CONTROL_VALUE_STATE.ordinal()][SEQUENCE.getValue()] = 2344 new GrammarTransition( 2345 LdapStatesEnum.CONTROL_VALUE_STATE, 2346 LdapStatesEnum.CONTROL_STATE, 2347 SEQUENCE, 2348 new CheckLengthNotNull() ); 2349 2350 // -------------------------------------------------------------------------------------------- 2351 // Transition from message ID to SearchRequest Message 2352 // -------------------------------------------------------------------------------------------- 2353 // LdapMessage ::= ... SearchRequest ... 2354 // SearchRequest ::= [APPLICATION 3] SEQUENCE { ... 2355 // 2356 // Initialize the searchRequest object 2357 super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapCodecConstants.SEARCH_REQUEST_TAG] = 2358 new GrammarTransition( 2359 LdapStatesEnum.MESSAGE_ID_STATE, 2360 LdapStatesEnum.SEARCH_REQUEST_STATE, 2361 LdapCodecConstants.SEARCH_REQUEST_TAG, 2362 new InitSearchRequest() ); 2363 2364 // -------------------------------------------------------------------------------------------- 2365 // Transition from SearchRequest Message to BaseObject 2366 // -------------------------------------------------------------------------------------------- 2367 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2368 // baseObject LDAPDN, 2369 // ... 2370 // 2371 // We have a value for the base object, we will store it in the message 2372 super.transitions[LdapStatesEnum.SEARCH_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] = 2373 new GrammarTransition( 2374 LdapStatesEnum.SEARCH_REQUEST_STATE, 2375 LdapStatesEnum.BASE_OBJECT_STATE, 2376 OCTET_STRING, 2377 new StoreSearchRequestBaseObject() ); 2378 2379 // -------------------------------------------------------------------------------------------- 2380 // Transition from BaseObject to Scope 2381 // -------------------------------------------------------------------------------------------- 2382 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2383 // ... 2384 // scope ENUMERATED { 2385 // baseObject (0), 2386 // singleLevel (1), 2387 // wholeSubtree (2) }, 2388 // ... 2389 // 2390 // We have a value for the scope, we will store it in the message 2391 super.transitions[LdapStatesEnum.BASE_OBJECT_STATE.ordinal()][ENUMERATED.getValue()] = 2392 new GrammarTransition( 2393 LdapStatesEnum.BASE_OBJECT_STATE, 2394 LdapStatesEnum.SCOPE_STATE, 2395 ENUMERATED, 2396 new StoreSearchRequestScope() ); 2397 2398 // -------------------------------------------------------------------------------------------- 2399 // Transition from Scope to DerefAlias 2400 // -------------------------------------------------------------------------------------------- 2401 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2402 // ... 2403 // derefAliases ENUMERATED { 2404 // neverDerefAliases (0), 2405 // derefInSearching (1), 2406 // derefFindingBaseObj (2), 2407 // derefAlways (3) }, 2408 // ... 2409 // 2410 // We have a value for the derefAliases, we will store it in the message 2411 super.transitions[LdapStatesEnum.SCOPE_STATE.ordinal()][ENUMERATED.getValue()] = 2412 new GrammarTransition( 2413 LdapStatesEnum.SCOPE_STATE, 2414 LdapStatesEnum.DEREF_ALIAS_STATE, 2415 ENUMERATED, 2416 new StoreSearchRequestDerefAlias() ); 2417 2418 // -------------------------------------------------------------------------------------------- 2419 // Transition from DerefAlias to SizeLimit 2420 // -------------------------------------------------------------------------------------------- 2421 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2422 // ... 2423 // sizeLimit INTEGER (0 .. maxInt), 2424 // ... 2425 // 2426 // We have a value for the sizeLimit, we will store it in the message 2427 super.transitions[LdapStatesEnum.DEREF_ALIAS_STATE.ordinal()][INTEGER.getValue()] = new 2428 GrammarTransition( 2429 LdapStatesEnum.DEREF_ALIAS_STATE, 2430 LdapStatesEnum.SIZE_LIMIT_STATE, 2431 INTEGER, 2432 new StoreSearchRequestSizeLimit() ); 2433 2434 // -------------------------------------------------------------------------------------------- 2435 // Transition from SizeLimit to TimeLimit 2436 // -------------------------------------------------------------------------------------------- 2437 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2438 // ... 2439 // timeLimit INTEGER (0 .. maxInt), 2440 // ... 2441 // 2442 // We have a value for the timeLimit, we will store it in the message 2443 super.transitions[LdapStatesEnum.SIZE_LIMIT_STATE.ordinal()][INTEGER.getValue()] = 2444 new GrammarTransition( 2445 LdapStatesEnum.SIZE_LIMIT_STATE, 2446 LdapStatesEnum.TIME_LIMIT_STATE, 2447 INTEGER, 2448 new StoreSearchRequestTimeLimit() ); 2449 2450 // -------------------------------------------------------------------------------------------- 2451 // Transition from TimeLimit to TypesOnly 2452 // -------------------------------------------------------------------------------------------- 2453 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2454 // ... 2455 // typesOnly BOOLEAN, 2456 // ... 2457 // 2458 // We have a value for the typesOnly, we will store it in the message. 2459 super.transitions[LdapStatesEnum.TIME_LIMIT_STATE.ordinal()][BOOLEAN.getValue()] = 2460 new GrammarTransition( 2461 LdapStatesEnum.TIME_LIMIT_STATE, 2462 LdapStatesEnum.TYPES_ONLY_STATE, 2463 BOOLEAN, 2464 new StoreSearchRequestTypesOnly() ); 2465 2466 //============================================================================================ 2467 // Search Request And Filter 2468 // This is quite complicated, because we have a tree structure to build, 2469 // and we may have many elements on each node. For instance, considering the 2470 // search filter : 2471 // (& (| (a = b) (c = d)) (! (e = f)) (attr =* h)) 2472 // We will have to create an And filter with three children : 2473 // - an Or child, 2474 // - a Not child 2475 // - and a Present child. 2476 // The Or child will also have two children. 2477 // 2478 // We know when we have a children while decoding the PDU, because the length 2479 // of its parent has not yet reached its expected length. 2480 // 2481 // This search filter : 2482 // (&(|(objectclass=top)(ou=contacts))(!(objectclass=ttt))(objectclass=*top)) 2483 // is encoded like this : 2484 // +----------------+---------------+ 2485 // | ExpectedLength | CurrentLength | 2486 //+-----------------------------+----------------+---------------+ 2487 //|A0 52 | 82 | 0 | new level 1 2488 //| A1 24 | 82 36 | 0 0 | new level 2 2489 //| A3 12 | 82 36 18 | 0 0 0 | new level 3 2490 //| 04 0B 'objectclass' | 82 36 18 | 0 0 13 | 2491 //| 04 03 'top' | 82 36 18 | 0 20 18 | 2492 //| | ^ ^ | 2493 //| | | | | 2494 //| | +---------------+ | 2495 //+-----------------------------* end level 3 -------------------* 2496 //| A3 0E | 82 36 14 | 0 0 0 | new level 3 2497 //| 04 02 'ou' | 82 36 14 | 0 0 4 | 2498 //| 04 08 'contacts' | 82 36 14 | 38 36 14 | 2499 //| | ^ ^ ^ ^ | 2500 //| | | | | | | 2501 //| | | +-------------|--+ | 2502 //| | +----------------+ | 2503 //+-----------------------------* end level 3, end level 2 ------* 2504 //| A2 14 | 82 20 | 38 0 | new level 2 2505 //| A3 12 | 82 20 18 | 38 0 0 | new level 3 2506 //| 04 0B 'objectclass' | 82 20 18 | 38 0 13 | 2507 //| 04 03 'ttt' | 82 20 18 | 60 20 18 | 2508 //| | ^ ^ ^ ^ | 2509 //| | | | | | | 2510 //| | | +-------------|--+ | 2511 //| | +----------------+ | 2512 //+-----------------------------* end level 3, end level 2 ------* 2513 //| A4 14 | 82 20 | 60 0 | new level 2 2514 //| 04 0B 'objectclass' | 82 20 | 60 13 | 2515 //| 30 05 | 82 20 | 60 13 | 2516 //| 82 03 'top' | 82 20 | 82 20 | 2517 //| | ^ ^ ^ ^ | 2518 //| | | | | | | 2519 //| | | +-------------|--+ | 2520 //| | +----------------+ | 2521 //+-----------------------------* end level 2, end level 1 ------* 2522 //+-----------------------------+----------------+---------------+ 2523 // 2524 // When the current length equals the expected length of the parent PDU, 2525 // then we are able to 'close' the parent : it has all its children. This 2526 // is propagated through all the tree, until either there are no more 2527 // parents, or the expected length of the parent is different from the 2528 // current length. 2529 2530 // -------------------------------------------------------------------------------------------- 2531 // Transition from TypesOnly to AND filter 2532 // -------------------------------------------------------------------------------------------- 2533 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2534 // ... 2535 // filter Filter, 2536 // ... 2537 // 2538 // Filter ::= CHOICE { 2539 // and [0] SET OF Filter, 2540 // ... 2541 // 2542 // Init AND filter 2543 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 2544 new GrammarTransition( 2545 LdapStatesEnum.TYPES_ONLY_STATE, 2546 LdapStatesEnum.AND_STATE, 2547 LdapCodecConstants.AND_FILTER_TAG, 2548 new InitAndFilter() ); 2549 2550 // -------------------------------------------------------------------------------------------- 2551 // Transition from TypesOnly to OR filter 2552 // -------------------------------------------------------------------------------------------- 2553 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2554 // ... 2555 // filter Filter, 2556 // ... 2557 // 2558 // Filter ::= CHOICE { 2559 // ... 2560 // or [1] SET OF Filter, 2561 // ... 2562 // 2563 // Init OR filter 2564 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 2565 new GrammarTransition( 2566 LdapStatesEnum.TYPES_ONLY_STATE, 2567 LdapStatesEnum.OR_STATE, 2568 LdapCodecConstants.OR_FILTER_TAG, 2569 new InitOrFilter() ); 2570 2571 // -------------------------------------------------------------------------------------------- 2572 // Transition from TypesOnly to NOT filter 2573 // -------------------------------------------------------------------------------------------- 2574 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2575 // ... 2576 // filter Filter, 2577 // ... 2578 // 2579 // Filter ::= CHOICE { 2580 // ... 2581 // not [2] SET OF Filter, 2582 // ... 2583 // 2584 // Init NOT filter 2585 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 2586 new GrammarTransition( 2587 LdapStatesEnum.TYPES_ONLY_STATE, 2588 LdapStatesEnum.NOT_STATE, 2589 LdapCodecConstants.NOT_FILTER_TAG, 2590 new InitNotFilter() ); 2591 2592 // -------------------------------------------------------------------------------------------- 2593 // Transition from TypesOnly to Equality Match filter 2594 // -------------------------------------------------------------------------------------------- 2595 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2596 // ... 2597 // filter Filter, 2598 // ... 2599 // 2600 // Filter ::= CHOICE { 2601 // ... 2602 // equalityMatch [3] AttributeValueAssertion, 2603 // ... 2604 // 2605 // Init Equality filter 2606 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 2607 new GrammarTransition( 2608 LdapStatesEnum.TYPES_ONLY_STATE, 2609 LdapStatesEnum.EQUALITY_MATCH_STATE, 2610 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 2611 new InitEqualityMatchFilter() ); 2612 2613 // -------------------------------------------------------------------------------------------- 2614 // Transition from TypesOnly to Substrings filter 2615 // -------------------------------------------------------------------------------------------- 2616 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2617 // ... 2618 // filter Filter, 2619 // ... 2620 // 2621 // Filter ::= CHOICE { 2622 // ... 2623 // substrings [4] SubstringFilter, 2624 // ... 2625 // 2626 // Init Substrings filter 2627 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 2628 new GrammarTransition( 2629 LdapStatesEnum.TYPES_ONLY_STATE, 2630 LdapStatesEnum.SUBSTRING_FILTER_STATE, 2631 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 2632 new InitSubstringsFilter() ); 2633 2634 // -------------------------------------------------------------------------------------------- 2635 // Transition from TypesOnly to GreaterOrEqual filter 2636 // -------------------------------------------------------------------------------------------- 2637 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2638 // ... 2639 // filter Filter, 2640 // ... 2641 // 2642 // Filter ::= CHOICE { 2643 // ... 2644 // greaterOrEqual [5] AttributeValueAssertion, 2645 // ... 2646 // 2647 // Init Greater Or Equal filter 2648 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 2649 new GrammarTransition( 2650 LdapStatesEnum.TYPES_ONLY_STATE, 2651 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 2652 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 2653 new InitGreaterOrEqualFilter() ); 2654 2655 // -------------------------------------------------------------------------------------------- 2656 // Transition from TypesOnly to LessOrEqual filter 2657 // -------------------------------------------------------------------------------------------- 2658 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2659 // ... 2660 // filter Filter, 2661 // ... 2662 // 2663 // Filter ::= CHOICE { 2664 // ... 2665 // LessOrEqual [6] AttributeValueAssertion, 2666 // ... 2667 // 2668 // Init Less Or Equal filter 2669 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 2670 new GrammarTransition( 2671 LdapStatesEnum.TYPES_ONLY_STATE, 2672 LdapStatesEnum.LESS_OR_EQUAL_STATE, 2673 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 2674 new InitLessOrEqualFilter() ); 2675 2676 // -------------------------------------------------------------------------------------------- 2677 // Transition from TypesOnly to Present filter 2678 // -------------------------------------------------------------------------------------------- 2679 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2680 // ... 2681 // filter Filter, 2682 // ... 2683 // 2684 // Filter ::= CHOICE { 2685 // ... 2686 // present [7] AttributeDescription, 2687 // ... 2688 // 2689 // Init Present Match filter 2690 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 2691 new GrammarTransition( 2692 LdapStatesEnum.TYPES_ONLY_STATE, 2693 LdapStatesEnum.PRESENT_STATE, 2694 LdapCodecConstants.PRESENT_FILTER_TAG, 2695 new InitPresentFilter() ); 2696 2697 // -------------------------------------------------------------------------------------------- 2698 // Transition from TypesOnly to Approx Match filter 2699 // -------------------------------------------------------------------------------------------- 2700 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2701 // ... 2702 // filter Filter, 2703 // ... 2704 // 2705 // Filter ::= CHOICE { 2706 // ... 2707 // approxMatch [8] AttributeValueAssertion, 2708 // ... 2709 // 2710 // Init Approx Match filter 2711 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 2712 new GrammarTransition( 2713 LdapStatesEnum.TYPES_ONLY_STATE, 2714 LdapStatesEnum.APPROX_MATCH_STATE, 2715 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 2716 new InitApproxMatchFilter() ); 2717 2718 // -------------------------------------------------------------------------------------------- 2719 // Transition from TypesOnly to Extensible Match filter 2720 // -------------------------------------------------------------------------------------------- 2721 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2722 // ... 2723 // filter Filter, 2724 // ... 2725 // 2726 // Filter ::= CHOICE { 2727 // ... 2728 // extensibleMatch [9] MatchingRuleAssertion, 2729 // ... 2730 // 2731 // Init Extensible Match filter 2732 super.transitions[LdapStatesEnum.TYPES_ONLY_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 2733 new GrammarTransition( 2734 LdapStatesEnum.TYPES_ONLY_STATE, 2735 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 2736 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 2737 new InitExtensibleMatchFilter() ); 2738 2739 // -------------------------------------------------------------------------------------------- 2740 // Transition from AND to AND filter 2741 // -------------------------------------------------------------------------------------------- 2742 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2743 // ... 2744 // filter Filter, 2745 // ... 2746 // 2747 // Filter ::= CHOICE { 2748 // and [0] SET OF Filter, 2749 // ... 2750 // 2751 // Init AND filter 2752 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 2753 new GrammarTransition( 2754 LdapStatesEnum.AND_STATE, 2755 LdapStatesEnum.AND_STATE, 2756 LdapCodecConstants.AND_FILTER_TAG, 2757 new InitAndFilter() ); 2758 2759 // -------------------------------------------------------------------------------------------- 2760 // Transition from AND to OR filter 2761 // -------------------------------------------------------------------------------------------- 2762 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2763 // ... 2764 // filter Filter, 2765 // ... 2766 // 2767 // Filter ::= CHOICE { 2768 // ... 2769 // or [1] SET OF Filter, 2770 // ... 2771 // 2772 // Init OR filter 2773 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 2774 new GrammarTransition( 2775 LdapStatesEnum.AND_STATE, 2776 LdapStatesEnum.OR_STATE, 2777 LdapCodecConstants.OR_FILTER_TAG, 2778 new InitOrFilter() ); 2779 2780 // -------------------------------------------------------------------------------------------- 2781 // Transition from AND to NOT filter 2782 // -------------------------------------------------------------------------------------------- 2783 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2784 // ... 2785 // filter Filter, 2786 // ... 2787 // 2788 // Filter ::= CHOICE { 2789 // ... 2790 // not [2] SET OF Filter, 2791 // ... 2792 // 2793 // Init NOT filter 2794 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 2795 new GrammarTransition( 2796 LdapStatesEnum.AND_STATE, 2797 LdapStatesEnum.NOT_STATE, 2798 LdapCodecConstants.NOT_FILTER_TAG, 2799 new InitNotFilter() ); 2800 2801 // -------------------------------------------------------------------------------------------- 2802 // Transition from AND to Equality Match filter 2803 // -------------------------------------------------------------------------------------------- 2804 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2805 // ... 2806 // filter Filter, 2807 // ... 2808 // 2809 // Filter ::= CHOICE { 2810 // ... 2811 // equalityMatch [3] AttributeValueAssertion, 2812 // ... 2813 // 2814 // Init NOT filter 2815 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 2816 new GrammarTransition( 2817 LdapStatesEnum.AND_STATE, 2818 LdapStatesEnum.EQUALITY_MATCH_STATE, 2819 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 2820 new InitEqualityMatchFilter() ); 2821 2822 // -------------------------------------------------------------------------------------------- 2823 // Transition from AND to Substrings filter 2824 // -------------------------------------------------------------------------------------------- 2825 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2826 // ... 2827 // filter Filter, 2828 // ... 2829 // 2830 // Filter ::= CHOICE { 2831 // ... 2832 // substrings [4] SubstringFilter, 2833 // ... 2834 // 2835 // Init Substrings filter 2836 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 2837 new GrammarTransition( 2838 LdapStatesEnum.AND_STATE, 2839 LdapStatesEnum.SUBSTRING_FILTER_STATE, 2840 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 2841 new InitSubstringsFilter() ); 2842 2843 // -------------------------------------------------------------------------------------------- 2844 // Transition from AND to GreaterOrEqual filter 2845 // -------------------------------------------------------------------------------------------- 2846 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2847 // ... 2848 // filter Filter, 2849 // ... 2850 // 2851 // Filter ::= CHOICE { 2852 // ... 2853 // greaterOrEqual [5] AttributeValueAssertion, 2854 // ... 2855 // 2856 // Init Greater Or Equal filter 2857 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 2858 new GrammarTransition( 2859 LdapStatesEnum.AND_STATE, 2860 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 2861 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 2862 new InitGreaterOrEqualFilter() ); 2863 2864 // -------------------------------------------------------------------------------------------- 2865 // Transition from AND to LessOrEqual filter 2866 // -------------------------------------------------------------------------------------------- 2867 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2868 // ... 2869 // filter Filter, 2870 // ... 2871 // 2872 // Filter ::= CHOICE { 2873 // ... 2874 // LessOrEqual [6] AttributeValueAssertion, 2875 // ... 2876 // 2877 // Init Less Or Equal filter 2878 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 2879 new GrammarTransition( 2880 LdapStatesEnum.AND_STATE, 2881 LdapStatesEnum.LESS_OR_EQUAL_STATE, 2882 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 2883 new InitLessOrEqualFilter() ); 2884 2885 // -------------------------------------------------------------------------------------------- 2886 // Transition from AND to Present filter 2887 // -------------------------------------------------------------------------------------------- 2888 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2889 // ... 2890 // filter Filter, 2891 // ... 2892 // 2893 // Filter ::= CHOICE { 2894 // ... 2895 // present [7] AttributeDescription, 2896 // ... 2897 // 2898 // Init Approx Match filter 2899 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 2900 new GrammarTransition( 2901 LdapStatesEnum.AND_STATE, 2902 LdapStatesEnum.PRESENT_STATE, 2903 LdapCodecConstants.PRESENT_FILTER_TAG, 2904 new InitPresentFilter() ); 2905 2906 // -------------------------------------------------------------------------------------------- 2907 // Transition from AND to Approx Match filter 2908 // -------------------------------------------------------------------------------------------- 2909 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2910 // ... 2911 // filter Filter, 2912 // ... 2913 // 2914 // Filter ::= CHOICE { 2915 // ... 2916 // approxMatch [8] AttributeValueAssertion, 2917 // ... 2918 // 2919 // Init Approx Match filter 2920 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 2921 new GrammarTransition( 2922 LdapStatesEnum.AND_STATE, 2923 LdapStatesEnum.APPROX_MATCH_STATE, 2924 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 2925 new InitApproxMatchFilter() ); 2926 2927 // -------------------------------------------------------------------------------------------- 2928 // Transition from AND to Extensible Match filter 2929 // -------------------------------------------------------------------------------------------- 2930 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2931 // ... 2932 // filter Filter, 2933 // ... 2934 // 2935 // Filter ::= CHOICE { 2936 // ... 2937 // extensibleMatch [9] MatchingRuleAssertion, 2938 // ... 2939 // 2940 // Init Approx Match filter 2941 super.transitions[LdapStatesEnum.AND_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 2942 new GrammarTransition( 2943 LdapStatesEnum.AND_STATE, 2944 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 2945 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 2946 new InitExtensibleMatchFilter() ); 2947 2948 // -------------------------------------------------------------------------------------------- 2949 // Transition from OR to AND filter 2950 // -------------------------------------------------------------------------------------------- 2951 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2952 // ... 2953 // filter Filter, 2954 // ... 2955 // 2956 // Filter ::= CHOICE { 2957 // and [0] SET OF Filter, 2958 // ... 2959 // 2960 // Init AND filter 2961 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 2962 new GrammarTransition( 2963 LdapStatesEnum.OR_STATE, 2964 LdapStatesEnum.AND_STATE, 2965 LdapCodecConstants.AND_FILTER_TAG, 2966 new InitAndFilter() ); 2967 2968 // -------------------------------------------------------------------------------------------- 2969 // Transition from OR to OR filter 2970 // -------------------------------------------------------------------------------------------- 2971 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2972 // ... 2973 // filter Filter, 2974 // ... 2975 // 2976 // Filter ::= CHOICE { 2977 // ... 2978 // or [1] SET OF Filter, 2979 // ... 2980 // 2981 // Init OR filter 2982 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 2983 new GrammarTransition( 2984 LdapStatesEnum.OR_STATE, 2985 LdapStatesEnum.OR_STATE, 2986 LdapCodecConstants.OR_FILTER_TAG, 2987 new InitOrFilter() ); 2988 2989 // -------------------------------------------------------------------------------------------- 2990 // Transition from OR to NOT filter 2991 // -------------------------------------------------------------------------------------------- 2992 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 2993 // ... 2994 // filter Filter, 2995 // ... 2996 // 2997 // Filter ::= CHOICE { 2998 // ... 2999 // not [2] SET OF Filter, 3000 // ... 3001 // 3002 // Init NOT filter 3003 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 3004 new GrammarTransition( 3005 LdapStatesEnum.OR_STATE, 3006 LdapStatesEnum.NOT_STATE, 3007 LdapCodecConstants.NOT_FILTER_TAG, 3008 new InitNotFilter() ); 3009 3010 // -------------------------------------------------------------------------------------------- 3011 // Transition from OR to Equality Match filter 3012 // -------------------------------------------------------------------------------------------- 3013 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3014 // ... 3015 // filter Filter, 3016 // ... 3017 // 3018 // Filter ::= CHOICE { 3019 // ... 3020 // equalityMatch [3] AttributeValueAssertion, 3021 // ... 3022 // 3023 // Init NOT filter 3024 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 3025 new GrammarTransition( 3026 LdapStatesEnum.OR_STATE, 3027 LdapStatesEnum.EQUALITY_MATCH_STATE, 3028 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 3029 new InitEqualityMatchFilter() ); 3030 3031 // -------------------------------------------------------------------------------------------- 3032 // Transition from OR to Substrings filter 3033 // -------------------------------------------------------------------------------------------- 3034 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3035 // ... 3036 // filter Filter, 3037 // ... 3038 // 3039 // Filter ::= CHOICE { 3040 // ... 3041 // substrings [4] SubstringFilter, 3042 // ... 3043 // 3044 // Init Substrings filter 3045 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 3046 new GrammarTransition( 3047 LdapStatesEnum.OR_STATE, 3048 LdapStatesEnum.SUBSTRING_FILTER_STATE, 3049 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 3050 new InitSubstringsFilter() ); 3051 3052 // -------------------------------------------------------------------------------------------- 3053 // Transition from OR to GreaterOrEqual filter 3054 // -------------------------------------------------------------------------------------------- 3055 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3056 // ... 3057 // filter Filter, 3058 // ... 3059 // 3060 // Filter ::= CHOICE { 3061 // ... 3062 // greaterOrEqual [5] AttributeValueAssertion, 3063 // ... 3064 // 3065 // Init Greater Or Equal filter 3066 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 3067 new GrammarTransition( 3068 LdapStatesEnum.OR_STATE, 3069 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 3070 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 3071 new InitGreaterOrEqualFilter() ); 3072 3073 // -------------------------------------------------------------------------------------------- 3074 // Transition from OR to LessOrEqual filter 3075 // -------------------------------------------------------------------------------------------- 3076 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3077 // ... 3078 // filter Filter, 3079 // ... 3080 // 3081 // Filter ::= CHOICE { 3082 // ... 3083 // LessOrEqual [6] AttributeValueAssertion, 3084 // ... 3085 // 3086 // Init Less Or Equal filter 3087 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 3088 new GrammarTransition( 3089 LdapStatesEnum.OR_STATE, 3090 LdapStatesEnum.LESS_OR_EQUAL_STATE, 3091 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 3092 new InitLessOrEqualFilter() ); 3093 3094 // -------------------------------------------------------------------------------------------- 3095 // Transition from OR to Present filter 3096 // -------------------------------------------------------------------------------------------- 3097 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3098 // ... 3099 // filter Filter, 3100 // ... 3101 // 3102 // Filter ::= CHOICE { 3103 // ... 3104 // present [7] AttributeDescription, 3105 // ... 3106 // 3107 // Init Approx Match filter 3108 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 3109 new GrammarTransition( 3110 LdapStatesEnum.OR_STATE, 3111 LdapStatesEnum.PRESENT_STATE, 3112 LdapCodecConstants.PRESENT_FILTER_TAG, 3113 new InitPresentFilter() ); 3114 3115 // -------------------------------------------------------------------------------------------- 3116 // Transition from OR to Approx Match filter 3117 // -------------------------------------------------------------------------------------------- 3118 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3119 // ... 3120 // filter Filter, 3121 // ... 3122 // 3123 // Filter ::= CHOICE { 3124 // ... 3125 // approxMatch [8] AttributeValueAssertion, 3126 // ... 3127 // 3128 // Init Approx Match filter 3129 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 3130 new GrammarTransition( 3131 LdapStatesEnum.OR_STATE, 3132 LdapStatesEnum.APPROX_MATCH_STATE, 3133 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 3134 new InitApproxMatchFilter() ); 3135 3136 // -------------------------------------------------------------------------------------------- 3137 // Transition from OR to Extensible Match filter 3138 // -------------------------------------------------------------------------------------------- 3139 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3140 // ... 3141 // filter Filter, 3142 // ... 3143 // 3144 // Filter ::= CHOICE { 3145 // ... 3146 // extensibleMatch [9] MatchingRuleAssertion, 3147 // ... 3148 // 3149 // Init Approx Match filter 3150 super.transitions[LdapStatesEnum.OR_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 3151 new GrammarTransition( 3152 LdapStatesEnum.OR_STATE, 3153 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 3154 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 3155 new InitExtensibleMatchFilter() ); 3156 3157 // -------------------------------------------------------------------------------------------- 3158 // Transition from NOT to AND filter 3159 // -------------------------------------------------------------------------------------------- 3160 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3161 // ... 3162 // filter Filter, 3163 // ... 3164 // 3165 // Filter ::= CHOICE { 3166 // and [0] SET OF Filter, 3167 // ... 3168 // 3169 // Init AND filter 3170 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 3171 new GrammarTransition( 3172 LdapStatesEnum.NOT_STATE, 3173 LdapStatesEnum.AND_STATE, 3174 LdapCodecConstants.AND_FILTER_TAG, 3175 new InitAndFilter() ); 3176 3177 // -------------------------------------------------------------------------------------------- 3178 // Transition from NOT to OR filter 3179 // -------------------------------------------------------------------------------------------- 3180 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3181 // ... 3182 // filter Filter, 3183 // ... 3184 // 3185 // Filter ::= CHOICE { 3186 // ... 3187 // or [1] SET OF Filter, 3188 // ... 3189 // 3190 // Init OR filter 3191 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 3192 new GrammarTransition( 3193 LdapStatesEnum.NOT_STATE, 3194 LdapStatesEnum.OR_STATE, 3195 LdapCodecConstants.OR_FILTER_TAG, 3196 new InitOrFilter() ); 3197 3198 // -------------------------------------------------------------------------------------------- 3199 // Transition from NOT to NOT filter 3200 // -------------------------------------------------------------------------------------------- 3201 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3202 // ... 3203 // filter Filter, 3204 // ... 3205 // 3206 // Filter ::= CHOICE { 3207 // ... 3208 // not [2] SET OF Filter, 3209 // ... 3210 // 3211 // Init NOT filter 3212 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 3213 new GrammarTransition( 3214 LdapStatesEnum.NOT_STATE, 3215 LdapStatesEnum.NOT_STATE, 3216 LdapCodecConstants.NOT_FILTER_TAG, 3217 new InitNotFilter() ); 3218 3219 // -------------------------------------------------------------------------------------------- 3220 // Transition from NOT to Equality Match filter 3221 // -------------------------------------------------------------------------------------------- 3222 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3223 // ... 3224 // filter Filter, 3225 // ... 3226 // 3227 // Filter ::= CHOICE { 3228 // ... 3229 // equalityMatch [3] AttributeValueAssertion, 3230 // ... 3231 // 3232 // Init NOT filter 3233 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 3234 new GrammarTransition( 3235 LdapStatesEnum.NOT_STATE, 3236 LdapStatesEnum.EQUALITY_MATCH_STATE, 3237 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 3238 new InitEqualityMatchFilter() ); 3239 3240 // -------------------------------------------------------------------------------------------- 3241 // Transition from NOT to Substrings filter 3242 // -------------------------------------------------------------------------------------------- 3243 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3244 // ... 3245 // filter Filter, 3246 // ... 3247 // 3248 // Filter ::= CHOICE { 3249 // ... 3250 // substrings [4] SubstringFilter, 3251 // ... 3252 // 3253 // Init Substrings filter 3254 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 3255 new GrammarTransition( 3256 LdapStatesEnum.NOT_STATE, 3257 LdapStatesEnum.SUBSTRING_FILTER_STATE, 3258 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 3259 new InitSubstringsFilter() ); 3260 3261 // -------------------------------------------------------------------------------------------- 3262 // Transition from NOT to GreaterOrEqual filter 3263 // -------------------------------------------------------------------------------------------- 3264 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3265 // ... 3266 // filter Filter, 3267 // ... 3268 // 3269 // Filter ::= CHOICE { 3270 // ... 3271 // greaterOrEqual [5] AttributeValueAssertion, 3272 // ... 3273 // 3274 // Init Greater Or Equal filter 3275 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 3276 new GrammarTransition( 3277 LdapStatesEnum.NOT_STATE, 3278 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 3279 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 3280 new InitGreaterOrEqualFilter() ); 3281 3282 // -------------------------------------------------------------------------------------------- 3283 // Transition from NOT to LessOrEqual filter 3284 // -------------------------------------------------------------------------------------------- 3285 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3286 // ... 3287 // filter Filter, 3288 // ... 3289 // 3290 // Filter ::= CHOICE { 3291 // ... 3292 // LessOrEqual [6] AttributeValueAssertion, 3293 // ... 3294 // 3295 // Init Less Or Equal filter 3296 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 3297 new GrammarTransition( 3298 LdapStatesEnum.NOT_STATE, 3299 LdapStatesEnum.LESS_OR_EQUAL_STATE, 3300 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 3301 new InitLessOrEqualFilter() ); 3302 3303 // -------------------------------------------------------------------------------------------- 3304 // Transition from NOT to Present filter 3305 // -------------------------------------------------------------------------------------------- 3306 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3307 // ... 3308 // filter Filter, 3309 // ... 3310 // 3311 // Filter ::= CHOICE { 3312 // ... 3313 // present [7] AttributeDescription, 3314 // ... 3315 // 3316 // Init present filter 3317 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 3318 new GrammarTransition( 3319 LdapStatesEnum.NOT_STATE, 3320 LdapStatesEnum.PRESENT_STATE, 3321 LdapCodecConstants.PRESENT_FILTER_TAG, 3322 new InitPresentFilter() ); 3323 3324 // -------------------------------------------------------------------------------------------- 3325 // Transition from NOT to Approx Match filter 3326 // -------------------------------------------------------------------------------------------- 3327 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3328 // ... 3329 // filter Filter, 3330 // ... 3331 // 3332 // Filter ::= CHOICE { 3333 // ... 3334 // approxMatch [8] AttributeValueAssertion, 3335 // ... 3336 // 3337 // Init Approx Match filter 3338 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 3339 new GrammarTransition( 3340 LdapStatesEnum.NOT_STATE, 3341 LdapStatesEnum.APPROX_MATCH_STATE, 3342 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 3343 new InitApproxMatchFilter() ); 3344 3345 // -------------------------------------------------------------------------------------------- 3346 // Transition from NOT to Extensible Match filter 3347 // -------------------------------------------------------------------------------------------- 3348 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3349 // ... 3350 // filter Filter, 3351 // ... 3352 // 3353 // Filter ::= CHOICE { 3354 // ... 3355 // extensibleMatch [9] MatchingRuleAssertion, 3356 // ... 3357 // 3358 // Init extensible match filter 3359 super.transitions[LdapStatesEnum.NOT_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 3360 new GrammarTransition( 3361 LdapStatesEnum.NOT_STATE, 3362 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 3363 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 3364 new InitExtensibleMatchFilter() ); 3365 3366 // -------------------------------------------------------------------------------------------- 3367 // Transition from Equality match to Attribute Desc Filter 3368 // -------------------------------------------------------------------------------------------- 3369 // Filter ::= CHOICE { 3370 // ... 3371 // equalityMatch [3] AttributeValueAssertion, 3372 // ... 3373 // 3374 // AttributeValueAssertion ::= SEQUENCE { 3375 // attributeDesc AttributeDescription, 3376 // ... 3377 // 3378 // Init Attribute Desc filter 3379 super.transitions[LdapStatesEnum.EQUALITY_MATCH_STATE.ordinal()][OCTET_STRING.getValue()] = 3380 new GrammarTransition( 3381 LdapStatesEnum.EQUALITY_MATCH_STATE, 3382 LdapStatesEnum.ATTRIBUTE_DESC_FILTER_STATE, 3383 OCTET_STRING, 3384 new InitAttributeDescFilter() ); 3385 3386 // -------------------------------------------------------------------------------------------- 3387 // Transition from Attribute Desc Filter to Assertion Value Filter 3388 // -------------------------------------------------------------------------------------------- 3389 // Filter ::= CHOICE { 3390 // ... 3391 // equalityMatch [3] AttributeValueAssertion, 3392 // ... 3393 // 3394 // AttributeValueAssertion ::= SEQUENCE { 3395 // ... 3396 // assertionValue AssertionValue } 3397 // 3398 // Init Assertion Value filter 3399 super.transitions[LdapStatesEnum.ATTRIBUTE_DESC_FILTER_STATE.ordinal()][OCTET_STRING.getValue()] = 3400 new GrammarTransition( 3401 LdapStatesEnum.ATTRIBUTE_DESC_FILTER_STATE, 3402 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3403 OCTET_STRING, 3404 new InitAssertionValueFilter() ); 3405 3406 // -------------------------------------------------------------------------------------------- 3407 // Transition from Assertion Value Filter to AND filter 3408 // -------------------------------------------------------------------------------------------- 3409 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3410 // ... 3411 // filter Filter, 3412 // ... 3413 // 3414 // Filter ::= CHOICE { 3415 // and [0] SET OF Filter, 3416 // ... 3417 // 3418 // Init AND filter 3419 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 3420 new GrammarTransition( 3421 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3422 LdapStatesEnum.AND_STATE, 3423 LdapCodecConstants.AND_FILTER_TAG, 3424 new InitAndFilter() ); 3425 3426 // -------------------------------------------------------------------------------------------- 3427 // Transition from Assertion Value Filter to OR filter 3428 // -------------------------------------------------------------------------------------------- 3429 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3430 // ... 3431 // filter Filter, 3432 // ... 3433 // 3434 // Filter ::= CHOICE { 3435 // ... 3436 // or [1] SET OF Filter, 3437 // ... 3438 // 3439 // Init OR filter 3440 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 3441 new GrammarTransition( 3442 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3443 LdapStatesEnum.OR_STATE, 3444 LdapCodecConstants.OR_FILTER_TAG, 3445 new InitOrFilter() ); 3446 3447 // -------------------------------------------------------------------------------------------- 3448 // Transition from Assertion Value Filter to NOT filter 3449 // -------------------------------------------------------------------------------------------- 3450 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3451 // ... 3452 // filter Filter, 3453 // ... 3454 // 3455 // Filter ::= CHOICE { 3456 // ... 3457 // not [2] SET OF Filter, 3458 // ... 3459 // 3460 // Init NOT filter 3461 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 3462 new GrammarTransition( 3463 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3464 LdapStatesEnum.NOT_STATE, 3465 LdapCodecConstants.NOT_FILTER_TAG, 3466 new InitNotFilter() ); 3467 3468 // -------------------------------------------------------------------------------------------- 3469 // Transition from Assertion Value Filter to Equality Match filter 3470 // -------------------------------------------------------------------------------------------- 3471 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3472 // ... 3473 // filter Filter, 3474 // ... 3475 // 3476 // Filter ::= CHOICE { 3477 // ... 3478 // equalityMatch [3] AttributeValueAssertion, 3479 // ... 3480 // 3481 // Init NOT filter 3482 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 3483 new GrammarTransition( 3484 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3485 LdapStatesEnum.EQUALITY_MATCH_STATE, 3486 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 3487 new InitEqualityMatchFilter() ); 3488 3489 // -------------------------------------------------------------------------------------------- 3490 // Transition from Assertion Value Filter to Substrings filter 3491 // -------------------------------------------------------------------------------------------- 3492 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3493 // ... 3494 // filter Filter, 3495 // ... 3496 // 3497 // Filter ::= CHOICE { 3498 // ... 3499 // substrings [4] SubstringFilter, 3500 // ... 3501 // 3502 // Init Substrings filter 3503 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 3504 new GrammarTransition( 3505 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3506 LdapStatesEnum.SUBSTRING_FILTER_STATE, 3507 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 3508 new InitSubstringsFilter() ); 3509 3510 // -------------------------------------------------------------------------------------------- 3511 // Transition from Assertion Value Filter to GreaterOrEqual filter 3512 // -------------------------------------------------------------------------------------------- 3513 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3514 // ... 3515 // filter Filter, 3516 // ... 3517 // 3518 // Filter ::= CHOICE { 3519 // ... 3520 // greaterOrEqual [5] AttributeValueAssertion, 3521 // ... 3522 // 3523 // Init Greater Or Equal filter 3524 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 3525 new GrammarTransition( 3526 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3527 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 3528 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 3529 new InitGreaterOrEqualFilter() ); 3530 3531 // -------------------------------------------------------------------------------------------- 3532 // Transition from Assertion Value Filter to LessOrEqual filter 3533 // -------------------------------------------------------------------------------------------- 3534 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3535 // ... 3536 // filter Filter, 3537 // ... 3538 // 3539 // Filter ::= CHOICE { 3540 // ... 3541 // LessOrEqual [6] AttributeValueAssertion, 3542 // ... 3543 // 3544 // Init Less Or Equal filter 3545 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 3546 new GrammarTransition( 3547 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3548 LdapStatesEnum.LESS_OR_EQUAL_STATE, 3549 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 3550 new InitLessOrEqualFilter() ); 3551 3552 // -------------------------------------------------------------------------------------------- 3553 // Transition from Assertion Value Filter to Present filter 3554 // -------------------------------------------------------------------------------------------- 3555 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3556 // ... 3557 // filter Filter, 3558 // ... 3559 // 3560 // Filter ::= CHOICE { 3561 // ... 3562 // present [7] AttributeDescription, 3563 // ... 3564 // 3565 // Init present filter 3566 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 3567 new GrammarTransition( 3568 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3569 LdapStatesEnum.PRESENT_STATE, 3570 LdapCodecConstants.PRESENT_FILTER_TAG, 3571 new InitPresentFilter() ); 3572 3573 // -------------------------------------------------------------------------------------------- 3574 // Transition from Assertion Value Filter to Approx Match filter 3575 // -------------------------------------------------------------------------------------------- 3576 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3577 // ... 3578 // filter Filter, 3579 // ... 3580 // 3581 // Filter ::= CHOICE { 3582 // ... 3583 // approxMatch [8] AttributeValueAssertion, 3584 // ... 3585 // 3586 // Init Approx Match filter 3587 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 3588 new GrammarTransition( 3589 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3590 LdapStatesEnum.APPROX_MATCH_STATE, 3591 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 3592 new InitApproxMatchFilter() ); 3593 3594 // -------------------------------------------------------------------------------------------- 3595 // Transition from Assertion Value Filter to Extensible Match filter 3596 // -------------------------------------------------------------------------------------------- 3597 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3598 // ... 3599 // filter Filter, 3600 // ... 3601 // 3602 // Filter ::= CHOICE { 3603 // ... 3604 // extensibleMatch [9] MatchingRuleAssertion, 3605 // ... 3606 // 3607 // Init Assertion Value Filter filter 3608 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 3609 new GrammarTransition( 3610 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3611 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 3612 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 3613 new InitExtensibleMatchFilter() ); 3614 3615 // -------------------------------------------------------------------------------------------- 3616 // Transition from Assertion Value Filter to Attribute Description List 3617 // -------------------------------------------------------------------------------------------- 3618 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3619 // ... 3620 // filter Filter, 3621 // attributes AttributeDescriptionList } 3622 // 3623 // AttributeDescriptionList ::= SEQUENCE OF 3624 // AttributeDescription 3625 // 3626 // Init attribute description list 3627 super.transitions[LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE.ordinal()][SEQUENCE.getValue()] = 3628 new GrammarTransition( 3629 LdapStatesEnum.ASSERTION_VALUE_FILTER_STATE, 3630 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 3631 SEQUENCE, 3632 new InitSearchRequestAttributeDescList() ); 3633 3634 // -------------------------------------------------------------------------------------------- 3635 // Transition from Attribute Description List to AttributeDescription 3636 // -------------------------------------------------------------------------------------------- 3637 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3638 // ... 3639 // filter Filter, 3640 // attributes AttributeDescriptionList } 3641 // 3642 // AttributeDescriptionList ::= SEQUENCE OF 3643 // AttributeDescription 3644 // 3645 // Store attribute description 3646 super.transitions[LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE.ordinal()][OCTET_STRING.getValue()] = 3647 new GrammarTransition( 3648 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 3649 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_STATE, 3650 OCTET_STRING, 3651 new StoreSearchRequestAttributeDesc() ); 3652 3653 // -------------------------------------------------------------------------------------------- 3654 // Transition from Attribute Description List to Controls 3655 // -------------------------------------------------------------------------------------------- 3656 // searchRequest SearchRequest, 3657 // ... }, 3658 // controls [0] Controls OPTIONAL } 3659 // 3660 // Empty attribute description list, with controls 3661 super.transitions[LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 3662 new GrammarTransition( 3663 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 3664 LdapStatesEnum.CONTROLS_STATE, 3665 LdapCodecConstants.CONTROLS_TAG, 3666 new InitControls() ); 3667 3668 // -------------------------------------------------------------------------------------------- 3669 // Transition from Attribute Description to AttributeDescription 3670 // -------------------------------------------------------------------------------------------- 3671 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3672 // ... 3673 // filter Filter, 3674 // attributes AttributeDescriptionList } 3675 // 3676 // AttributeDescriptionList ::= SEQUENCE OF 3677 // AttributeDescription 3678 // 3679 // Store attribute description 3680 super.transitions[LdapStatesEnum.ATTRIBUTE_DESCRIPTION_STATE.ordinal()][OCTET_STRING.getValue()] = 3681 new GrammarTransition( 3682 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_STATE, 3683 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_STATE, 3684 OCTET_STRING, 3685 new StoreSearchRequestAttributeDesc() ); 3686 3687 // -------------------------------------------------------------------------------------------- 3688 // transition from Attribute Description to Controls. 3689 // -------------------------------------------------------------------------------------------- 3690 // searchRequest SearchRequest, 3691 // ... }, 3692 // controls [0] Controls OPTIONAL } 3693 // 3694 super.transitions[LdapStatesEnum.ATTRIBUTE_DESCRIPTION_STATE.ordinal()][LdapCodecConstants.CONTROLS_TAG] = 3695 new GrammarTransition( 3696 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_STATE, 3697 LdapStatesEnum.CONTROLS_STATE, 3698 LdapCodecConstants.CONTROLS_TAG, 3699 new InitControls() ); 3700 3701 // -------------------------------------------------------------------------------------------- 3702 // Transition from Greater Or Equal to Attribute Desc Filter 3703 // -------------------------------------------------------------------------------------------- 3704 // Filter ::= CHOICE { 3705 // ... 3706 // greaterOrEqual [5] AttributeValueAssertion, 3707 // ... 3708 // 3709 // AttributeValueAssertion ::= SEQUENCE { 3710 // attributeDesc AttributeDescription, 3711 // ... 3712 // 3713 // Init Attribute Desc filter 3714 super.transitions[LdapStatesEnum.GREATER_OR_EQUAL_STATE.ordinal()][OCTET_STRING.getValue()] = 3715 new GrammarTransition( 3716 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 3717 LdapStatesEnum.ATTRIBUTE_DESC_FILTER_STATE, 3718 OCTET_STRING, 3719 new InitAttributeDescFilter() ); 3720 3721 // -------------------------------------------------------------------------------------------- 3722 // Transition from Less Or Equal to Attribute Desc Filter 3723 // -------------------------------------------------------------------------------------------- 3724 // Filter ::= CHOICE { 3725 // ... 3726 // lessOrEqual [6] AttributeValueAssertion, 3727 // ... 3728 // 3729 // AttributeValueAssertion ::= SEQUENCE { 3730 // attributeDesc AttributeDescription, 3731 // ... 3732 // 3733 // Init Attribute Desc filter 3734 super.transitions[LdapStatesEnum.LESS_OR_EQUAL_STATE.ordinal()][OCTET_STRING.getValue()] = 3735 new GrammarTransition( 3736 LdapStatesEnum.LESS_OR_EQUAL_STATE, 3737 LdapStatesEnum.ATTRIBUTE_DESC_FILTER_STATE, 3738 OCTET_STRING, 3739 new InitAttributeDescFilter() ); 3740 3741 // -------------------------------------------------------------------------------------------- 3742 // Transition from Substrings to typeSubstring 3743 // -------------------------------------------------------------------------------------------- 3744 // Filter ::= CHOICE { 3745 // ... 3746 // substrings [4] SubstringFilter, 3747 // ... 3748 // 3749 // SubstringFilter ::= SEQUENCE { 3750 // type AttributeDescription, 3751 // ... 3752 // 3753 // Init substring type 3754 super.transitions[LdapStatesEnum.SUBSTRING_FILTER_STATE.ordinal()][OCTET_STRING.getValue()] = 3755 new GrammarTransition( 3756 LdapStatesEnum.SUBSTRING_FILTER_STATE, 3757 LdapStatesEnum.TYPE_SUBSTRING_STATE, 3758 OCTET_STRING, 3759 new StoreSubstringFilterType() ); 3760 3761 // -------------------------------------------------------------------------------------------- 3762 // Transition from typeSubstring to substrings 3763 // -------------------------------------------------------------------------------------------- 3764 // Filter ::= CHOICE { 3765 // ... 3766 // substrings [4] SubstringFilter, 3767 // ... 3768 // 3769 // SubstringFilter ::= SEQUENCE { 3770 // ... 3771 // substrings SEQUENCE OF CHOICE { 3772 // ... 3773 // 3774 // Init substring type 3775 super.transitions[LdapStatesEnum.TYPE_SUBSTRING_STATE.ordinal()][SEQUENCE.getValue()] = 3776 new GrammarTransition( 3777 LdapStatesEnum.TYPE_SUBSTRING_STATE, 3778 LdapStatesEnum.SUBSTRINGS_STATE, 3779 SEQUENCE, 3780 new CheckNotNullLength<LdapMessageContainer<SearchRequest>>() ); 3781 3782 // -------------------------------------------------------------------------------------------- 3783 // Transition from substrings to Initial 3784 // -------------------------------------------------------------------------------------------- 3785 // SubstringFilter ::= SEQUENCE { 3786 // ... 3787 // substrings SEQUENCE OF CHOICE { 3788 // initial [0] LDAPSTRING, 3789 // ... 3790 // 3791 // Store initial value 3792 super.transitions[LdapStatesEnum.SUBSTRINGS_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_INITIAL_TAG] = 3793 new GrammarTransition( 3794 LdapStatesEnum.SUBSTRINGS_STATE, 3795 LdapStatesEnum.INITIAL_STATE, 3796 LdapCodecConstants.SUBSTRINGS_FILTER_INITIAL_TAG, 3797 new StoreInitial() ); 3798 3799 // -------------------------------------------------------------------------------------------- 3800 // Transition from substrings to any 3801 // -------------------------------------------------------------------------------------------- 3802 // SubstringFilter ::= SEQUENCE { 3803 // ... 3804 // substrings SEQUENCE OF CHOICE { 3805 // ... 3806 // any [1] LDAPSTRING, 3807 // ... 3808 // 3809 // Store substring any type 3810 super.transitions[LdapStatesEnum.SUBSTRINGS_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_ANY_TAG] = 3811 new GrammarTransition( 3812 LdapStatesEnum.SUBSTRINGS_STATE, 3813 LdapStatesEnum.ANY_STATE, 3814 LdapCodecConstants.SUBSTRINGS_FILTER_ANY_TAG, 3815 new StoreAny() ); 3816 3817 // -------------------------------------------------------------------------------------------- 3818 // Transition from substrings to final 3819 // -------------------------------------------------------------------------------------------- 3820 // SubstringFilter ::= SEQUENCE { 3821 // ... 3822 // substrings SEQUENCE OF CHOICE { 3823 // ... 3824 // final [2] LDAPSTRING } 3825 // 3826 // Store substring final type 3827 super.transitions[LdapStatesEnum.SUBSTRINGS_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_FINAL_TAG] = 3828 new GrammarTransition( 3829 LdapStatesEnum.SUBSTRINGS_STATE, 3830 LdapStatesEnum.FINAL_STATE, 3831 LdapCodecConstants.SUBSTRINGS_FILTER_FINAL_TAG, 3832 new StoreFinal() ); 3833 3834 // -------------------------------------------------------------------------------------------- 3835 // Transition from initial to any 3836 // -------------------------------------------------------------------------------------------- 3837 // SubstringFilter ::= SEQUENCE { 3838 // ... 3839 // substrings SEQUENCE OF CHOICE { 3840 // ... 3841 // any [1] LDAPSTRING, 3842 // ... 3843 // 3844 // Store substring any type 3845 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_ANY_TAG] = 3846 new GrammarTransition( 3847 LdapStatesEnum.INITIAL_STATE, 3848 LdapStatesEnum.ANY_STATE, 3849 LdapCodecConstants.SUBSTRINGS_FILTER_ANY_TAG, 3850 new StoreAny() ); 3851 3852 // -------------------------------------------------------------------------------------------- 3853 // Transition from initial to final 3854 // -------------------------------------------------------------------------------------------- 3855 // SubstringFilter ::= SEQUENCE { 3856 // ... 3857 // substrings SEQUENCE OF CHOICE { 3858 // ... 3859 // final [2] LDAPSTRING } 3860 // 3861 // Store substring final type 3862 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_FINAL_TAG] = 3863 new GrammarTransition( 3864 LdapStatesEnum.INITIAL_STATE, 3865 LdapStatesEnum.FINAL_STATE, 3866 LdapCodecConstants.SUBSTRINGS_FILTER_FINAL_TAG, 3867 new StoreFinal() ); 3868 3869 // -------------------------------------------------------------------------------------------- 3870 // Transition from initial to Attribute Description List 3871 // -------------------------------------------------------------------------------------------- 3872 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3873 // ... 3874 // filter Filter, 3875 // attributes AttributeDescriptionList } 3876 // 3877 // AttributeDescriptionList ::= SEQUENCE OF 3878 // AttributeDescription 3879 // 3880 // Init attribute description list 3881 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][SEQUENCE.getValue()] = 3882 new GrammarTransition( 3883 LdapStatesEnum.INITIAL_STATE, 3884 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 3885 SEQUENCE, 3886 new InitSearchRequestAttributeDescList() ); 3887 3888 // -------------------------------------------------------------------------------------------- 3889 // Transition from initial to AND filter 3890 // -------------------------------------------------------------------------------------------- 3891 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3892 // ... 3893 // filter Filter, 3894 // ... 3895 // 3896 // Filter ::= CHOICE { 3897 // and [0] SET OF Filter, 3898 // ... 3899 // 3900 // Init AND filter 3901 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 3902 new GrammarTransition( 3903 LdapStatesEnum.INITIAL_STATE, 3904 LdapStatesEnum.AND_STATE, 3905 LdapCodecConstants.AND_FILTER_TAG, 3906 new InitAndFilter() ); 3907 3908 // -------------------------------------------------------------------------------------------- 3909 // Transition from initial to OR filter 3910 // -------------------------------------------------------------------------------------------- 3911 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3912 // ... 3913 // filter Filter, 3914 // ... 3915 // 3916 // Filter ::= CHOICE { 3917 // ... 3918 // or [1] SET OF Filter, 3919 // ... 3920 // 3921 // Init OR filter 3922 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 3923 new GrammarTransition( 3924 LdapStatesEnum.INITIAL_STATE, 3925 LdapStatesEnum.OR_STATE, 3926 LdapCodecConstants.OR_FILTER_TAG, 3927 new InitOrFilter() ); 3928 3929 // -------------------------------------------------------------------------------------------- 3930 // Transition from initial to NOT filter 3931 // -------------------------------------------------------------------------------------------- 3932 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3933 // ... 3934 // filter Filter, 3935 // ... 3936 // 3937 // Filter ::= CHOICE { 3938 // ... 3939 // not [2] SET OF Filter, 3940 // ... 3941 // 3942 // Init NOT filter 3943 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 3944 new GrammarTransition( 3945 LdapStatesEnum.INITIAL_STATE, 3946 LdapStatesEnum.NOT_STATE, 3947 LdapCodecConstants.NOT_FILTER_TAG, 3948 new InitNotFilter() ); 3949 3950 // -------------------------------------------------------------------------------------------- 3951 // Transition from initial to Equality Match filter 3952 // -------------------------------------------------------------------------------------------- 3953 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3954 // ... 3955 // filter Filter, 3956 // ... 3957 // 3958 // Filter ::= CHOICE { 3959 // ... 3960 // equalityMatch [3] AttributeValueAssertion, 3961 // ... 3962 // 3963 // Init NOT filter 3964 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 3965 new GrammarTransition( 3966 LdapStatesEnum.INITIAL_STATE, 3967 LdapStatesEnum.EQUALITY_MATCH_STATE, 3968 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 3969 new InitEqualityMatchFilter() ); 3970 3971 // -------------------------------------------------------------------------------------------- 3972 // Transition from initial to Substrings filter 3973 // -------------------------------------------------------------------------------------------- 3974 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3975 // ... 3976 // filter Filter, 3977 // ... 3978 // 3979 // Filter ::= CHOICE { 3980 // ... 3981 // substrings [4] SubstringFilter, 3982 // ... 3983 // 3984 // Init Substrings filter 3985 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 3986 new GrammarTransition( 3987 LdapStatesEnum.INITIAL_STATE, 3988 LdapStatesEnum.SUBSTRING_FILTER_STATE, 3989 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 3990 new InitSubstringsFilter() ); 3991 3992 // -------------------------------------------------------------------------------------------- 3993 // Transition from initial to GreaterOrEqual filter 3994 // -------------------------------------------------------------------------------------------- 3995 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 3996 // ... 3997 // filter Filter, 3998 // ... 3999 // 4000 // Filter ::= CHOICE { 4001 // ... 4002 // greaterOrEqual [5] AttributeValueAssertion, 4003 // ... 4004 // 4005 // Init Greater Or Equal filter 4006 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 4007 new GrammarTransition( 4008 LdapStatesEnum.INITIAL_STATE, 4009 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 4010 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 4011 new InitGreaterOrEqualFilter() ); 4012 4013 // -------------------------------------------------------------------------------------------- 4014 // Transition from initial to LessOrEqual filter 4015 // -------------------------------------------------------------------------------------------- 4016 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4017 // ... 4018 // filter Filter, 4019 // ... 4020 // 4021 // Filter ::= CHOICE { 4022 // ... 4023 // LessOrEqual [6] AttributeValueAssertion, 4024 // ... 4025 // 4026 // Init Less Or Equal filter 4027 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 4028 new GrammarTransition( 4029 LdapStatesEnum.INITIAL_STATE, 4030 LdapStatesEnum.LESS_OR_EQUAL_STATE, 4031 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 4032 new InitLessOrEqualFilter() ); 4033 4034 // -------------------------------------------------------------------------------------------- 4035 // Transition from initial to Present filter 4036 // -------------------------------------------------------------------------------------------- 4037 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4038 // ... 4039 // filter Filter, 4040 // ... 4041 // 4042 // Filter ::= CHOICE { 4043 // ... 4044 // present [7] AttributeDescription, 4045 // ... 4046 // 4047 // Init present filter 4048 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 4049 new GrammarTransition( 4050 LdapStatesEnum.INITIAL_STATE, 4051 LdapStatesEnum.PRESENT_STATE, 4052 LdapCodecConstants.PRESENT_FILTER_TAG, 4053 new InitPresentFilter() ); 4054 4055 // -------------------------------------------------------------------------------------------- 4056 // Transition from initial to Approx Match filter 4057 // -------------------------------------------------------------------------------------------- 4058 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4059 // ... 4060 // filter Filter, 4061 // ... 4062 // 4063 // Filter ::= CHOICE { 4064 // ... 4065 // approxMatch [8] AttributeValueAssertion, 4066 // ... 4067 // 4068 // Init Approx Match filter 4069 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 4070 new GrammarTransition( 4071 LdapStatesEnum.INITIAL_STATE, 4072 LdapStatesEnum.APPROX_MATCH_STATE, 4073 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 4074 new InitApproxMatchFilter() ); 4075 4076 // -------------------------------------------------------------------------------------------- 4077 // Transition from initial to Extensible Match filter 4078 // -------------------------------------------------------------------------------------------- 4079 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4080 // ... 4081 // filter Filter, 4082 // ... 4083 // 4084 // Filter ::= CHOICE { 4085 // ... 4086 // extensibleMatch [9] MatchingRuleAssertion, 4087 // ... 4088 // 4089 // Init Assertion Value Filter filter 4090 super.transitions[LdapStatesEnum.INITIAL_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 4091 new GrammarTransition( 4092 LdapStatesEnum.INITIAL_STATE, 4093 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 4094 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 4095 new InitExtensibleMatchFilter() ); 4096 4097 // -------------------------------------------------------------------------------------------- 4098 // Transition from any to final 4099 // -------------------------------------------------------------------------------------------- 4100 // SubstringFilter ::= SEQUENCE { 4101 // ... 4102 // substrings SEQUENCE OF CHOICE { 4103 // ... 4104 // final [2] LDAPSTRING } 4105 // 4106 // Store substring final type 4107 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_FINAL_TAG] = 4108 new GrammarTransition( 4109 LdapStatesEnum.ANY_STATE, 4110 LdapStatesEnum.FINAL_STATE, 4111 LdapCodecConstants.SUBSTRINGS_FILTER_FINAL_TAG, 4112 new StoreFinal() ); 4113 4114 // -------------------------------------------------------------------------------------------- 4115 // Transition from any to any 4116 // -------------------------------------------------------------------------------------------- 4117 // SubstringFilter ::= SEQUENCE { 4118 // ... 4119 // substrings SEQUENCE OF CHOICE { 4120 // ... 4121 // any [1] LDAPSTRING 4122 // ... 4123 // 4124 // Store substring any type 4125 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_ANY_TAG] = 4126 new GrammarTransition( 4127 LdapStatesEnum.ANY_STATE, 4128 LdapStatesEnum.ANY_STATE, 4129 LdapCodecConstants.SUBSTRINGS_FILTER_ANY_TAG, 4130 new StoreAny() ); 4131 4132 // -------------------------------------------------------------------------------------------- 4133 // Transition from any to Attribute Description List 4134 // -------------------------------------------------------------------------------------------- 4135 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4136 // ... 4137 // filter Filter, 4138 // attributes AttributeDescriptionList } 4139 // 4140 // AttributeDescriptionList ::= SEQUENCE OF 4141 // AttributeDescription 4142 // 4143 // Init attribute description list 4144 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][SEQUENCE.getValue()] = 4145 new GrammarTransition( 4146 LdapStatesEnum.ANY_STATE, 4147 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 4148 SEQUENCE, 4149 new InitSearchRequestAttributeDescList() ); 4150 4151 // -------------------------------------------------------------------------------------------- 4152 // Transition from any to AND filter 4153 // -------------------------------------------------------------------------------------------- 4154 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4155 // ... 4156 // filter Filter, 4157 // ... 4158 // 4159 // Filter ::= CHOICE { 4160 // and [0] SET OF Filter, 4161 // ... 4162 // 4163 // Init AND filter 4164 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 4165 new GrammarTransition( 4166 LdapStatesEnum.ANY_STATE, 4167 LdapStatesEnum.AND_STATE, 4168 LdapCodecConstants.AND_FILTER_TAG, 4169 new InitAndFilter() ); 4170 4171 // -------------------------------------------------------------------------------------------- 4172 // Transition from any to OR filter 4173 // -------------------------------------------------------------------------------------------- 4174 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4175 // ... 4176 // filter Filter, 4177 // ... 4178 // 4179 // Filter ::= CHOICE { 4180 // ... 4181 // or [1] SET OF Filter, 4182 // ... 4183 // 4184 // Init OR filter 4185 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 4186 new GrammarTransition( 4187 LdapStatesEnum.ANY_STATE, 4188 LdapStatesEnum.OR_STATE, 4189 LdapCodecConstants.OR_FILTER_TAG, 4190 new InitOrFilter() ); 4191 4192 // -------------------------------------------------------------------------------------------- 4193 // Transition from any to NOT filter 4194 // -------------------------------------------------------------------------------------------- 4195 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4196 // ... 4197 // filter Filter, 4198 // ... 4199 // 4200 // Filter ::= CHOICE { 4201 // ... 4202 // not [2] SET OF Filter, 4203 // ... 4204 // 4205 // Init NOT filter 4206 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 4207 new GrammarTransition( 4208 LdapStatesEnum.ANY_STATE, 4209 LdapStatesEnum.NOT_STATE, 4210 LdapCodecConstants.NOT_FILTER_TAG, 4211 new InitNotFilter() ); 4212 4213 // -------------------------------------------------------------------------------------------- 4214 // Transition from any to Equality Match filter 4215 // -------------------------------------------------------------------------------------------- 4216 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4217 // ... 4218 // filter Filter, 4219 // ... 4220 // 4221 // Filter ::= CHOICE { 4222 // ... 4223 // equalityMatch [3] AttributeValueAssertion, 4224 // ... 4225 // 4226 // Init NOT filter 4227 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 4228 new GrammarTransition( 4229 LdapStatesEnum.ANY_STATE, 4230 LdapStatesEnum.EQUALITY_MATCH_STATE, 4231 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 4232 new InitEqualityMatchFilter() ); 4233 4234 // -------------------------------------------------------------------------------------------- 4235 // Transition from any to Substrings filter 4236 // -------------------------------------------------------------------------------------------- 4237 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4238 // ... 4239 // filter Filter, 4240 // ... 4241 // 4242 // Filter ::= CHOICE { 4243 // ... 4244 // substrings [4] SubstringFilter, 4245 // ... 4246 // 4247 // Init Substrings filter 4248 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 4249 new GrammarTransition( 4250 LdapStatesEnum.ANY_STATE, 4251 LdapStatesEnum.SUBSTRING_FILTER_STATE, 4252 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 4253 new InitSubstringsFilter() ); 4254 4255 // -------------------------------------------------------------------------------------------- 4256 // Transition from any to GreaterOrEqual filter 4257 // -------------------------------------------------------------------------------------------- 4258 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4259 // ... 4260 // filter Filter, 4261 // ... 4262 // 4263 // Filter ::= CHOICE { 4264 // ... 4265 // greaterOrEqual [5] AttributeValueAssertion, 4266 // ... 4267 // 4268 // Init Greater Or Equal filter 4269 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 4270 new GrammarTransition( 4271 LdapStatesEnum.ANY_STATE, 4272 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 4273 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 4274 new InitGreaterOrEqualFilter() ); 4275 4276 // -------------------------------------------------------------------------------------------- 4277 // Transition from any to LessOrEqual filter 4278 // -------------------------------------------------------------------------------------------- 4279 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4280 // ... 4281 // filter Filter, 4282 // ... 4283 // 4284 // Filter ::= CHOICE { 4285 // ... 4286 // LessOrEqual [6] AttributeValueAssertion, 4287 // ... 4288 // 4289 // Init Less Or Equal filter 4290 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 4291 new GrammarTransition( 4292 LdapStatesEnum.ANY_STATE, 4293 LdapStatesEnum.LESS_OR_EQUAL_STATE, 4294 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 4295 new InitLessOrEqualFilter() ); 4296 4297 // -------------------------------------------------------------------------------------------- 4298 // Transition from any to Present filter 4299 // -------------------------------------------------------------------------------------------- 4300 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4301 // ... 4302 // filter Filter, 4303 // ... 4304 // 4305 // Filter ::= CHOICE { 4306 // ... 4307 // present [7] AttributeDescription, 4308 // ... 4309 // 4310 // Init present filter 4311 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 4312 new GrammarTransition( 4313 LdapStatesEnum.ANY_STATE, 4314 LdapStatesEnum.PRESENT_STATE, 4315 LdapCodecConstants.PRESENT_FILTER_TAG, 4316 new InitPresentFilter() ); 4317 4318 // -------------------------------------------------------------------------------------------- 4319 // Transition from any to Approx Match filter 4320 // -------------------------------------------------------------------------------------------- 4321 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4322 // ... 4323 // filter Filter, 4324 // ... 4325 // 4326 // Filter ::= CHOICE { 4327 // ... 4328 // approxMatch [8] AttributeValueAssertion, 4329 // ... 4330 // 4331 // Init Approx Match filter 4332 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 4333 new GrammarTransition( 4334 LdapStatesEnum.ANY_STATE, 4335 LdapStatesEnum.APPROX_MATCH_STATE, 4336 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 4337 new InitApproxMatchFilter() ); 4338 4339 // -------------------------------------------------------------------------------------------- 4340 // Transition from any to Extensible Match filter 4341 // -------------------------------------------------------------------------------------------- 4342 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4343 // ... 4344 // filter Filter, 4345 // ... 4346 // 4347 // Filter ::= CHOICE { 4348 // ... 4349 // extensibleMatch [9] MatchingRuleAssertion, 4350 // ... 4351 // 4352 // Init Assertion Value Filter filter 4353 super.transitions[LdapStatesEnum.ANY_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 4354 new GrammarTransition( 4355 LdapStatesEnum.ANY_STATE, 4356 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 4357 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 4358 new InitExtensibleMatchFilter() ); 4359 4360 // -------------------------------------------------------------------------------------------- 4361 // Transition from final to Attribute Description List 4362 // -------------------------------------------------------------------------------------------- 4363 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4364 // ... 4365 // filter Filter, 4366 // attributes AttributeDescriptionList } 4367 // 4368 // AttributeDescriptionList ::= SEQUENCE OF 4369 // AttributeDescription 4370 // 4371 // Init attribute description list 4372 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][SEQUENCE.getValue()] = 4373 new GrammarTransition( 4374 LdapStatesEnum.FINAL_STATE, 4375 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 4376 SEQUENCE, 4377 new InitSearchRequestAttributeDescList() ); 4378 4379 // -------------------------------------------------------------------------------------------- 4380 // Transition from final to AND filter 4381 // -------------------------------------------------------------------------------------------- 4382 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4383 // ... 4384 // filter Filter, 4385 // ... 4386 // 4387 // Filter ::= CHOICE { 4388 // and [0] SET OF Filter, 4389 // ... 4390 // 4391 // Init AND filter 4392 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 4393 new GrammarTransition( 4394 LdapStatesEnum.FINAL_STATE, 4395 LdapStatesEnum.AND_STATE, 4396 LdapCodecConstants.AND_FILTER_TAG, 4397 new InitAndFilter() ); 4398 4399 // -------------------------------------------------------------------------------------------- 4400 // Transition from final to OR filter 4401 // -------------------------------------------------------------------------------------------- 4402 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4403 // ... 4404 // filter Filter, 4405 // ... 4406 // 4407 // Filter ::= CHOICE { 4408 // ... 4409 // or [1] SET OF Filter, 4410 // ... 4411 // 4412 // Init OR filter 4413 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 4414 new GrammarTransition( 4415 LdapStatesEnum.FINAL_STATE, 4416 LdapStatesEnum.OR_STATE, 4417 LdapCodecConstants.OR_FILTER_TAG, 4418 new InitOrFilter() ); 4419 4420 // -------------------------------------------------------------------------------------------- 4421 // Transition from final to NOT filter 4422 // -------------------------------------------------------------------------------------------- 4423 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4424 // ... 4425 // filter Filter, 4426 // ... 4427 // 4428 // Filter ::= CHOICE { 4429 // ... 4430 // not [2] SET OF Filter, 4431 // ... 4432 // 4433 // Init NOT filter 4434 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 4435 new GrammarTransition( 4436 LdapStatesEnum.FINAL_STATE, 4437 LdapStatesEnum.NOT_STATE, 4438 LdapCodecConstants.NOT_FILTER_TAG, 4439 new InitNotFilter() ); 4440 4441 // -------------------------------------------------------------------------------------------- 4442 // Transition from final to Equality Match filter 4443 // -------------------------------------------------------------------------------------------- 4444 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4445 // ... 4446 // filter Filter, 4447 // ... 4448 // 4449 // Filter ::= CHOICE { 4450 // ... 4451 // equalityMatch [3] AttributeValueAssertion, 4452 // ... 4453 // 4454 // Init NOT filter 4455 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 4456 new GrammarTransition( 4457 LdapStatesEnum.FINAL_STATE, 4458 LdapStatesEnum.EQUALITY_MATCH_STATE, 4459 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 4460 new InitEqualityMatchFilter() ); 4461 4462 // -------------------------------------------------------------------------------------------- 4463 // Transition from final to Substrings filter 4464 // -------------------------------------------------------------------------------------------- 4465 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4466 // ... 4467 // filter Filter, 4468 // ... 4469 // 4470 // Filter ::= CHOICE { 4471 // ... 4472 // substrings [4] SubstringFilter, 4473 // ... 4474 // 4475 // Init Substrings filter 4476 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 4477 new GrammarTransition( 4478 LdapStatesEnum.FINAL_STATE, 4479 LdapStatesEnum.SUBSTRING_FILTER_STATE, 4480 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 4481 new InitSubstringsFilter() ); 4482 4483 // -------------------------------------------------------------------------------------------- 4484 // Transition from final to GreaterOrEqual filter 4485 // -------------------------------------------------------------------------------------------- 4486 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4487 // ... 4488 // filter Filter, 4489 // ... 4490 // 4491 // Filter ::= CHOICE { 4492 // ... 4493 // greaterOrEqual [5] AttributeValueAssertion, 4494 // ... 4495 // 4496 // Init Greater Or Equal filter 4497 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 4498 new GrammarTransition( 4499 LdapStatesEnum.FINAL_STATE, 4500 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 4501 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 4502 new InitGreaterOrEqualFilter() ); 4503 4504 // -------------------------------------------------------------------------------------------- 4505 // Transition from final to LessOrEqual filter 4506 // -------------------------------------------------------------------------------------------- 4507 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4508 // ... 4509 // filter Filter, 4510 // ... 4511 // 4512 // Filter ::= CHOICE { 4513 // ... 4514 // LessOrEqual [6] AttributeValueAssertion, 4515 // ... 4516 // 4517 // Init Less Or Equal filter 4518 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 4519 new GrammarTransition( 4520 LdapStatesEnum.FINAL_STATE, 4521 LdapStatesEnum.LESS_OR_EQUAL_STATE, 4522 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 4523 new InitLessOrEqualFilter() ); 4524 4525 // -------------------------------------------------------------------------------------------- 4526 // Transition from final to Present filter 4527 // -------------------------------------------------------------------------------------------- 4528 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4529 // ... 4530 // filter Filter, 4531 // ... 4532 // 4533 // Filter ::= CHOICE { 4534 // ... 4535 // present [7] AttributeDescription, 4536 // ... 4537 // 4538 // Init present filter 4539 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 4540 new GrammarTransition( 4541 LdapStatesEnum.FINAL_STATE, 4542 LdapStatesEnum.PRESENT_STATE, 4543 LdapCodecConstants.PRESENT_FILTER_TAG, 4544 new InitPresentFilter() ); 4545 4546 // -------------------------------------------------------------------------------------------- 4547 // Transition from final to Approx Match filter 4548 // -------------------------------------------------------------------------------------------- 4549 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4550 // ... 4551 // filter Filter, 4552 // ... 4553 // 4554 // Filter ::= CHOICE { 4555 // ... 4556 // approxMatch [8] AttributeValueAssertion, 4557 // ... 4558 // 4559 // Init Approx Match filter 4560 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 4561 new GrammarTransition( 4562 LdapStatesEnum.FINAL_STATE, 4563 LdapStatesEnum.APPROX_MATCH_STATE, 4564 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 4565 new InitApproxMatchFilter() ); 4566 4567 // -------------------------------------------------------------------------------------------- 4568 // Transition from final to Extensible Match filter 4569 // -------------------------------------------------------------------------------------------- 4570 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4571 // ... 4572 // filter Filter, 4573 // ... 4574 // 4575 // Filter ::= CHOICE { 4576 // ... 4577 // extensibleMatch [9] MatchingRuleAssertion, 4578 // ... 4579 // 4580 // Init Assertion Value Filter filter 4581 super.transitions[LdapStatesEnum.FINAL_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 4582 new GrammarTransition( 4583 LdapStatesEnum.FINAL_STATE, 4584 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 4585 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 4586 new InitExtensibleMatchFilter() ); 4587 4588 // -------------------------------------------------------------------------------------------- 4589 // Transition from Present Filter to AND filter 4590 // -------------------------------------------------------------------------------------------- 4591 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4592 // ... 4593 // filter Filter, 4594 // ... 4595 // 4596 // Filter ::= CHOICE { 4597 // and [0] SET OF Filter, 4598 // ... 4599 // 4600 // Init AND filter 4601 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 4602 new GrammarTransition( 4603 LdapStatesEnum.PRESENT_STATE, 4604 LdapStatesEnum.AND_STATE, 4605 LdapCodecConstants.AND_FILTER_TAG, 4606 new InitAndFilter() ); 4607 4608 // -------------------------------------------------------------------------------------------- 4609 // Transition from Present Filter to OR filter 4610 // -------------------------------------------------------------------------------------------- 4611 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4612 // ... 4613 // filter Filter, 4614 // ... 4615 // 4616 // Filter ::= CHOICE { 4617 // ... 4618 // or [1] SET OF Filter, 4619 // ... 4620 // 4621 // Init OR filter 4622 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 4623 new GrammarTransition( 4624 LdapStatesEnum.PRESENT_STATE, 4625 LdapStatesEnum.OR_STATE, 4626 LdapCodecConstants.OR_FILTER_TAG, 4627 new InitOrFilter() ); 4628 4629 // -------------------------------------------------------------------------------------------- 4630 // Transition from Present Filter to NOT filter 4631 // -------------------------------------------------------------------------------------------- 4632 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4633 // ... 4634 // filter Filter, 4635 // ... 4636 // 4637 // Filter ::= CHOICE { 4638 // ... 4639 // not [2] SET OF Filter, 4640 // ... 4641 // 4642 // Init NOT filter 4643 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 4644 new GrammarTransition( 4645 LdapStatesEnum.PRESENT_STATE, 4646 LdapStatesEnum.NOT_STATE, 4647 LdapCodecConstants.NOT_FILTER_TAG, 4648 new InitNotFilter() ); 4649 4650 // -------------------------------------------------------------------------------------------- 4651 // Transition from Present Filter to Equality Match filter 4652 // -------------------------------------------------------------------------------------------- 4653 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4654 // ... 4655 // filter Filter, 4656 // ... 4657 // 4658 // Filter ::= CHOICE { 4659 // ... 4660 // equalityMatch [3] AttributeValueAssertion, 4661 // ... 4662 // 4663 // Init NOT filter 4664 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 4665 new GrammarTransition( 4666 LdapStatesEnum.PRESENT_STATE, 4667 LdapStatesEnum.EQUALITY_MATCH_STATE, 4668 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 4669 new InitEqualityMatchFilter() ); 4670 4671 // -------------------------------------------------------------------------------------------- 4672 // Transition from Present Filter to Substrings filter 4673 // -------------------------------------------------------------------------------------------- 4674 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4675 // ... 4676 // filter Filter, 4677 // ... 4678 // 4679 // Filter ::= CHOICE { 4680 // ... 4681 // substrings [4] SubstringFilter, 4682 // ... 4683 // 4684 // Init Substrings filter 4685 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 4686 new GrammarTransition( 4687 LdapStatesEnum.PRESENT_STATE, 4688 LdapStatesEnum.SUBSTRING_FILTER_STATE, 4689 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 4690 new InitSubstringsFilter() ); 4691 4692 // -------------------------------------------------------------------------------------------- 4693 // Transition from Present Filter to GreaterOrEqual filter 4694 // -------------------------------------------------------------------------------------------- 4695 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4696 // ... 4697 // filter Filter, 4698 // ... 4699 // 4700 // Filter ::= CHOICE { 4701 // ... 4702 // greaterOrEqual [5] AttributeValueAssertion, 4703 // ... 4704 // 4705 // Init Greater Or Equal filter 4706 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 4707 new GrammarTransition( 4708 LdapStatesEnum.PRESENT_STATE, 4709 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 4710 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 4711 new InitGreaterOrEqualFilter() ); 4712 4713 // -------------------------------------------------------------------------------------------- 4714 // Transition from Present Filter to LessOrEqual filter 4715 // -------------------------------------------------------------------------------------------- 4716 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4717 // ... 4718 // filter Filter, 4719 // ... 4720 // 4721 // Filter ::= CHOICE { 4722 // ... 4723 // LessOrEqual [6] AttributeValueAssertion, 4724 // ... 4725 // 4726 // Init Less Or Equal filter 4727 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 4728 new GrammarTransition( 4729 LdapStatesEnum.PRESENT_STATE, 4730 LdapStatesEnum.LESS_OR_EQUAL_STATE, 4731 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 4732 new InitLessOrEqualFilter() ); 4733 4734 // -------------------------------------------------------------------------------------------- 4735 // Transition from Present Filter to Present filter 4736 // -------------------------------------------------------------------------------------------- 4737 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4738 // ... 4739 // filter Filter, 4740 // ... 4741 // 4742 // Filter ::= CHOICE { 4743 // ... 4744 // present [7] AttributeDescription, 4745 // ... 4746 // 4747 // Init present filter 4748 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 4749 new GrammarTransition( 4750 LdapStatesEnum.PRESENT_STATE, 4751 LdapStatesEnum.PRESENT_STATE, 4752 LdapCodecConstants.PRESENT_FILTER_TAG, 4753 new InitPresentFilter() ); 4754 4755 // -------------------------------------------------------------------------------------------- 4756 // Transition from Present Filter to Approx Match filter 4757 // -------------------------------------------------------------------------------------------- 4758 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4759 // ... 4760 // filter Filter, 4761 // ... 4762 // 4763 // Filter ::= CHOICE { 4764 // ... 4765 // approxMatch [8] AttributeValueAssertion, 4766 // ... 4767 // 4768 // Init Approx Match filter 4769 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 4770 new GrammarTransition( 4771 LdapStatesEnum.PRESENT_STATE, 4772 LdapStatesEnum.APPROX_MATCH_STATE, 4773 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 4774 new InitApproxMatchFilter() ); 4775 4776 // -------------------------------------------------------------------------------------------- 4777 // Transition from Present Filter to Extensible Match filter 4778 // -------------------------------------------------------------------------------------------- 4779 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4780 // ... 4781 // filter Filter, 4782 // ... 4783 // 4784 // Filter ::= CHOICE { 4785 // ... 4786 // extensibleMatch [9] MatchingRuleAssertion, 4787 // ... 4788 // 4789 // Init Assertion Value Filter filter 4790 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 4791 new GrammarTransition( 4792 LdapStatesEnum.PRESENT_STATE, 4793 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 4794 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 4795 new InitExtensibleMatchFilter() ); 4796 4797 // -------------------------------------------------------------------------------------------- 4798 // Transition from Present Filter to Attribute Description List 4799 // -------------------------------------------------------------------------------------------- 4800 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4801 // ... 4802 // filter Filter, 4803 // attributes AttributeDescriptionList } 4804 // 4805 // AttributeDescriptionList ::= SEQUENCE OF 4806 // AttributeDescription 4807 // 4808 // Init attribute description list 4809 super.transitions[LdapStatesEnum.PRESENT_STATE.ordinal()][SEQUENCE.getValue()] = 4810 new GrammarTransition( 4811 LdapStatesEnum.PRESENT_STATE, 4812 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 4813 SEQUENCE, 4814 new InitSearchRequestAttributeDescList() ); 4815 4816 // -------------------------------------------------------------------------------------------- 4817 // Transition from Approx Match to Attribute Desc Filter 4818 // -------------------------------------------------------------------------------------------- 4819 // Filter ::= CHOICE { 4820 // ... 4821 // approxMatch [8] AttributeValueAssertion, 4822 // ... 4823 // 4824 // AttributeValueAssertion ::= SEQUENCE { 4825 // attributeDesc AttributeDescription, 4826 // ... 4827 // 4828 // Init Attribute Desc filter 4829 super.transitions[LdapStatesEnum.APPROX_MATCH_STATE.ordinal()][OCTET_STRING.getValue()] = 4830 new GrammarTransition( 4831 LdapStatesEnum.APPROX_MATCH_STATE, 4832 LdapStatesEnum.ATTRIBUTE_DESC_FILTER_STATE, 4833 OCTET_STRING, 4834 new InitAttributeDescFilter() ); 4835 4836 // -------------------------------------------------------------------------------------------- 4837 // Transition from Extensible Match to MatchingRule 4838 // -------------------------------------------------------------------------------------------- 4839 // Filter ::= CHOICE { 4840 // ... 4841 // extensibleMatch [9] MatchingRuleAssertion } 4842 // 4843 // MatchingRuleAssertion ::= SEQUENCE { 4844 // matchingRule [1] MatchingRuleId OPTIONAL, 4845 // ... 4846 // 4847 // Store the matching rule ID 4848 super.transitions[LdapStatesEnum.EXTENSIBLE_MATCH_STATE.ordinal()][LdapCodecConstants.MATCHING_RULE_ID_TAG] = new GrammarTransition( 4849 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, LdapStatesEnum.MATCHING_RULE_STATE, 4850 LdapCodecConstants.MATCHING_RULE_ID_TAG, 4851 new StoreMatchingRuleId() ); 4852 4853 // -------------------------------------------------------------------------------------------- 4854 // Transition from Extensible Match to type matching rule 4855 // -------------------------------------------------------------------------------------------- 4856 // Filter ::= CHOICE { 4857 // ... 4858 // extensibleMatch [9] MatchingRuleAssertion } 4859 // 4860 // MatchingRuleAssertion ::= SEQUENCE { 4861 // ... 4862 // type [2] AttributeDescription OPTIONAL, 4863 // ... 4864 // 4865 // Store the matching rule ID 4866 super.transitions[LdapStatesEnum.EXTENSIBLE_MATCH_STATE.ordinal()][LdapCodecConstants.MATCHING_RULE_TYPE_TAG] = 4867 new GrammarTransition( 4868 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 4869 LdapStatesEnum.TYPE_MATCHING_RULE_STATE, 4870 LdapCodecConstants.MATCHING_RULE_TYPE_TAG, 4871 new StoreMatchingRuleType() ); 4872 4873 // -------------------------------------------------------------------------------------------- 4874 // Transition from Extensible Match to match value 4875 // -------------------------------------------------------------------------------------------- 4876 // Filter ::= CHOICE { 4877 // ... 4878 // extensibleMatch [9] MatchingRuleAssertion } 4879 // 4880 // MatchingRuleAssertion ::= SEQUENCE { 4881 // ... 4882 // matchValue [3] AssertionValue, 4883 // ... 4884 // 4885 // Store the match value 4886 /* 4887 super.transitions[LdapStatesEnum.EXTENSIBLE_MATCH_STATE.ordinal()][LdapCodecConstants.MATCH_VALUE_TAG] = 4888 new GrammarTransition( 4889 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 4890 LdapStatesEnum.MATCH_VALUE_STATE, 4891 LdapCodecConstants.MATCH_VALUE_TAG, 4892 new StoreMatchValue() ); 4893 */ 4894 4895 // -------------------------------------------------------------------------------------------- 4896 // Transition from matching rule to type matching rule 4897 // -------------------------------------------------------------------------------------------- 4898 // Filter ::= CHOICE { 4899 // ... 4900 // extensibleMatch [9] MatchingRuleAssertion } 4901 // 4902 // MatchingRuleAssertion ::= SEQUENCE { 4903 // ... 4904 // type [2] AttributeDescription OPTIONAL, 4905 // ... 4906 // 4907 // Store the matching rule ID 4908 super.transitions[LdapStatesEnum.MATCHING_RULE_STATE.ordinal()][LdapCodecConstants.MATCHING_RULE_TYPE_TAG] = 4909 new GrammarTransition( 4910 LdapStatesEnum.MATCHING_RULE_STATE, 4911 LdapStatesEnum.TYPE_MATCHING_RULE_STATE, 4912 LdapCodecConstants.MATCHING_RULE_TYPE_TAG, 4913 new StoreMatchingRuleType() ); 4914 4915 // -------------------------------------------------------------------------------------------- 4916 // Transition from matching rule to match value 4917 // -------------------------------------------------------------------------------------------- 4918 // Filter ::= CHOICE { 4919 // ... 4920 // extensibleMatch [9] MatchingRuleAssertion } 4921 // 4922 // MatchingRuleAssertion ::= SEQUENCE { 4923 // ... 4924 // matchValue [3] AssertionValue, 4925 // ... 4926 // 4927 // Store the matching value 4928 super.transitions[LdapStatesEnum.MATCHING_RULE_STATE.ordinal()][LdapCodecConstants.MATCH_VALUE_TAG] = 4929 new GrammarTransition( 4930 LdapStatesEnum.MATCHING_RULE_STATE, 4931 LdapStatesEnum.MATCH_VALUE_STATE, 4932 LdapCodecConstants.MATCH_VALUE_TAG, 4933 new StoreMatchValue() ); 4934 4935 // -------------------------------------------------------------------------------------------- 4936 // Transition from matching type to match value 4937 // -------------------------------------------------------------------------------------------- 4938 // Filter ::= CHOICE { 4939 // ... 4940 // extensibleMatch [9] MatchingRuleAssertion } 4941 // 4942 // MatchingRuleAssertion ::= SEQUENCE { 4943 // ... 4944 // matchValue [3] AssertionValue, 4945 // ... 4946 // 4947 // Store the matching value 4948 super.transitions[LdapStatesEnum.TYPE_MATCHING_RULE_STATE.ordinal()][LdapCodecConstants.MATCH_VALUE_TAG] = 4949 new GrammarTransition( 4950 LdapStatesEnum.TYPE_MATCHING_RULE_STATE, 4951 LdapStatesEnum.MATCH_VALUE_STATE, 4952 LdapCodecConstants.MATCH_VALUE_TAG, 4953 new StoreMatchValue() ); 4954 4955 // -------------------------------------------------------------------------------------------- 4956 // Transition from match value to dnAttributes 4957 // -------------------------------------------------------------------------------------------- 4958 // Filter ::= CHOICE { 4959 // ... 4960 // extensibleMatch [9] MatchingRuleAssertion } 4961 // 4962 // MatchingRuleAssertion ::= SEQUENCE { 4963 // ... 4964 // dnAttributes [4] BOOLEAN DEFAULT FALSE } 4965 // 4966 // Store the dnAttributes flag 4967 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.DN_ATTRIBUTES_FILTER_TAG] = 4968 new GrammarTransition( 4969 LdapStatesEnum.MATCH_VALUE_STATE, 4970 LdapStatesEnum.DN_ATTRIBUTES_STATE, 4971 LdapCodecConstants.DN_ATTRIBUTES_FILTER_TAG, 4972 new StoreMatchingRuleDnAttributes() ); 4973 4974 // -------------------------------------------------------------------------------------------- 4975 // Transition from match value to AND filter 4976 // -------------------------------------------------------------------------------------------- 4977 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4978 // ... 4979 // filter Filter, 4980 // ... 4981 // 4982 // Filter ::= CHOICE { 4983 // and [0] SET OF Filter, 4984 // ... 4985 // 4986 // Init AND filter 4987 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 4988 new GrammarTransition( 4989 LdapStatesEnum.MATCH_VALUE_STATE, 4990 LdapStatesEnum.AND_STATE, 4991 LdapCodecConstants.AND_FILTER_TAG, 4992 new InitAndFilter() ); 4993 4994 // -------------------------------------------------------------------------------------------- 4995 // Transition from match value to OR filter 4996 // -------------------------------------------------------------------------------------------- 4997 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 4998 // ... 4999 // filter Filter, 5000 // ... 5001 // 5002 // Filter ::= CHOICE { 5003 // ... 5004 // or [1] SET OF Filter, 5005 // ... 5006 // 5007 // Init OR filter 5008 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 5009 new GrammarTransition( 5010 LdapStatesEnum.MATCH_VALUE_STATE, 5011 LdapStatesEnum.OR_STATE, 5012 LdapCodecConstants.OR_FILTER_TAG, 5013 new InitOrFilter() ); 5014 5015 // -------------------------------------------------------------------------------------------- 5016 // Transition from match value to NOT filter 5017 // -------------------------------------------------------------------------------------------- 5018 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5019 // ... 5020 // filter Filter, 5021 // ... 5022 // 5023 // Filter ::= CHOICE { 5024 // ... 5025 // not [2] SET OF Filter, 5026 // ... 5027 // 5028 // Init NOT filter 5029 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 5030 new GrammarTransition( 5031 LdapStatesEnum.MATCH_VALUE_STATE, 5032 LdapStatesEnum.NOT_STATE, 5033 LdapCodecConstants.NOT_FILTER_TAG, 5034 new InitNotFilter() ); 5035 5036 // -------------------------------------------------------------------------------------------- 5037 // Transition from match value to Equality Match filter 5038 // -------------------------------------------------------------------------------------------- 5039 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5040 // ... 5041 // filter Filter, 5042 // ... 5043 // 5044 // Filter ::= CHOICE { 5045 // ... 5046 // equalityMatch [3] AttributeValueAssertion, 5047 // ... 5048 // 5049 // Init NOT filter 5050 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 5051 new GrammarTransition( 5052 LdapStatesEnum.MATCH_VALUE_STATE, 5053 LdapStatesEnum.EQUALITY_MATCH_STATE, 5054 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 5055 new InitEqualityMatchFilter() ); 5056 5057 // -------------------------------------------------------------------------------------------- 5058 // Transition from match value to Substrings filter 5059 // -------------------------------------------------------------------------------------------- 5060 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5061 // ... 5062 // filter Filter, 5063 // ... 5064 // 5065 // Filter ::= CHOICE { 5066 // ... 5067 // substrings [4] SubstringFilter, 5068 // ... 5069 // 5070 // Init Substrings filter 5071 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 5072 new GrammarTransition( 5073 LdapStatesEnum.MATCH_VALUE_STATE, 5074 LdapStatesEnum.SUBSTRING_FILTER_STATE, 5075 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 5076 new InitSubstringsFilter() ); 5077 5078 // -------------------------------------------------------------------------------------------- 5079 // Transition from match value to GreaterOrEqual filter 5080 // -------------------------------------------------------------------------------------------- 5081 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5082 // ... 5083 // filter Filter, 5084 // ... 5085 // 5086 // Filter ::= CHOICE { 5087 // ... 5088 // greaterOrEqual [5] AttributeValueAssertion, 5089 // ... 5090 // 5091 // Init Greater Or Equal filter 5092 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 5093 new GrammarTransition( 5094 LdapStatesEnum.MATCH_VALUE_STATE, 5095 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 5096 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 5097 new InitGreaterOrEqualFilter() ); 5098 5099 // -------------------------------------------------------------------------------------------- 5100 // Transition from match value to LessOrEqual filter 5101 // -------------------------------------------------------------------------------------------- 5102 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5103 // ... 5104 // filter Filter, 5105 // ... 5106 // 5107 // Filter ::= CHOICE { 5108 // ... 5109 // LessOrEqual [6] AttributeValueAssertion, 5110 // ... 5111 // 5112 // Init Less Or Equal filter 5113 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 5114 new GrammarTransition( 5115 LdapStatesEnum.MATCH_VALUE_STATE, 5116 LdapStatesEnum.LESS_OR_EQUAL_STATE, 5117 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 5118 new InitLessOrEqualFilter() ); 5119 5120 // -------------------------------------------------------------------------------------------- 5121 // Transition from match value to Present filter 5122 // -------------------------------------------------------------------------------------------- 5123 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5124 // ... 5125 // filter Filter, 5126 // ... 5127 // 5128 // Filter ::= CHOICE { 5129 // ... 5130 // present [7] AttributeDescription, 5131 // ... 5132 // 5133 // Init present filter 5134 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 5135 new GrammarTransition( 5136 LdapStatesEnum.MATCH_VALUE_STATE, 5137 LdapStatesEnum.PRESENT_STATE, 5138 LdapCodecConstants.PRESENT_FILTER_TAG, 5139 new InitPresentFilter() ); 5140 5141 // -------------------------------------------------------------------------------------------- 5142 // Transition from match value to Approx Match filter 5143 // -------------------------------------------------------------------------------------------- 5144 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5145 // ... 5146 // filter Filter, 5147 // ... 5148 // 5149 // Filter ::= CHOICE { 5150 // ... 5151 // approxMatch [8] AttributeValueAssertion, 5152 // ... 5153 // 5154 // Init Approx Match filter 5155 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 5156 new GrammarTransition( 5157 LdapStatesEnum.MATCH_VALUE_STATE, 5158 LdapStatesEnum.APPROX_MATCH_STATE, 5159 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 5160 new InitApproxMatchFilter() ); 5161 5162 // -------------------------------------------------------------------------------------------- 5163 // Transition from match value to Extensible Match filter 5164 // -------------------------------------------------------------------------------------------- 5165 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5166 // ... 5167 // filter Filter, 5168 // ... 5169 // 5170 // Filter ::= CHOICE { 5171 // ... 5172 // extensibleMatch [9] MatchingRuleAssertion, 5173 // ... 5174 // 5175 // Init Assertion Value Filter filter 5176 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 5177 new GrammarTransition( 5178 LdapStatesEnum.MATCH_VALUE_STATE, 5179 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 5180 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 5181 new InitExtensibleMatchFilter() ); 5182 5183 // -------------------------------------------------------------------------------------------- 5184 // Transition from match value to Attribute Description List 5185 // -------------------------------------------------------------------------------------------- 5186 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5187 // ... 5188 // filter Filter, 5189 // attributes AttributeDescriptionList } 5190 // 5191 // AttributeDescriptionList ::= SEQUENCE OF 5192 // AttributeDescription 5193 // 5194 // Init attribute description list 5195 super.transitions[LdapStatesEnum.MATCH_VALUE_STATE.ordinal()][SEQUENCE.getValue()] = 5196 new GrammarTransition( 5197 LdapStatesEnum.MATCH_VALUE_STATE, 5198 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 5199 SEQUENCE, 5200 new InitSearchRequestAttributeDescList() ); 5201 5202 // -------------------------------------------------------------------------------------------- 5203 // Transition from dnAttributes to AND filter 5204 // -------------------------------------------------------------------------------------------- 5205 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5206 // ... 5207 // filter Filter, 5208 // ... 5209 // 5210 // Filter ::= CHOICE { 5211 // and [0] SET OF Filter, 5212 // ... 5213 // 5214 // Init AND filter 5215 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.AND_FILTER_TAG] = 5216 new GrammarTransition( 5217 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5218 LdapStatesEnum.AND_STATE, 5219 LdapCodecConstants.AND_FILTER_TAG, 5220 new InitAndFilter() ); 5221 5222 // -------------------------------------------------------------------------------------------- 5223 // Transition from dnAttributes to OR filter 5224 // -------------------------------------------------------------------------------------------- 5225 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5226 // ... 5227 // filter Filter, 5228 // ... 5229 // 5230 // Filter ::= CHOICE { 5231 // ... 5232 // or [1] SET OF Filter, 5233 // ... 5234 // 5235 // Init OR filter 5236 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.OR_FILTER_TAG] = 5237 new GrammarTransition( 5238 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5239 LdapStatesEnum.OR_STATE, 5240 LdapCodecConstants.OR_FILTER_TAG, 5241 new InitOrFilter() ); 5242 5243 // -------------------------------------------------------------------------------------------- 5244 // Transition from dnAttributes to NOT filter 5245 // -------------------------------------------------------------------------------------------- 5246 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5247 // ... 5248 // filter Filter, 5249 // ... 5250 // 5251 // Filter ::= CHOICE { 5252 // ... 5253 // not [2] SET OF Filter, 5254 // ... 5255 // 5256 // Init NOT filter 5257 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.NOT_FILTER_TAG] = 5258 new GrammarTransition( 5259 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5260 LdapStatesEnum.NOT_STATE, 5261 LdapCodecConstants.NOT_FILTER_TAG, 5262 new InitNotFilter() ); 5263 5264 // -------------------------------------------------------------------------------------------- 5265 // Transition from dnAttributes to Equality Match filter 5266 // -------------------------------------------------------------------------------------------- 5267 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5268 // ... 5269 // filter Filter, 5270 // ... 5271 // 5272 // Filter ::= CHOICE { 5273 // ... 5274 // equalityMatch [3] AttributeValueAssertion, 5275 // ... 5276 // 5277 // Init NOT filter 5278 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG] = 5279 new GrammarTransition( 5280 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5281 LdapStatesEnum.EQUALITY_MATCH_STATE, 5282 LdapCodecConstants.EQUALITY_MATCH_FILTER_TAG, 5283 new InitEqualityMatchFilter() ); 5284 5285 // -------------------------------------------------------------------------------------------- 5286 // Transition from dnAttributes to Substrings filter 5287 // -------------------------------------------------------------------------------------------- 5288 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5289 // ... 5290 // filter Filter, 5291 // ... 5292 // 5293 // Filter ::= CHOICE { 5294 // ... 5295 // substrings [4] SubstringFilter, 5296 // ... 5297 // 5298 // Init Substrings filter 5299 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.SUBSTRINGS_FILTER_TAG] = 5300 new GrammarTransition( 5301 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5302 LdapStatesEnum.SUBSTRING_FILTER_STATE, 5303 LdapCodecConstants.SUBSTRINGS_FILTER_TAG, 5304 new InitSubstringsFilter() ); 5305 5306 // -------------------------------------------------------------------------------------------- 5307 // Transition from dnAttributes to GreaterOrEqual filter 5308 // -------------------------------------------------------------------------------------------- 5309 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5310 // ... 5311 // filter Filter, 5312 // ... 5313 // 5314 // Filter ::= CHOICE { 5315 // ... 5316 // greaterOrEqual [5] AttributeValueAssertion, 5317 // ... 5318 // 5319 // Init Greater Or Equal filter 5320 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG] = 5321 new GrammarTransition( 5322 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5323 LdapStatesEnum.GREATER_OR_EQUAL_STATE, 5324 LdapCodecConstants.GREATER_OR_EQUAL_FILTER_TAG, 5325 new InitGreaterOrEqualFilter() ); 5326 5327 // -------------------------------------------------------------------------------------------- 5328 // Transition from dnAttributes to LessOrEqual filter 5329 // -------------------------------------------------------------------------------------------- 5330 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5331 // ... 5332 // filter Filter, 5333 // ... 5334 // 5335 // Filter ::= CHOICE { 5336 // ... 5337 // LessOrEqual [6] AttributeValueAssertion, 5338 // ... 5339 // 5340 // Init Less Or Equal filter 5341 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG] = 5342 new GrammarTransition( 5343 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5344 LdapStatesEnum.LESS_OR_EQUAL_STATE, 5345 LdapCodecConstants.LESS_OR_EQUAL_FILTER_TAG, 5346 new InitLessOrEqualFilter() ); 5347 5348 // -------------------------------------------------------------------------------------------- 5349 // Transition from dnAttributes to Present filter 5350 // -------------------------------------------------------------------------------------------- 5351 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5352 // ... 5353 // filter Filter, 5354 // ... 5355 // 5356 // Filter ::= CHOICE { 5357 // ... 5358 // present [7] AttributeDescription, 5359 // ... 5360 // 5361 // Init present filter 5362 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.PRESENT_FILTER_TAG] = 5363 new GrammarTransition( 5364 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5365 LdapStatesEnum.PRESENT_STATE, 5366 LdapCodecConstants.PRESENT_FILTER_TAG, 5367 new InitPresentFilter() ); 5368 5369 // -------------------------------------------------------------------------------------------- 5370 // Transition from dnAttributes to Approx Match filter 5371 // -------------------------------------------------------------------------------------------- 5372 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5373 // ... 5374 // filter Filter, 5375 // ... 5376 // 5377 // Filter ::= CHOICE { 5378 // ... 5379 // approxMatch [8] AttributeValueAssertion, 5380 // ... 5381 // 5382 // Init Approx Match filter 5383 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.APPROX_MATCH_FILTER_TAG] = 5384 new GrammarTransition( 5385 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5386 LdapStatesEnum.APPROX_MATCH_STATE, 5387 LdapCodecConstants.APPROX_MATCH_FILTER_TAG, 5388 new InitApproxMatchFilter() ); 5389 5390 // -------------------------------------------------------------------------------------------- 5391 // Transition from dnAttributes to Extensible Match filter 5392 // -------------------------------------------------------------------------------------------- 5393 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5394 // ... 5395 // filter Filter, 5396 // ... 5397 // 5398 // Filter ::= CHOICE { 5399 // ... 5400 // extensibleMatch [9] MatchingRuleAssertion, 5401 // ... 5402 // 5403 // Init Assertion Value Filter filter 5404 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG] = 5405 new GrammarTransition( 5406 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5407 LdapStatesEnum.EXTENSIBLE_MATCH_STATE, 5408 LdapCodecConstants.EXTENSIBLE_MATCH_FILTER_TAG, 5409 new InitExtensibleMatchFilter() ); 5410 5411 // -------------------------------------------------------------------------------------------- 5412 // Transition from dnAttributes to Attribute Description List 5413 // -------------------------------------------------------------------------------------------- 5414 // SearchRequest ::= [APPLICATION 3] SEQUENCE { 5415 // ... 5416 // filter Filter, 5417 // attributes AttributeDescriptionList } 5418 // 5419 // AttributeDescriptionList ::= SEQUENCE OF 5420 // AttributeDescription 5421 // 5422 // Init attribute description list 5423 super.transitions[LdapStatesEnum.DN_ATTRIBUTES_STATE.ordinal()][SEQUENCE.getValue()] = 5424 new GrammarTransition( 5425 LdapStatesEnum.DN_ATTRIBUTES_STATE, 5426 LdapStatesEnum.ATTRIBUTE_DESCRIPTION_LIST_STATE, 5427 SEQUENCE, 5428 new InitSearchRequestAttributeDescList() ); 5429 } 5430 5431 5432 /** 5433 * Get the instance of this grammar 5434 * 5435 * @return An instance on the LdapMessage Grammar 5436 */ 5437 @SuppressWarnings("rawtypes") 5438 public static Grammar getInstance() 5439 { 5440 return instance; 5441 } 5442}