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