super.transitions[LdapStatesEnum.REFERRALS_BR_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.REFERRALS_BR_STATE,
LdapStatesEnum.REFERRAL_BR_STATE,
OCTET_STRING,
new AddReferral() );
// --------------------------------------------------------------------------------------------
// Transition from Referral BR to Referral BR
// --------------------------------------------------------------------------------------------
// Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)
// URI ::= LDAPString
//
// Adda new Referral
super.transitions[LdapStatesEnum.REFERRAL_BR_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.REFERRAL_BR_STATE,
LdapStatesEnum.REFERRAL_BR_STATE,
OCTET_STRING,
new AddReferral() );
// --------------------------------------------------------------------------------------------
// Transition from Referral BR to Server SASL Credentials
// --------------------------------------------------------------------------------------------
// Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)
// URI ::= LDAPString
//
// Adda new Referral
super.transitions[LdapStatesEnum.REFERRAL_BR_STATE.ordinal()][LdapConstants.SERVER_SASL_CREDENTIAL_TAG] =
new GrammarTransition(
LdapStatesEnum.REFERRAL_BR_STATE,
LdapStatesEnum.SERVER_SASL_CREDENTIALS_STATE,
LdapConstants.SERVER_SASL_CREDENTIAL_TAG,
new StoreServerSASLCreds() );
// --------------------------------------------------------------------------------------------
// Transition from Referral BR to Controls
// --------------------------------------------------------------------------------------------
// bindResponse BindResponse,
// ... },
// controls [0] Controls OPTIONAL }
//
// Adda new Referral
super.transitions[LdapStatesEnum.REFERRAL_BR_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.REFERRAL_BR_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from Error Message BR to controls
// --------------------------------------------------------------------------------------------
// bindResponse BindResponse,
// ... },
// controls [0] Controls OPTIONAL }
//
//
super.transitions[LdapStatesEnum.ERROR_MESSAGE_BR_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.ERROR_MESSAGE_BR_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from Server SASL credentials to Controls
// --------------------------------------------------------------------------------------------
// bindResponse BindResponse,
// ... },
// controls [0] Controls OPTIONAL }
//
super.transitions[LdapStatesEnum.SERVER_SASL_CREDENTIALS_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.SERVER_SASL_CREDENTIALS_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from Result Code to Matched Dn
// --------------------------------------------------------------------------------------------
// LDAPResult ::= SEQUENCE {
// ...
// matchedDN LDAPDN,
// ...
//
// Stores the matched Dn
super.transitions[LdapStatesEnum.RESULT_CODE_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.RESULT_CODE_STATE,
LdapStatesEnum.MATCHED_DN_STATE,
OCTET_STRING,
new StoreMatchedDN() );
// --------------------------------------------------------------------------------------------
// Transition from Matched Dn to Error Message
// --------------------------------------------------------------------------------------------
// LDAPResult ::= SEQUENCE {
// ...
// errorMessage LDAPString,
// ...
//
// Stores the error message
super.transitions[LdapStatesEnum.MATCHED_DN_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.MATCHED_DN_STATE,
LdapStatesEnum.ERROR_MESSAGE_STATE,
OCTET_STRING,
new StoreErrorMessage() );
// --------------------------------------------------------------------------------------------
// Transition from Error Message to Referrals
// --------------------------------------------------------------------------------------------
// LDAPResult ::= SEQUENCE {
// ...
// referral [3] Referral OPTIONNAL }
//
// Initialize the referrals list
super.transitions[LdapStatesEnum.ERROR_MESSAGE_STATE.ordinal()][LdapConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.ERROR_MESSAGE_STATE,
LdapStatesEnum.REFERRALS_STATE,
LdapConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG,
new InitReferrals() );
// --------------------------------------------------------------------------------------------
// Transition from Referrals to Referral
// --------------------------------------------------------------------------------------------
// Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)
// URI ::= LDAPString
//
// Add a first Referral
super.transitions[LdapStatesEnum.REFERRALS_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.REFERRALS_STATE,
LdapStatesEnum.REFERRAL_STATE,
OCTET_STRING,
new AddReferral() );
// --------------------------------------------------------------------------------------------
// Transition from Referral to Referral
// --------------------------------------------------------------------------------------------
// Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)
// URI ::= LDAPString
//
// Adda new Referral
super.transitions[LdapStatesEnum.REFERRAL_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.REFERRAL_STATE,
LdapStatesEnum.REFERRAL_STATE,
OCTET_STRING,
new AddReferral() );
// --------------------------------------------------------------------------------------------
// Transition from Referral to Controls
// --------------------------------------------------------------------------------------------
// xxxResponse xxxResponse,
// ... },
// controls [0] Controls OPTIONAL }
//
// Adda new Referral
super.transitions[LdapStatesEnum.REFERRAL_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.REFERRAL_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from Error Message to controls
// --------------------------------------------------------------------------------------------
// xxxResponse xxxResponse,
// ... },
// controls [0] Controls OPTIONAL }
//
//
super.transitions[LdapStatesEnum.ERROR_MESSAGE_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.ERROR_MESSAGE_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from MessageId to SearchResultEntry Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... SearchResultEntry ...
// SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ...
//
// Initialize the searchResultEntry object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.SEARCH_RESULT_ENTRY_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.SEARCH_RESULT_ENTRY_STATE,
LdapConstants.SEARCH_RESULT_ENTRY_TAG,
new InitSearchResultEntry() );
// --------------------------------------------------------------------------------------------
// Transition from SearchResultEntry Message to ObjectName
// --------------------------------------------------------------------------------------------
// SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ...
// objectName LDAPDN,
// ...
//
// Store the object name.
super.transitions[LdapStatesEnum.SEARCH_RESULT_ENTRY_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_ENTRY_STATE,
LdapStatesEnum.OBJECT_NAME_STATE,
OCTET_STRING,
new StoreSearchResultEntryObjectName() );
// --------------------------------------------------------------------------------------------
// Transition from ObjectName to AttributesSR
// --------------------------------------------------------------------------------------------
// SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ...
// ...
// attributes PartialAttributeList }
//
// PartialAttributeList ::= *SEQUENCE* OF SEQUENCE {
// ...
//
// We may have no attributes. Just allows the grammar to end
super.transitions[LdapStatesEnum.OBJECT_NAME_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.OBJECT_NAME_STATE,
LdapStatesEnum.ATTRIBUTES_SR_STATE,
SEQUENCE,
new AllowGrammarEnd() );
// --------------------------------------------------------------------------------------------
// Transition from AttributesSR to PartialAttributesList
// --------------------------------------------------------------------------------------------
// SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ...
// ...
// attributes PartialAttributeList }
//
// PartialAttributeList ::= SEQUENCE OF *SEQUENCE* {
// ...
//
// nothing to do
super.transitions[LdapStatesEnum.ATTRIBUTES_SR_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTES_SR_STATE,
LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE,
SEQUENCE,
null );
// --------------------------------------------------------------------------------------------
// Transition from AttributesSR to Controls
// --------------------------------------------------------------------------------------------
// searchResultEntry SearchResultEntry,
// ... },
// controls [0] Controls OPTIONAL }
//
// Initialize the controls
super.transitions[LdapStatesEnum.ATTRIBUTES_SR_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTES_SR_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from PartialAttributesList to typeSR
// --------------------------------------------------------------------------------------------
// SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ...
// ...
// attributes PartialAttributeList }
//
// PartialAttributeList ::= SEQUENCE OF SEQUENCE {
// type AttributeDescription,
// ...
//
// Store the attribute's name.
super.transitions[LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE,
LdapStatesEnum.TYPE_SR_STATE,
OCTET_STRING,
new AddAttributeType() );
// --------------------------------------------------------------------------------------------
// Transition from typeSR to ValsSR
// --------------------------------------------------------------------------------------------
// SearchResultEntry ::= [APPLICATION 4] SEQUENCE { ...
// ...
// attributes PartialAttributeList }
//
// PartialAttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// We may have no value. Just allows the grammar to end
super.transitions[LdapStatesEnum.TYPE_SR_STATE.ordinal()][SET.getValue()] =
new GrammarTransition(
LdapStatesEnum.TYPE_SR_STATE,
LdapStatesEnum.VALS_SR_STATE,
SET,
new AllowGrammarEnd() );
// --------------------------------------------------------------------------------------------
// Transition from ValsSR to AttributeValueSR
// --------------------------------------------------------------------------------------------
// PartialAttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue ::= OCTET STRING
//
// Store the attribute value
super.transitions[LdapStatesEnum.VALS_SR_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.VALS_SR_STATE,
LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE,
OCTET_STRING,
new StoreSearchResultAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from ValsSR to PartialAttributesList
// --------------------------------------------------------------------------------------------
// PartialAttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// Loop when we don't have any attribute value. Nothing to do
super.transitions[LdapStatesEnum.VALS_SR_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.VALS_SR_STATE,
LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from ValsSR to Controls
// --------------------------------------------------------------------------------------------
// searchResultEntry SearchResultEntry,
// ... },
// controls [0] Controls OPTIONAL }
//
// Initialize the controls
super.transitions[LdapStatesEnum.VALS_SR_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.VALS_SR_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from AttributeValueSR to AttributeValueSR
// --------------------------------------------------------------------------------------------
// PartialAttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue ::= OCTET STRING
//
// Store the attribute value
super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE,
LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE,
OCTET_STRING,
new StoreSearchResultAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from AttributeValueSR to PartialAttributesList
// --------------------------------------------------------------------------------------------
// PartialAttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// Loop when we don't have any attribute value. Nothing to do
super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE,
LdapStatesEnum.PARTIAL_ATTRIBUTES_LIST_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from AttributeValueSR to Controls
// --------------------------------------------------------------------------------------------
// searchResultEntry SearchResultEntry,
// ... },
// controls [0] Controls OPTIONAL }
//
// Initialize the controls
super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_VALUE_SR_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// SearchResultDone Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... SearchResultDone ...
// SearchResultDone ::= [APPLICATION 5] SEQUENCE { ...
//
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.SEARCH_RESULT_DONE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.SEARCH_RESULT_DONE_STATE,
LdapConstants.SEARCH_RESULT_DONE_TAG,
new InitSearchResultDone() );
// --------------------------------------------------------------------------------------------
// SearchResultDone Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... SearchResultDone ...
// SearchResultDone ::= [APPLICATION 5] LDAPResult
//
// LDAPResult ::= SEQUENCE {
// resultCode ENUMERATED {
// ...
//
// Stores the result code
super.transitions[LdapStatesEnum.SEARCH_RESULT_DONE_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_DONE_STATE,
LdapStatesEnum.RESULT_CODE_STATE,
ENUMERATED,
new StoreResultCode() );
// --------------------------------------------------------------------------------------------
// Transition from Message ID to ModifyRequest Message
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ModifyRequest ...
// ModifyRequest ::= [APPLICATION 6] SEQUENCE { ...
//
// Creates the Modify Request object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.MODIFY_REQUEST_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.MODIFY_REQUEST_STATE,
LdapConstants.MODIFY_REQUEST_TAG,
new InitModifyRequest() );
// --------------------------------------------------------------------------------------------
// Transition from ModifyRequest Message to Object
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// object LDAPDN,
// ...
//
// Stores the object Dn
super.transitions[LdapStatesEnum.MODIFY_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.MODIFY_REQUEST_STATE,
LdapStatesEnum.OBJECT_STATE,
OCTET_STRING,
new StoreModifyRequestObjectName() );
// --------------------------------------------------------------------------------------------
// Transition from Object to modifications
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification *SEQUENCE OF* SEQUENCE {
// ...
//
// Initialize the modifications list
super.transitions[LdapStatesEnum.OBJECT_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.OBJECT_STATE,
LdapStatesEnum.MODIFICATIONS_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from modifications to modification sequence
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF *SEQUENCE* {
// ...
//
// Nothing to do
super.transitions[LdapStatesEnum.MODIFICATIONS_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.MODIFICATIONS_STATE,
LdapStatesEnum.MODIFICATIONS_SEQ_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from modification sequence to operation
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF SEQUENCE {
// operation ENUMERATED {
// ...
//
// Store operation type
super.transitions[LdapStatesEnum.MODIFICATIONS_SEQ_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.MODIFICATIONS_SEQ_STATE,
LdapStatesEnum.OPERATION_STATE,
ENUMERATED,
new StoreOperationType() );
// --------------------------------------------------------------------------------------------
// Transition from operation to modification
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF SEQUENCE {
// ...
// modification AttributeTypeAndValues }
//
// AttributeTypeAndValues ::= SEQUENCE {
// ...
//
// Nothing to do
super.transitions[LdapStatesEnum.OPERATION_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.OPERATION_STATE,
LdapStatesEnum.MODIFICATION_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from modification to TypeMod
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF SEQUENCE {
// ...
// modification AttributeTypeAndValues }
//
// AttributeTypeAndValues ::= SEQUENCE {
// type AttributeDescription,
// ...
//
// Stores the type
super.transitions[LdapStatesEnum.MODIFICATION_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.MODIFICATION_STATE,
LdapStatesEnum.TYPE_MOD_STATE,
OCTET_STRING,
new AddModifyRequestAttribute() );
// --------------------------------------------------------------------------------------------
// Transition from TypeMod to vals
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF SEQUENCE {
// ...
// modification AttributeTypeAndValues }
//
// AttributeTypeAndValues ::= SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// Initialize the list of values
super.transitions[LdapStatesEnum.TYPE_MOD_STATE.ordinal()][SET.getValue()] =
new GrammarTransition(
LdapStatesEnum.TYPE_MOD_STATE,
LdapStatesEnum.VALS_STATE,
SET,
new InitAttributeVals() );
// --------------------------------------------------------------------------------------------
// Transition from vals to Attribute Value
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF SEQUENCE {
// ...
// modification AttributeTypeAndValues }
//
// AttributeTypeAndValues ::= SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue ::= OCTET STRING
//
// Stores a value
super.transitions[LdapStatesEnum.VALS_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.VALS_STATE,
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
OCTET_STRING,
new StoreModifyRequestAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from vals to ModificationsSeq
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF *SEQUENCE* {
// ...
// modification AttributeTypeAndValues }
//
// AttributeTypeAndValues ::= SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue ::= OCTET STRING
//
// Nothing to do
super.transitions[LdapStatesEnum.VALS_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.VALS_STATE,
LdapStatesEnum.MODIFICATIONS_SEQ_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from vals to Controls
// --------------------------------------------------------------------------------------------
// modifyRequest ModifyRequest,
// ... },
// controls [0] Controls OPTIONAL }
//
// Nothing to do
super.transitions[LdapStatesEnum.VALS_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.VALS_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from Attribute Value to Attribute Value
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF SEQUENCE {
// ...
// modification AttributeTypeAndValues }
//
// AttributeTypeAndValues ::= SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue ::= OCTET STRING
//
// Stores a value
super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
OCTET_STRING,
new StoreModifyRequestAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from Attribute Value to ModificationsSeq
// --------------------------------------------------------------------------------------------
// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
// ...
// modification SEQUENCE OF *SEQUENCE* {
// ...
// modification AttributeTypeAndValues }
//
// AttributeTypeAndValues ::= SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue ::= OCTET STRING
//
// Nothing to do
super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
LdapStatesEnum.MODIFICATIONS_SEQ_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from Attribute Value to Controls
// --------------------------------------------------------------------------------------------
// modifyRequest ModifyRequest,
// ... },
// controls [0] Controls OPTIONAL }
//
// Nothing to do
super.transitions[LdapStatesEnum.ATTRIBUTE_VALUE_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// ModifyResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ModifyResponse ...
// ModifyResponse ::= [APPLICATION 7] SEQUENCE { ...
// We have to switch to the ModifyResponse grammar
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.MODIFY_RESPONSE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.MODIFY_RESPONSE_STATE,
LdapConstants.MODIFY_RESPONSE_TAG,
new InitModifyResponse() );
// --------------------------------------------------------------------------------------------
// ModifyResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ModifyResponse ...
// ModifyResponse ::= [APPLICATION 7] LDAPResult
//
// LDAPResult ::= SEQUENCE {
// resultCode ENUMERATED {
// ...
//
// Stores the result code
super.transitions[LdapStatesEnum.MODIFY_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.MODIFY_RESPONSE_STATE,
LdapStatesEnum.RESULT_CODE_STATE,
ENUMERATED,
new StoreResultCode() );
// --------------------------------------------------------------------------------------------
// AddRequest Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... AddRequest ...
// AddRequest ::= [APPLICATION 8] SEQUENCE { ...
//
// Initialize the AddRequest object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.ADD_REQUEST_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.ADD_REQUEST_STATE,
LdapConstants.ADD_REQUEST_TAG,
new InitAddRequest() );
// --------------------------------------------------------------------------------------------
// Transition from Add Request to Entry
// --------------------------------------------------------------------------------------------
// AddRequest ::= [APPLICATION 8] SEQUENCE {
// entry LDAPDN,
// ...
//
// Stores the Dn
super.transitions[LdapStatesEnum.ADD_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.ADD_REQUEST_STATE,
LdapStatesEnum.ENTRY_STATE,
OCTET_STRING,
new StoreAddRequestEntryName() );
// --------------------------------------------------------------------------------------------
// Transition from Entry to Attributes
// --------------------------------------------------------------------------------------------
// AddRequest ::= [APPLICATION 8] SEQUENCE {
// ...
// attributes AttributeList }
//
// AttributeList ::= SEQUENCE OF ...
//
// Initialize the attribute list
super.transitions[LdapStatesEnum.ENTRY_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.ENTRY_STATE,
LdapStatesEnum.ATTRIBUTES_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from Attributes to Attribute
// --------------------------------------------------------------------------------------------
// AttributeList ::= SEQUENCE OF SEQUENCE {
//
// We don't do anything in this transition. The attribute will be created when we met the type
super.transitions[LdapStatesEnum.ATTRIBUTES_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTES_STATE,
LdapStatesEnum.ATTRIBUTE_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from Attribute to type
// --------------------------------------------------------------------------------------------
// AttributeList ::= SEQUENCE OF SEQUENCE {
// type AttributeDescription,
// ...
//
// AttributeDescription LDAPString
//
// We store the type in the current attribute
super.transitions[LdapStatesEnum.ATTRIBUTE_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_STATE,
LdapStatesEnum.TYPE_STATE,
OCTET_STRING,
new AddAddRequestAttributeType() );
// --------------------------------------------------------------------------------------------
// Transition from type to vals
// --------------------------------------------------------------------------------------------
// AttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// Nothing to do here.
super.transitions[LdapStatesEnum.TYPE_STATE.ordinal()][SET.getValue()] =
new GrammarTransition(
LdapStatesEnum.TYPE_STATE,
LdapStatesEnum.VALUES_STATE,
SET );
// --------------------------------------------------------------------------------------------
// Transition from vals to Value
// --------------------------------------------------------------------------------------------
// AttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue OCTET STRING
//
// Store the value into the current attribute
super.transitions[LdapStatesEnum.VALUES_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.VALUES_STATE,
LdapStatesEnum.VALUE_STATE,
OCTET_STRING,
new AddAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from Value to Value
// --------------------------------------------------------------------------------------------
// AttributeList ::= SEQUENCE OF SEQUENCE {
// ...
// vals SET OF AttributeValue }
//
// AttributeValue OCTET STRING
//
// Store the value into the current attribute
super.transitions[LdapStatesEnum.VALUE_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.VALUE_STATE,
LdapStatesEnum.VALUE_STATE,
OCTET_STRING,
new AddAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from Value to Attribute
// --------------------------------------------------------------------------------------------
// AttributeList ::= SEQUENCE OF SEQUENCE {
//
// Nothing to do here.
super.transitions[LdapStatesEnum.VALUE_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.VALUE_STATE,
LdapStatesEnum.ATTRIBUTE_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from Value to Controls
// --------------------------------------------------------------------------------------------
// AttributeList ::= SEQUENCE OF SEQUENCE {
//
// Initialize the controls
super.transitions[LdapStatesEnum.VALUE_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.VALUE_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// AddResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... AddResponse ...
// AddResponse ::= [APPLICATION 9] LDAPResult
//
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.ADD_RESPONSE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.ADD_RESPONSE_STATE,
LdapConstants.ADD_RESPONSE_TAG,
new InitAddResponse() );
// --------------------------------------------------------------------------------------------
// AddResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... AddResponse ...
// AddResponse ::= [APPLICATION 9] LDAPResult
//
// LDAPResult ::= SEQUENCE {
// resultCode ENUMERATED {
// ...
//
// Stores the result code
super.transitions[LdapStatesEnum.ADD_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.ADD_RESPONSE_STATE,
LdapStatesEnum.RESULT_CODE_STATE,
ENUMERATED,
new StoreResultCode() );
// --------------------------------------------------------------------------------------------
// DelResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... DelResponse ...
// DelResponse ::= [APPLICATION 11] LDAPResult
// We have to switch to the DelResponse grammar
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.DEL_RESPONSE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.DEL_RESPONSE_STATE,
LdapConstants.DEL_RESPONSE_TAG,
new InitDelResponse() );
// --------------------------------------------------------------------------------------------
// DelResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... DelResponse ...
// DelResponse ::= [APPLICATION 11] LDAPResult
//
// LDAPResult ::= SEQUENCE {
// resultCode ENUMERATED {
// ...
//
// Stores the result code
super.transitions[LdapStatesEnum.DEL_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.DEL_RESPONSE_STATE,
LdapStatesEnum.RESULT_CODE_STATE,
ENUMERATED,
new StoreResultCode() );
// --------------------------------------------------------------------------------------------
// Transition from MessageID to ModifydDNRequest Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ModifyDNRequest ...
// ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ...
//
// Create the ModifyDNRequest Object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.MODIFY_DN_REQUEST_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.MODIFY_DN_REQUEST_STATE,
LdapConstants.MODIFY_DN_REQUEST_TAG,
new InitModifyDnRequest() );
// --------------------------------------------------------------------------------------------
// Transition from ModifydDNRequest Message to EntryModDN
// --------------------------------------------------------------------------------------------
// ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ...
// entry LDAPDN,
// ...
//
// Stores the entry Dn
super.transitions[LdapStatesEnum.MODIFY_DN_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.MODIFY_DN_REQUEST_STATE,
LdapStatesEnum.ENTRY_MOD_DN_STATE,
OCTET_STRING,
new StoreModifyDnRequestEntryName() );
// --------------------------------------------------------------------------------------------
// Transition from EntryModDN to NewRDN
// --------------------------------------------------------------------------------------------
// ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ...
// ...
// newrdn RelativeRDN,
// ...
//
// RelativeRDN :: LDAPString
//
// Stores the new Rdn
super.transitions[LdapStatesEnum.ENTRY_MOD_DN_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.ENTRY_MOD_DN_STATE,
LdapStatesEnum.NEW_RDN_STATE,
OCTET_STRING,
new StoreModifyDnRequestNewRdn() );
// --------------------------------------------------------------------------------------------
// Transition from NewRDN to DeleteOldRDN
// --------------------------------------------------------------------------------------------
// ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ...
// ...
// deleteoldrdn BOOLEAN,
// ...
//
// Stores the deleteOldRDN flag
super.transitions[LdapStatesEnum.NEW_RDN_STATE.ordinal()][BOOLEAN.getValue()] =
new GrammarTransition(
LdapStatesEnum.NEW_RDN_STATE,
LdapStatesEnum.DELETE_OLD_RDN_STATE,
BOOLEAN,
new StoreModifyDnRequestDeleteOldRdn() );
// --------------------------------------------------------------------------------------------
// Transition from DeleteOldRDN to NewSuperior
// --------------------------------------------------------------------------------------------
// ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { ...
// ...
// newSuperior [0] LDAPDN OPTIONAL }
//
// Stores the new superior
super.transitions[LdapStatesEnum.DELETE_OLD_RDN_STATE.ordinal()][LdapConstants.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG] =
new GrammarTransition(
LdapStatesEnum.DELETE_OLD_RDN_STATE,
LdapStatesEnum.NEW_SUPERIOR_STATE,
LdapConstants.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG,
new StoreModifyDnRequestNewSuperior() );
// --------------------------------------------------------------------------------------------
// Transition from DeleteOldRDN to Controls
// --------------------------------------------------------------------------------------------
// modifyDNRequest ModifyDNRequest,
// ... },
// controls [0] Controls OPTIONAL }
//
// Stores the new superior
super.transitions[LdapStatesEnum.DELETE_OLD_RDN_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.DELETE_OLD_RDN_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from DeleteOldRDN to Controls
// --------------------------------------------------------------------------------------------
// modifyDNRequest ModifyDNRequest,
// ... },
// controls [0] Controls OPTIONAL }
//
// Stores the new superior
super.transitions[LdapStatesEnum.NEW_SUPERIOR_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.NEW_SUPERIOR_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from MessageID to ModifyDNResponse Message.
// --------------------------------------------------------------------------------------------
// ModifyDNResponse ::= [APPLICATION 13] SEQUENCE {
// ...
//
// Creates the ModifyDNResponse
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.MODIFY_DN_RESPONSE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.MODIFY_DN_RESPONSE_STATE,
LdapConstants.MODIFY_DN_RESPONSE_TAG,
new InitModifyDnResponse() );
// --------------------------------------------------------------------------------------------
// Transition from ModifyDNResponse Message to Result Code
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ModifyDNResponse ...
// ModifyDNResponse ::= [APPLICATION 13] LDAPResult
//
// LDAPResult ::= SEQUENCE {
// resultCode ENUMERATED {
// ...
//
// Stores the result co // modifyDNRequest ModifyDNRequest,
// ... },
// controls [0] Controls OPTIONAL }
super.transitions[LdapStatesEnum.MODIFY_DN_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.MODIFY_DN_RESPONSE_STATE,
LdapStatesEnum.RESULT_CODE_STATE,
ENUMERATED,
new StoreResultCode() );
// --------------------------------------------------------------------------------------------
// Transition from Message ID to CompareResquest
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... CompareRequest ...
//
// CompareRequest ::= [APPLICATION 14] SEQUENCE {
// ...
//
// Initialize the Compare Request object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.COMPARE_REQUEST_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.COMPARE_REQUEST_STATE,
LdapConstants.COMPARE_REQUEST_TAG,
new InitCompareRequest() );
// --------------------------------------------------------------------------------------------
// Transition from CompareResquest to entryComp
// --------------------------------------------------------------------------------------------
// CompareRequest ::= [APPLICATION 14] SEQUENCE {
// entry LDAPDN,
// ...
//
// Stores the compared Dn
super.transitions[LdapStatesEnum.COMPARE_REQUEST_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.COMPARE_REQUEST_STATE,
LdapStatesEnum.ENTRY_COMP_STATE,
OCTET_STRING,
new StoreCompareRequestEntryName() );
// --------------------------------------------------------------------------------------------
// Transition from entryComp to ava
// --------------------------------------------------------------------------------------------
// CompareRequest ::= [APPLICATION 14] SEQUENCE {
// ...
// ava AttributeValueAssertion }
//
// AttributeValueAssertion ::= SEQUENCE {
//
// Nothing to do
super.transitions[LdapStatesEnum.ENTRY_COMP_STATE.ordinal()][SEQUENCE.getValue()] =
new GrammarTransition(
LdapStatesEnum.ENTRY_COMP_STATE,
LdapStatesEnum.AVA_STATE,
SEQUENCE );
// --------------------------------------------------------------------------------------------
// Transition from ava to AttributeDesc
// --------------------------------------------------------------------------------------------
// AttributeValueAssertion ::= SEQUENCE {
// attributeDesc AttributeDescription,
// ...
//
// AttributeDescription LDAPString
//
// Stores the attribute description
super.transitions[LdapStatesEnum.AVA_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.AVA_STATE,
LdapStatesEnum.ATTRIBUTE_DESC_STATE,
OCTET_STRING,
new StoreCompareRequestAttributeDesc() );
// --------------------------------------------------------------------------------------------
// Transition from AttributeDesc to Assertion Value
// --------------------------------------------------------------------------------------------
// AttributeValueAssertion ::= SEQUENCE {
// ...
// assertionValue AssertionValue }
//
// AssertionValue OCTET STRING
//
// Stores the attribute value
super.transitions[LdapStatesEnum.ATTRIBUTE_DESC_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.ATTRIBUTE_DESC_STATE,
LdapStatesEnum.ASSERTION_VALUE_STATE,
OCTET_STRING,
new StoreCompareRequestAssertionValue() );
// --------------------------------------------------------------------------------------------
// Transition from Assertion Value to Controls
// --------------------------------------------------------------------------------------------
// AttributeValueAssertion ::= SEQUENCE {
// ...
// assertionValue AssertionValue }
//
// AssertionValue OCTET STRING
//
// Stores the attribute value
super.transitions[LdapStatesEnum.ASSERTION_VALUE_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.ASSERTION_VALUE_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// CompareResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... CompareResponse ...
// CompareResponse ::= [APPLICATION 15] LDAPResult
// We have to switch to the CompareResponse grammar
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.COMPARE_RESPONSE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.COMPARE_RESPONSE_STATE,
LdapConstants.COMPARE_RESPONSE_TAG,
new InitCompareResponse() );
// --------------------------------------------------------------------------------------------
// CompareResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... CompareResponse ...
// CompareResponse ::= [APPLICATION 15] LDAPResult
//
// LDAPResult ::= SEQUENCE {
// resultCode ENUMERATED {
// ...
//
// Stores the result code
super.transitions[LdapStatesEnum.COMPARE_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.COMPARE_RESPONSE_STATE,
LdapStatesEnum.RESULT_CODE_STATE,
ENUMERATED,
new StoreResultCode() );
// --------------------------------------------------------------------------------------------
// Transition from MessageID to SearchResultReference Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... SearchResultReference ...
// SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
//
// Initialization of SearchResultReference object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.SEARCH_RESULT_REFERENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE,
LdapConstants.SEARCH_RESULT_REFERENCE_TAG,
new InitSearchResultReference() );
// --------------------------------------------------------------------------------------------
// Transition from SearchResultReference Message to Reference
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... SearchResultReference ...
// SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
//
// Initialization of SearchResultReference object
super.transitions[LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE,
LdapStatesEnum.REFERENCE_STATE,
OCTET_STRING,
new StoreReference() );
// --------------------------------------------------------------------------------------------
// Transition from Reference to Reference
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... SearchResultReference ...
// SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
//
// Initialization of SearchResultReference object
super.transitions[LdapStatesEnum.REFERENCE_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.REFERENCE_STATE,
LdapStatesEnum.REFERENCE_STATE,
OCTET_STRING,
new StoreReference() );
// --------------------------------------------------------------------------------------------
// Transition from Reference to Controls
// --------------------------------------------------------------------------------------------
// searchResultReference SearchResultReference,
// ... },
// controls [0] Controls OPTIONAL }
//
// Initialization the controls
super.transitions[LdapStatesEnum.REFERENCE_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.REFERENCE_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from Message Id to ExtendedRequest Message
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ExtendedRequest ...
// ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
//
// Creates the ExtendedRequest object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.EXTENDED_REQUEST_STATE,
LdapConstants.EXTENDED_REQUEST_TAG,
new InitExtendedRequest() );
// --------------------------------------------------------------------------------------------
// Transition from ExtendedRequest Message to RequestName
// --------------------------------------------------------------------------------------------
// ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
// requestName [0] LDAPOID,
// ...
//
// Stores the name
super.transitions[LdapStatesEnum.EXTENDED_REQUEST_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_NAME_TAG] =
new GrammarTransition(
LdapStatesEnum.EXTENDED_REQUEST_STATE,
LdapStatesEnum.REQUEST_NAME_STATE,
LdapConstants.EXTENDED_REQUEST_NAME_TAG,
new StoreExtendedRequestName() );
// --------------------------------------------------------------------------------------------
// Transition from RequestName to RequestValue
// --------------------------------------------------------------------------------------------
// ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
// ...
// requestValue [1] OCTET STRING OPTIONAL }
//
// Stores the value
super.transitions[LdapStatesEnum.REQUEST_NAME_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_VALUE_TAG] =
new GrammarTransition(
LdapStatesEnum.REQUEST_NAME_STATE,
LdapStatesEnum.REQUEST_VALUE_STATE,
LdapConstants.EXTENDED_REQUEST_VALUE_TAG,
new StoreExtendedRequestValue() );
// --------------------------------------------------------------------------------------------
// Transition from RequestName to Controls
// --------------------------------------------------------------------------------------------
// extendedRequest EtendedRequest,
// ... },
// controls [0] Controls OPTIONAL }
//
// Stores the value
super.transitions[LdapStatesEnum.REQUEST_NAME_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.REQUEST_NAME_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from RequestValue to Controls
// --------------------------------------------------------------------------------------------
// extendedRequest EtendedRequest,
// ... },
// controls [0] Controls OPTIONAL }
//
// Stores the value
super.transitions[LdapStatesEnum.REQUEST_VALUE_STATE.ordinal()][LdapConstants.CONTROLS_TAG] =
new GrammarTransition(
LdapStatesEnum.REQUEST_VALUE_STATE,
LdapStatesEnum.CONTROLS_STATE,
LdapConstants.CONTROLS_TAG,
new InitControls() );
// --------------------------------------------------------------------------------------------
// Transition from MessageId to ExtendedResponse Message.
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ExtendedResponse ...
// ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
//
// Creates the ExtendeResponse object
super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.EXTENDED_RESPONSE_TAG] =
new GrammarTransition(
LdapStatesEnum.MESSAGE_ID_STATE,
LdapStatesEnum.EXTENDED_RESPONSE_STATE,
LdapConstants.EXTENDED_RESPONSE_TAG,
new InitExtendedResponse() );
// --------------------------------------------------------------------------------------------
// Transition from ExtendedResponse Message to Result Code ER
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ExtendedResponse ...
// ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
// COMPONENTS OF LDAPResult,
// ...
//
// Stores the result code
super.transitions[LdapStatesEnum.EXTENDED_RESPONSE_STATE.ordinal()][ENUMERATED.getValue()] =
new GrammarTransition(
LdapStatesEnum.EXTENDED_RESPONSE_STATE,
LdapStatesEnum.RESULT_CODE_ER_STATE,
ENUMERATED,
new StoreResultCode() );
// --------------------------------------------------------------------------------------------
// Transition from Result Code ER to Matched Dn ER
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ExtendedResponse ...
// ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
// COMPONENTS OF LDAPResult,
// ...
//
//
super.transitions[LdapStatesEnum.RESULT_CODE_ER_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.RESULT_CODE_ER_STATE,
LdapStatesEnum.MATCHED_DN_ER_STATE,
OCTET_STRING,
new StoreMatchedDN() );
// --------------------------------------------------------------------------------------------
// Transition from Matched Dn ER to Error Message ER
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ExtendedResponse ...
// ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
// COMPONENTS OF LDAPResult,
// ...
//
//
super.transitions[LdapStatesEnum.MATCHED_DN_ER_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.MATCHED_DN_ER_STATE,
LdapStatesEnum.ERROR_MESSAGE_ER_STATE,
OCTET_STRING,
new StoreErrorMessage() );
// --------------------------------------------------------------------------------------------
// Transition from Error Message ER to Referrals ER
// --------------------------------------------------------------------------------------------
// LdapMessage ::= ... ExtendedResponse ...
// ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
// COMPONENTS OF LDAPResult,
// ...
//
//
super.transitions[LdapStatesEnum.ERROR_MESSAGE_ER_STATE.ordinal()][LdapConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG] =
new GrammarTransition(
LdapStatesEnum.ERROR_MESSAGE_ER_STATE,
LdapStatesEnum.REFERRALS_ER_STATE,
LdapConstants.LDAP_RESULT_REFERRAL_SEQUENCE_TAG,
new InitReferrals() );
// --------------------------------------------------------------------------------------------
// Transition from Referrals ER to Referral ER
// --------------------------------------------------------------------------------------------
// Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)
// URI ::= LDAPString
//
// Add a first Referral
super.transitions[LdapStatesEnum.REFERRALS_ER_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.REFERRALS_ER_STATE,
LdapStatesEnum.REFERRAL_ER_STATE,
OCTET_STRING,
new AddReferral() );
// --------------------------------------------------------------------------------------------
// Transition from Referral ER to Referral ER
// --------------------------------------------------------------------------------------------
// Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)
// URI ::= LDAPString
//
// Adda new Referral
super.transitions[LdapStatesEnum.REFERRAL_ER_STATE.ordinal()][OCTET_STRING.getValue()] =
new GrammarTransition(
LdapStatesEnum.REFERRAL_ER_STATE,
LdapStatesEnum.REFERRAL_ER_STATE,
OCTET_STRING,
new AddReferral() );
// --------------------------------------------------------------------------------------------
// Transition from Referral ER to ResponseName
// --------------------------------------------------------------------------------------------
// Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)