Performs CRUD methods on a list of annotation objects to reduce calls to the API. @param tsdb The TSD to which we belong @param method The request method @param query The query to parse and respond to
(final TSDB tsdb, final HttpMethod method, HttpQuery query)
| 141 | * @param query The query to parse and respond to |
| 142 | */ |
| 143 | void executeBulk(final TSDB tsdb, final HttpMethod method, HttpQuery query) { |
| 144 | if (method == HttpMethod.POST || method == HttpMethod.PUT) { |
| 145 | executeBulkUpdate(tsdb, method, query); |
| 146 | } else if (method == HttpMethod.DELETE) { |
| 147 | executeBulkDelete(tsdb, query); |
| 148 | } else { |
| 149 | throw new BadRequestException(HttpResponseStatus.METHOD_NOT_ALLOWED, |
| 150 | "Method not allowed", "The HTTP method [" + query.method().getName() + |
| 151 | "] is not permitted for this endpoint"); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Performs CRU methods on a list of annotation objects to reduce calls to |
no test coverage detected