Parses a single TreeRule object @return A parsed tree rule @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed
()
| 408 | * @throws BadRequestException if the content was missing or parsing failed |
| 409 | */ |
| 410 | public TreeRule parseTreeRuleV1() { |
| 411 | final String json = query.getContent(); |
| 412 | if (json == null || json.isEmpty()) { |
| 413 | throw new BadRequestException(HttpResponseStatus.BAD_REQUEST, |
| 414 | "Missing message content", |
| 415 | "Supply valid JSON formatted data in the body of your request"); |
| 416 | } |
| 417 | |
| 418 | return JSON.parseToObject(json, TreeRule.class); |
| 419 | } |
| 420 | |
| 421 | /** |
| 422 | * Parses one or more tree rules |
nothing calls this directly
no test coverage detected