Parses a list of metrics, tagk and/or tagvs to assign UIDs to @return as hash map of lists for the different types @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed
()
| 222 | * @throws BadRequestException if the content was missing or parsing failed |
| 223 | */ |
| 224 | public HashMap<String, List<String>> parseUidAssignV1() { |
| 225 | final String json = query.getContent(); |
| 226 | if (json == null || json.isEmpty()) { |
| 227 | throw new BadRequestException(HttpResponseStatus.BAD_REQUEST, |
| 228 | "Missing message content", |
| 229 | "Supply valid JSON formatted data in the body of your request"); |
| 230 | } |
| 231 | try { |
| 232 | return JSON.parseToObject(json, UID_ASSIGN); |
| 233 | } catch (IllegalArgumentException iae) { |
| 234 | throw new BadRequestException("Unable to parse the given JSON", iae); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Parses metric, tagk or tagv, and name to rename UID |
nothing calls this directly
no test coverage detected