Exemplo n.º 1
0
  public FilterValidator setFilter(final FilterOption filter) {
    this.filter = filter;

    if (filter.getExpression() == null) {
      fail("FilterValidator: no filter found");
    }
    setExpression(filter.getExpression());
    return this;
  }
Exemplo n.º 2
0
 public FilterValidator runUri(final String path, final String query)
     throws UriParserException, UriValidationException {
   final UriInfo uriInfo = new Parser(edm, odata).parseUri(path, query, null);
   assertTrue(
       "Filtervalidator can only be used on resourcePaths",
       uriInfo.getKind() == UriInfoKind.resource);
   setFilter(uriInfo.getFilterOption());
   curExpression = filter.getExpression();
   return this;
 }
Exemplo n.º 3
0
  public FilterValidator runUri(final String path, final String query) throws UriParserException {
    Parser parser = new Parser();
    UriInfo uriInfo = null;

    uriInfo = parser.parseUri(path, query, null, edm);

    if (uriInfo.getKind() != UriInfoKind.resource) {
      fail("Filtervalidator can only be used on resourcePaths");
    }

    setFilter(uriInfo.getFilterOption());
    curExpression = filter.getExpression();
    return this;
  }
Exemplo n.º 4
0
 public FilterValidator setFilter(final FilterOption filter) {
   this.filter = filter;
   assertNotNull("FilterValidator: no filter found", filter.getExpression());
   setExpression(filter.getExpression());
   return this;
 }
Exemplo n.º 5
0
 public FilterValidator root() {
   curExpression = filter == null ? rootExpression : filter.getExpression();
   return this;
 }