Refine search
/** * {@inheritDoc} */ @Override public void setMaxLengthLength( int maxLengthLength ) throws DecoderException { if ( ( this.indefiniteLengthAllowed ) && ( maxLengthLength > 126 ) ) { throw new DecoderException( I18n.err( I18n.ERR_01006_LENGTH_TOO_LONG_FOR_DEFINITE_FORM ) ); } this.maxLengthLength = maxLengthLength; }
public void action( ControlsContainer 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 ); } } } );
public void action( PersistentSearchContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { boolean changesOnly = BooleanDecoder.parse( value ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05305_CHANGES_ONLY, changesOnly ) ); } container.getPersistentSearchDecorator().setChangesOnly( changesOnly ); } catch ( BooleanDecoderException bde ) { String msg = I18n.err( I18n.ERR_05308_CHANGE_ONLY_DECODING_ERROR ); LOG.error( msg, bde ); throw new DecoderException( msg, bde ); } } } );
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { boolean reverseOrder = BooleanDecoder.parse( value ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05308_REVERSE_ORDER, reverseOrder ) ); } container.getCurrentKey().setReverseOrder( reverseOrder ); container.setGrammarEndAllowed( true ); } catch ( BooleanDecoderException bde ) { throw new DecoderException( bde.getMessage(), bde ); } }
public void action( PersistentSearchContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { boolean changesOnly = BooleanDecoder.parse( value ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05305_CHANGES_ONLY, changesOnly ) ); } container.getPersistentSearchDecorator().setChangesOnly( changesOnly ); } catch ( BooleanDecoderException bde ) { String msg = I18n.err( I18n.ERR_05308_CHANGE_ONLY_DECODING_ERROR ); LOG.error( msg, bde ); throw new DecoderException( msg, bde ); } } } );
public void action( ControlsContainer 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 setMaxLengthLength( int maxLengthLength ) throws DecoderException { if ( ( this.indefiniteLengthAllowed ) && ( maxLengthLength > 126 ) ) { throw new DecoderException( I18n.err( I18n.ERR_01006_LENGTH_TOO_LONG_FOR_DEFINITE_FORM ) ); } this.maxLengthLength = maxLengthLength; }
public void action( PersistentSearchContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { // Check that the value is into the allowed interval int changeTypes = IntegerDecoder.parse( value, PersistentSearch.CHANGE_TYPES_MIN, PersistentSearch.CHANGE_TYPES_MAX ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05304_CHANGE_TYPES, changeTypes ) ); } container.getPersistentSearchDecorator().setChangeTypes( changeTypes ); } catch ( IntegerDecoderException ide ) { String msg = I18n.err( I18n.ERR_05307_CHANGE_TYPES_DECODING_ERROR ); LOG.error( msg, ide ); throw new DecoderException( msg, ide ); } } } );
/** * {@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 ) ); } } }
/** * Set the NotFilter * * @param notFilter The notFilter to set. * @throws DecoderException If the NotFilter is already containing a filter */ public void setNotFilter( Filter notFilter ) throws DecoderException { if ( filterSet != null ) { throw new DecoderException( I18n.err( I18n.ERR_05501_MORE_THAN_ONE_FILTER_FOR_NOT_FILTER ) ); } super.addFilter( notFilter ); }
public void action( PersistentSearchContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { // Check that the value is into the allowed interval int changeTypes = IntegerDecoder.parse( value, PersistentSearch.CHANGE_TYPES_MIN, PersistentSearch.CHANGE_TYPES_MAX ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05304_CHANGE_TYPES, changeTypes ) ); } container.getPersistentSearchDecorator().setChangeTypes( changeTypes ); } catch ( IntegerDecoderException ide ) { String msg = I18n.err( I18n.ERR_05307_CHANGE_TYPES_DECODING_ERROR ); LOG.error( msg, ide ); throw new DecoderException( msg, ide ); } } } );
public void action( ControlsContainer 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 ); } } } );
/** * Set the NotFilter * * @param notFilter The notFilter to set. * @throws DecoderException If the filter is invalid */ public void setNotFilter( Filter notFilter ) throws DecoderException { if ( filterSet != null ) { throw new DecoderException( I18n.err( I18n.ERR_05501_MORE_THAN_ONE_FILTER_FOR_NOT_FILTER ) ); } super.addFilter( notFilter ); }
public void action( PersistentSearchContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { boolean changesOnly = BooleanDecoder.parse( value ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05305_CHANGES_ONLY, changesOnly ) ); } container.getPersistentSearchDecorator().setChangesOnly( changesOnly ); } catch ( BooleanDecoderException bde ) { String msg = I18n.err( I18n.ERR_05308_CHANGE_ONLY_DECODING_ERROR ); LOG.error( msg, bde ); throw new DecoderException( msg, bde ); } } } );
/** * {@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 ) ); } } }
/** * Subclass the addFilterMethod, as this is specific for a NotFilter (we * cannot have more than one elements). * * @param filter The Filter to add */ @Override public void addFilter( Filter filter ) throws DecoderException { if ( filterSet != null ) { throw new DecoderException( I18n.err( I18n.ERR_05501_MORE_THAN_ONE_FILTER_FOR_NOT_FILTER ) ); } super.addFilter( filter ); }
public void action( PersistentSearchContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { // Check that the value is into the allowed interval int changeTypes = IntegerDecoder.parse( value, PersistentSearch.CHANGE_TYPES_MIN, PersistentSearch.CHANGE_TYPES_MAX ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05304_CHANGE_TYPES, changeTypes ) ); } container.getPersistentSearchDecorator().setChangeTypes( changeTypes ); } catch ( IntegerDecoderException ide ) { String msg = I18n.err( I18n.ERR_05307_CHANGE_TYPES_DECODING_ERROR ); LOG.error( msg, ide ); throw new DecoderException( msg, ide ); } } } );
/** * {@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 ) ); } } }
/** * Set the NotFilter * * @param notFilter The notFilter to set. * @throws DecoderException If the NotFilter is already containing a filter */ public void setNotFilter( Filter notFilter ) throws DecoderException { if ( filterSet != null ) { throw new DecoderException( I18n.err( I18n.ERR_05501_MORE_THAN_ONE_FILTER_FOR_NOT_FILTER ) ); } super.addFilter( notFilter ); }
public void action( CertGenerationContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); String issuerDN = Strings.utf8ToString( value.getData() ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08207_ISSUER_DN, issuerDN ) ); } if ( ( issuerDN != null ) && ( issuerDN.trim().length() > 0 ) ) { if ( !Dn.isValid( issuerDN ) ) { String msg = I18n.err( I18n.ERR_08203_INVALID_ISSUER_DN, issuerDN ); LOG.error( msg ); throw new DecoderException( msg ); } container.getCertGenerationRequest().setIssuerDN( issuerDN ); } } } );