public class ClientUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ClientUtils.RestFilterOperator |
Modifier and Type | Field and Description |
---|---|
static String |
REST_FILTER |
Constructor and Description |
---|
ClientUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
buildFilter(String left,
ClientUtils.RestFilterOperator operator,
String right)
Helper that builds a filter for RESTv3 collections
Filters follow a pattern like:
GET /rest/v3/workflows?filter=name -eq myWorkflow
GET /rest/v3/workflows?filter=(name -eq myWorkflow) -and (type -eq COMMAND)
About the filter grammar:
- operators need to be prefixed with -
- operator and operands within a filter are delimited by " "
- multiple filters are delimited by ()
|
static String |
encapsulateInQuots(String in)
Filter helper that encapsulates in quotes
Any user input that may contain spaces need to be encapsulated in quotes.
|
public static final String REST_FILTER
public static String encapsulateInQuots(String in)
in
- inputpublic static String buildFilter(String left, ClientUtils.RestFilterOperator operator, String right)
left
- operator
- right
- Copyright © 2016–2021. All rights reserved.