Table of Contents

Search

  1. Preface
  2. RulePoint Interfaces
  3. RulePoint Services
  4. Custom Service API
  5. Java Adapter for REST API
  6. RulePoint REST API
  7. Sample XML and JSON Requests and Responses
  8. RulePoint Pluggable Authentication Module
  9. HTTP Request and Response Attributes

Developer Guide

Developer Guide

Filter Clause Example

Filter Clause Example

The following code is an example of a filter clause to query a responder responses:
RulePointAPI api = new RulePointAPI(); // Login to RulePoint and set the locale of server messages to US English. api.login("Administrator", "Administrator1", "en_US"); //Get the project context for the project in which the artifacts has to be created ProjectVO projectByName = api.getProjectByName("Default Project"); ProjectContext projectContext = api.getProjectContext(projectByName); // build a query to retrieve all responses that are in any draft state QueryFilter filter = new QueryFilter(); FilterClause clause = new FilterClause(("deployState", FilterClause.OPCODE.EQUALS, "DRAFT"); ArrayList<FilterClause> clauses = new ArrayList<FilterClause>(); clauses.add(clause); filter.setClauses(clauses); // execute the query ResponseInstanceVO[] responses = projectContext.getResponseInstanceList(null,filter,null); // display the responses System.out.println("Found "+responses.length+" draft responses");

0 COMMENTS

We’d like to hear from you!