Refine search
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<ModifyRequestDecorator> container ) { TLV tlv = container.getCurrentTLV(); // If the length is null, we store an empty value if ( LOG.isDebugEnabled() && ( tlv.getLength() == 0 ) ) { LOG.debug( I18n.msg( I18n.MSG_05129_NO_VALS_FOR_ATTRIBUTE ) ); } // We can have an END transition container.setGrammarEndAllowed( true ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05130_SOME_VALS_NEED_DECODING ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<ModifyRequestDecorator> container ) { TLV tlv = container.getCurrentTLV(); // If the length is null, we store an empty value if ( LOG.isDebugEnabled() && ( tlv.getLength() == 0 ) ) { LOG.debug( I18n.msg( I18n.MSG_05129_NO_VALS_FOR_ATTRIBUTE ) ); } // We can have an END transition container.setGrammarEndAllowed( true ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05130_SOME_VALS_NEED_DECODING ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<ModifyRequestDecorator> container ) { TLV tlv = container.getCurrentTLV(); // If the length is null, we store an empty value if ( LOG.isDebugEnabled() && ( tlv.getLength() == 0 ) ) { LOG.debug( I18n.msg( I18n.MSG_05129_NO_VALS_FOR_ATTRIBUTE ) ); } // We can have an END transition container.setGrammarEndAllowed( true ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05130_SOME_VALS_NEED_DECODING ) ); } } }
/** * {@inheritDoc} */ @Override public final void action( C container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // The Length should not be null, and should be 5 if ( tlv.getLength() != 5 ) { String msg = I18n.err( I18n.ERR_01100_INCORRECT_LENGTH, 5, tlv.getLength() ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } byte[] data = tlv.getValue().getData(); setBitString( data, container ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_01101_BITSTRING_VALUE, Strings.dumpBytes( data ) ) ); } } }
/** * {@inheritDoc} */ @Override public final void action( C container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // The Length should not be null, and should be 5 if ( tlv.getLength() != 5 ) { String msg = I18n.err( I18n.ERR_01100_INCORRECT_LENGTH, 5, tlv.getLength() ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } byte[] data = tlv.getValue().getData(); setBitString( data, container ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_01101_BITSTRING_VALUE, Strings.dumpBytes( data ) ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05134_EMPTY_AND_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter andFilter = new AndFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( andFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05141_INITIALIZE_AND_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05134_EMPTY_AND_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter andFilter = new AndFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( andFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05141_INITIALIZE_AND_FILTER ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // If we hae a Referrals sequence, then it should not be empty if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05105_REFERRAL_MUST_NOT_BE_NULL ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } ResultResponse response = ( ResultResponse ) container.getMessage(); LdapResult ldapResult = response.getLdapResult(); Referral referral = new ReferralImpl(); ldapResult.setReferral( referral ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05105_INITIALISNG_REFERRAL_LIST ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05137_EMPTY_OR_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter orFilter = new OrFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( orFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05150_INITIALIZE_OR_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05136_EMPTY_NOT_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter notFilter = new NotFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( notFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05149_INITIALIZE_NOT_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05136_EMPTY_NOT_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter notFilter = new NotFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( notFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05149_INITIALIZE_NOT_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05134_EMPTY_AND_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter andFilter = new AndFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( andFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05141_INITIALIZE_AND_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05137_EMPTY_OR_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter orFilter = new OrFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( orFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05150_INITIALIZE_OR_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05137_EMPTY_OR_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter orFilter = new OrFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( orFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05150_INITIALIZE_OR_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05136_EMPTY_NOT_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter notFilter = new NotFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( notFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05149_INITIALIZE_NOT_FILTER ) ); } } }
public void action( StoredProcedureContainer container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); StoredProcedureRequestDecorator storedProcedure = container.getStoredProcedure(); // Store the value. if ( tlv.getLength() == 0 ) { // We can't have a void procedure ! String msg = I18n.err( I18n.ERR_08208_NULL_PROCEDURE ); LOG.error( msg ); throw new DecoderException( msg ); } else { byte[] procedure = tlv.getValue().getData(); storedProcedure.setProcedure( procedure ); } if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08212_PROCEDURE_FOUND, storedProcedure.getProcedureSpecification() ) ); } } } );
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { SearchRequestDecorator searchRequestDecorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); int expectedLength = tlv.getLength(); if ( expectedLength == 0 ) { String msg = I18n.err( I18n.ERR_05138_EMPTY_SUBSTRING_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } // We can allocate the SearchRequest Filter substringFilter = new SubstringFilter( container.getTlvId() ); searchRequestDecorator.addCurrentFilter( substringFilter ); searchRequestDecorator.setTerminalFilter( substringFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05152_INITIALIZE_SUBSTRING_FILTER ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<BindRequestDecorator> container ) throws DecoderException { BindRequest bindRequestMessage = container.getMessage(); TLV tlv = container.getCurrentTLV(); // We will check that the sasl is not null if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05116_SASL_CREDS_CANT_BE_NULL ); LOG.error( msg ); BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() ); throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_CREDENTIALS, bindRequestMessage.getDn(), null ); } bindRequestMessage.setSimple( false ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05115_SASL_CREDS_CREATED ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<BindRequestDecorator> container ) throws DecoderException { BindRequest bindRequestMessage = container.getMessage(); TLV tlv = container.getCurrentTLV(); // We will check that the sasl is not null if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05116_SASL_CREDS_CANT_BE_NULL ); LOG.error( msg ); BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() ); throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_CREDENTIALS, bindRequestMessage.getDn(), null ); } bindRequestMessage.setSimple( false ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05115_SASL_CREDS_CREATED ) ); } } }
public void action( StoredProcedureContainer container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); StoredProcedureRequestDecorator storedProcedure = container.getStoredProcedure(); // Store the value. if ( tlv.getLength() == 0 ) { // We can't have a void procedure ! String msg = I18n.err( I18n.ERR_08208_NULL_PROCEDURE ); LOG.error( msg ); throw new DecoderException( msg ); } else { byte[] procedure = tlv.getValue().getData(); storedProcedure.setProcedure( procedure ); } if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08212_PROCEDURE_FOUND, storedProcedure.getProcedureSpecification() ) ); } } } );