/** * {@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} */ public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); int expectedLength = tlv.getLength(); // The Length should be null if ( expectedLength == 0 ) { String msg = I18n.err( I18n.ERR_08213_NULL_CONTROL_LENGTH ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); int expectedLength = tlv.getLength(); // The Length should be null if ( expectedLength == 0 ) { String msg = I18n.err( I18n.ERR_08213_NULL_CONTROL_LENGTH ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); int expectedLength = tlv.getLength(); // The Length should be null if ( expectedLength == 0 ) { String msg = I18n.err( I18n.ERR_08213_NULL_CONTROL_LENGTH ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // The Length should not be null if ( tlv.getLength() == 0 ) { LOG.error( I18n.err( I18n.ERR_05142_ZERO_LENGTH_MESSAGE ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( I18n.err( I18n.ERR_05143_EMPTY_MESSAGE ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // The Length should not be null if ( tlv.getLength() == 0 ) { LOG.error( I18n.err( I18n.ERR_05142_ZERO_LENGTH_MESSAGE ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( I18n.err( I18n.ERR_05143_EMPTY_MESSAGE ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // The Length should not be null if ( tlv.getLength() == 0 ) { LOG.error( I18n.err( I18n.ERR_05142_ZERO_LENGTH_MESSAGE ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( I18n.err( I18n.ERR_05143_EMPTY_MESSAGE ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { SearchRequestDecorator decorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) decorator.getTerminalFilter(); byte[] value = tlv.getValue().getData(); extensibleMatchFilter.setMatchValue( new Value( value ) ); // unstack the filters if needed decorator.unstackFilters( container ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05156_STORED_MATCH_VALUE, value ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { SearchRequestDecorator decorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) decorator.getTerminalFilter(); byte[] value = tlv.getValue().getData(); extensibleMatchFilter.setMatchValue( new Value( value ) ); // unstack the filters if needed decorator.unstackFilters( container ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05156_STORED_MATCH_VALUE, value ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { SearchRequestDecorator decorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) decorator.getTerminalFilter(); byte[] value = tlv.getValue().getData(); extensibleMatchFilter.setMatchValue( new Value( value ) ); // unstack the filters if needed decorator.unstackFilters( container ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05156_STORED_MATCH_VALUE, value ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<CompareResponseDecorator> container ) throws DecoderException { // Now, we can allocate the CompareResponse Object CompareResponseDecorator compareResponse = new CompareResponseDecorator( container.getLdapCodecService(), new CompareResponseImpl( container.getMessageId() ) ); container.setMessage( compareResponse ); // We will check that the request is not null TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05148_NULL_COMPARE_REQUEST ); LOG.error( msg ); throw new DecoderException( msg ); } if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05169_COMPARE_RESPONSE ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { // Now, we can allocate the SearchRequest Object TLV tlv = container.getCurrentTLV(); SearchRequest internalSearchRequest = new SearchRequestImpl(); internalSearchRequest.setMessageId( container.getMessageId() ); SearchRequestDecorator searchRequest = new SearchRequestDecorator( container.getLdapCodecService(), internalSearchRequest ); searchRequest.setTlvId( tlv.getId() ); container.setMessage( searchRequest ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05157_SEARCH_REQUEST ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { // Now, we can allocate the SearchRequest Object TLV tlv = container.getCurrentTLV(); SearchRequest internalSearchRequest = new SearchRequestImpl(); internalSearchRequest.setMessageId( container.getMessageId() ); SearchRequestDecorator searchRequest = new SearchRequestDecorator( container.getLdapCodecService(), internalSearchRequest ); searchRequest.setTlvId( tlv.getId() ); container.setMessage( searchRequest ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05157_SEARCH_REQUEST ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { // Now, we can allocate the SearchRequest Object TLV tlv = container.getCurrentTLV(); SearchRequest internalSearchRequest = new SearchRequestImpl(); internalSearchRequest.setMessageId( container.getMessageId() ); SearchRequestDecorator searchRequest = new SearchRequestDecorator( container.getLdapCodecService(), internalSearchRequest ); searchRequest.setTlvId( tlv.getId() ); container.setMessage( searchRequest ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05157_SEARCH_REQUEST ) ); } } }
public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { SearchRequestDecorator searchRequest = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) searchRequest.getTerminalFilter(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05001_EMPTY_MATCHING_RULE ); LOG.error( msg ); // It will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } else { extensibleMatchFilter.setMatchingRule( Strings.utf8ToString( tlv.getValue().getData() ) ); } } } );
public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { SearchRequestDecorator searchRequest = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) searchRequest.getTerminalFilter(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05001_EMPTY_MATCHING_RULE ); LOG.error( msg ); // It will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } else { extensibleMatchFilter.setMatchingRule( Strings.utf8ToString( tlv.getValue().getData() ) ); } } } );
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<BindRequestDecorator> container ) throws DecoderException { // Create the BindRequest LdapMessage instance and store it in the container BindRequest internalBindRequest = new BindRequestImpl(); internalBindRequest.setMessageId( container.getMessageId() ); BindRequestDecorator bindRequest = new BindRequestDecorator( container.getLdapCodecService(), internalBindRequest ); container.setMessage( bindRequest ); // We will check that the request is not null TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05144_NULL_BIND_REQUEST ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } } }
public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { SearchRequestDecorator searchRequest = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) searchRequest.getTerminalFilter(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05001_EMPTY_MATCHING_RULE ); LOG.error( msg ); // It will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } else { extensibleMatchFilter.setMatchingRule( Strings.utf8ToString( tlv.getValue().getData() ) ); } } } );
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { SearchRequestDecorator searchRequestDecorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. SubstringFilter substringFilter = ( SubstringFilter ) searchRequestDecorator.getTerminalFilter(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05154_EMPTY_SUBSTRING_INITIAL_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } substringFilter.setInitialSubstrings( Strings.utf8ToString( tlv.getValue().getData() ) ); // We now have to get back to the nearest filter which is // not terminal. searchRequestDecorator.unstackFilters( container ); } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { SearchRequestDecorator searchRequestDecorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. SubstringFilter substringFilter = ( SubstringFilter ) searchRequestDecorator.getTerminalFilter(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05154_EMPTY_SUBSTRING_INITIAL_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } substringFilter.setInitialSubstrings( Strings.utf8ToString( tlv.getValue().getData() ) ); // We now have to get back to the nearest filter which is // not terminal. searchRequestDecorator.unstackFilters( container ); } }