@Test public void notInDynRealms() { try { FilterConverter.convert(SpecialAttr.DYNREALMS + "!=realm"); fail(); } catch (SyncopeClientException e) { assertEquals(ClientExceptionType.InvalidSearchExpression, e.getType()); } }
public static Filter convert(final String fiql) { SyncopeFiqlParser<SearchBean> parser = new SyncopeFiqlParser<>( SearchBean.class, AbstractFiqlSearchConditionBuilder.CONTEXTUAL_PROPERTIES); try { FilterVisitor visitor = new FilterVisitor(); SearchCondition<SearchBean> sc = parser.parse(URLDecoder.decode(fiql, StandardCharsets.UTF_8)); sc.accept(visitor); return visitor.getQuery(); } catch (Exception e) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidSearchExpression); sce.getElements().add(fiql); sce.getElements().add(ExceptionUtils.getRootCauseMessage(e)); throw sce; } }
FilterConverter { public static Filter convert(final String fiql) { SyncopeFiqlParser<SearchBean> parser = new SyncopeFiqlParser<>( SearchBean.class, AbstractFiqlSearchConditionBuilder.CONTEXTUAL_PROPERTIES); try { FilterVisitor visitor = new FilterVisitor(); SearchCondition<SearchBean> sc = parser.parse(URLDecoder.decode(fiql, StandardCharsets.UTF_8)); sc.accept(visitor); return visitor.getQuery(); } catch (Exception e) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidSearchExpression); sce.getElements().add(fiql); sce.getElements().add(ExceptionUtils.getRootCauseMessage(e)); throw sce; } } }
FilterConverter { public static Filter convert(final String fiql) { SyncopeFiqlParser<SearchBean> parser = new SyncopeFiqlParser<>( SearchBean.class, AbstractFiqlSearchConditionBuilder.CONTEXTUAL_PROPERTIES); try { FilterVisitor visitor = new FilterVisitor(); SearchCondition<SearchBean> sc = parser.parse(URLDecoder.decode(fiql, StandardCharsets.UTF_8)); sc.accept(visitor); return visitor.getQuery(); } catch (Exception e) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidSearchExpression); sce.getElements().add(fiql); sce.getElements().add(ExceptionUtils.getRootCauseMessage(e)); throw sce; } } private  FilterConverter(); }
FilterConverter { public static Filter convert(final String fiql) { SyncopeFiqlParser<SearchBean> parser = new SyncopeFiqlParser<>( SearchBean.class, AbstractFiqlSearchConditionBuilder.CONTEXTUAL_PROPERTIES); try { FilterVisitor visitor = new FilterVisitor(); SearchCondition<SearchBean> sc = parser.parse(URLDecoder.decode(fiql, StandardCharsets.UTF_8)); sc.accept(visitor); return visitor.getQuery(); } catch (Exception e) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidSearchExpression); sce.getElements().add(fiql); sce.getElements().add(ExceptionUtils.getRootCauseMessage(e)); throw sce; } } private  FilterConverter(); static Filter convert(final String fiql); }
FilterConverter { public static Filter convert(final String fiql) { SyncopeFiqlParser<SearchBean> parser = new SyncopeFiqlParser<>( SearchBean.class, AbstractFiqlSearchConditionBuilder.CONTEXTUAL_PROPERTIES); try { FilterVisitor visitor = new FilterVisitor(); SearchCondition<SearchBean> sc = parser.parse(URLDecoder.decode(fiql, StandardCharsets.UTF_8)); sc.accept(visitor); return visitor.getQuery(); } catch (Exception e) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidSearchExpression); sce.getElements().add(fiql); sce.getElements().add(ExceptionUtils.getRootCauseMessage(e)); throw sce; } } private  FilterConverter(); static Filter convert(final String fiql);  }