Examples of FilterExpression


Examples of org.apache.olingo.odata2.api.uri.expression.FilterExpression

  public void uriWithException() throws Exception {
    final ODataContext context = mockContext(ODataHttpMethod.GET);
    final ODataResponse wrappedResponse = mockResponse(HttpStatusCodes.OK, null, null);

    UriInfo uriInfo = mock(UriInfo.class);
    FilterExpression filter = mock(FilterExpression.class);
    when(filter.getExpressionString()).thenReturn("wrong");
    when(uriInfo.getFilter()).thenReturn(filter);
    ExpressionParserException exception = mock(ExpressionParserException.class);
    when(exception.getMessageReference()).thenReturn(ExpressionParserException.COMMON_ERROR);
    when(exception.getStackTrace()).thenReturn(new StackTraceElement[] {
        new StackTraceElement("class", "method", "file", 42) });
View Full Code Here

Examples of org.apache.olingo.odata2.api.uri.expression.FilterExpression

    @Override
    @SuppressWarnings("unchecked")
    public SearchCondition<T> parse(String searchExpression) throws SearchParseException {
        try {
            final T condition = conditionClass.newInstance();
            final FilterExpression expression = parser.parseFilterString(searchExpression);
            final FilterExpressionVisitor visitor = new FilterExpressionVisitor(condition);           
            return (SearchCondition< T >)expression.accept(visitor);           
        } catch (ODataMessageException ex) {
            throw new SearchParseException(ex);
        } catch (ODataApplicationException ex) {
            throw new SearchParseException(ex);
        } catch (InstantiationException ex) {
View Full Code Here

Examples of org.jwall.web.audit.filter.FilterExpression

    }

    if (event != null && event.getType() == EventType.AUDIT) {
      String id = event.get(ModSecurity.TX_ID);
      log.info("tag( {}, '{}' )", id, name);
      FilterExpression f = FilterCompiler.parse("TX_ID @eq '" + id + "'");
      view.tag(f, name);
    }
  }
View Full Code Here

Examples of org.jwall.web.audit.filter.FilterExpression

      return;
    }

    if (event != null && event.getType() == EventType.AUDIT) {
      log.info("tag( {}, '{}' )", event.get(ModSecurity.TX_ID), name);
      FilterExpression f = FilterCompiler.parse("TX_ID @eq '" + name
          + "'");
      view.untag(f, name);
    }
  }
View Full Code Here

Examples of org.jwall.web.audit.filter.FilterExpression

  public Long count(String filterString) throws Exception {
    log.info("Counting events by filter '{}'", filterString);
    try {
      if (view != null) {
        FilterExpression filter = FilterCompiler.parse(filterString);
        Long count = view.count(filter);
        log.debug("  count is {}", count);
        return count;
      } else {
        log.debug("View is 'null'!");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.