Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kie.remote.services.rest.query;


This class is a "holder" class to store the following information:
  1. The parameter name, for error messages
  2. The action, an integer mapping of the parameter (so that we can use a switch statement)
  3. The data, or the value passed with the (query parameter)
Some query parameters, such as certain field values (process instance id, potential owner, etc) can be passed multiple times:
 http://.../../rest/query/runtime/process?processinstanceid=2&processinstanceid=3
 
When we process these query parameters on the server side, the JAX-RS logic groups all of the values for one parameter into a list or array. This array of values (for the example above [2,3]) is then assigned to the paramData field.
class QueryAction {
    public final String paramName;
    public final int action;
    public final String[] paramData;
    public boolean regex = false;
    public boolean min = false;
    public boolean max = false;
    public QueryAction(String paramint actionString[] data) {
        this. = param;
        this. = action;
        this. = data;
    }
    
    @Override
    public String toString() {
        StringBuilder out = new StringBuilder("[" +  + "] " +  + ": (");
        if. > 0 ) { 
            out.append([0]);
            forint i = 1; i < .; ++i ) { 
                out.append(", ").append([i]);
            }
        } 
        return out.append(")").toString();
    }
New to GrepCode? Check out our FAQ X