/** * {@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; }
/** * {@inheritDoc} */ @Override public void action( Dsmlv2Container container ) throws XmlPullParserException { SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml ) container.getBatchRequest().getCurrentRequest(); XmlPullParser xpp = container.getParser(); OrFilter filter = new OrFilter(); // Adding the filter to the Search Filter try { searchRequestDecorator.addCurrentFilter( filter ); } catch ( DecoderException de ) { throw new XmlPullParserException( de.getMessage(), xpp, de ); } } };
/** * {@inheritDoc} */ @Override public void action( Dsmlv2Container container ) throws XmlPullParserException { SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml ) container.getBatchRequest().getCurrentRequest(); XmlPullParser xpp = container.getParser(); NotFilter filter = new NotFilter(); // Adding the filter to the Search Filter try { searchRequestDecorator.addCurrentFilter( filter ); } catch ( DecoderException de ) { throw new XmlPullParserException( de.getMessage(), xpp, de ); } } };
/** * {@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; }
/** * {@inheritDoc} */ @Override public void action( Dsmlv2Container container ) throws XmlPullParserException { SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml ) container.getBatchRequest().getCurrentRequest(); XmlPullParser xpp = container.getParser(); AndFilter filter = new AndFilter(); // Adding the filter to the Search Filter try { searchRequestDecorator.addCurrentFilter( filter ); } catch ( DecoderException de ) { throw new XmlPullParserException( de.getMessage(), xpp, de ); } } };
/** * Process state F * <pre> * (F) --['.']--> (G) * </pre> * * @param oid The OID to check * @param pos The position in the OID string * @return The next OID decoding state * @throws DecoderException If the OID is invalid */ private static OidFSAState processStateF( String oid, int pos ) throws DecoderException { if ( oid.charAt( pos ) != '.' ) { // Expecting a Dot here throw new DecoderException( I18n.err( I18n.ERR_00003_INVALID_OID, "a '.' is expected" ) ); } return OidFSAState.STATE_G; }
/** * Process state B * <pre> * (A) --['.']--> (B) * </pre> * * @param oid The OID to check * @param pos The position in the OID string * @return The next OID decoding state * @throws DecoderException If the OID is invalid */ private static OidFSAState processStateA( String oid, int pos ) throws DecoderException { if ( oid.charAt( pos ) != '.' ) { // Expecting a Dot here throw new DecoderException( I18n.err( I18n.ERR_00003_INVALID_OID, "a '.' is expected" ) ); } return OidFSAState.STATE_B; }
/** * Process state B * <pre> * (A) --['.']--> (B) * </pre> * * @param oid The OID to check * @param pos The position in the OID string * @return The next OID decoding state * @throws DecoderException If the OID is invalid */ private static OidFSAState processStateA( String oid, int pos ) throws DecoderException { if ( oid.charAt( pos ) != '.' ) { // Expecting a Dot here throw new DecoderException( I18n.err( I18n.ERR_00003_INVALID_OID, "a '.' is expected" ) ); } return OidFSAState.STATE_B; }
/** * Process state F * <pre> * (F) --['.']--> (G) * </pre> * * @param oid The OID to check * @param pos The position in the OID string * @return The next OID decoding state * @throws DecoderException If the OID is invalid */ private static OidFSAState processStateF( String oid, int pos ) throws DecoderException { if ( oid.charAt( pos ) != '.' ) { // Expecting a Dot here throw new DecoderException( I18n.err( I18n.ERR_00003_INVALID_OID, "a '.' is expected" ) ); } return OidFSAState.STATE_G; }
/** * Process state F * <pre> * (F) --['.']--> (G) * </pre> * * @param oid The OID to check * @param pos The position in the OID string * @return The next OID decoding state * @throws DecoderException If the OID is invalid */ private static OidFSAState processStateF( String oid, int pos ) throws DecoderException { if ( oid.charAt( pos ) != '.' ) { // Expecting a Dot here throw new DecoderException( I18n.err( I18n.ERR_00003_INVALID_OID, "a '.' is expected" ) ); } return OidFSAState.STATE_G; }
/** * Process state B * <pre> * (A) --['.']--> (B) * </pre> * * @param oid The OID to check * @param pos The position in the OID string * @return The next OID decoding state * @throws DecoderException If the OID is invalid */ private static OidFSAState processStateA( String oid, int pos ) throws DecoderException { if ( oid.charAt( pos ) != '.' ) { // Expecting a Dot here throw new DecoderException( I18n.err( I18n.ERR_00003_INVALID_OID, "a '.' is expected" ) ); } return OidFSAState.STATE_B; }
/** * Process state J * <pre> * (M) --['.']--> (K) * </pre> * * @param oid The OID to check * @param pos The position in the OID string * @return The next OID decoding state * @throws DecoderException If the OID is invalid */ private static OidFSAState processStateM( String oid, int pos ) throws DecoderException { char c = oid.charAt( pos ); if ( c == '.' ) { return OidFSAState.STATE_K; } else { // Expecting a '.' here throw new DecoderException( I18n.err( I18n.ERR_00003_INVALID_OID, "a '.' is expected" ) ); } }
/** * 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 ); }
/** * 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 ); }
/** * 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 ); }
/** * 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 ); }
/** * 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 ); }
/** * 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 ); }
/** * 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 ); }
/** * 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 ); }