(DbFilter filter)
| 41 | SecurityContext securityContext; |
| 42 | |
| 43 | @POST |
| 44 | @Consumes(MediaType.APPLICATION_JSON) |
| 45 | public DbQueryResult runQuery(DbFilter filter) { |
| 46 | SecurityUtils.allowOnlyAdmin(securityContext); |
| 47 | if (filter == null) { |
| 48 | throwBadRequestException("Filter cannot be null!"); |
| 49 | } |
| 50 | |
| 51 | DbQueryResult result = new DbQueryResult(); |
| 52 | Iterator<Map<String, Object>> iterator = getReader().runQuery(filter); |
| 53 | while (iterator.hasNext()) { |
| 54 | result.addValue(iterator.next()); |
| 55 | } |
| 56 | return result; |
| 57 | } |
| 58 | |
| 59 | private DbReader getReader() { |
| 60 | String confId = ConfigResource.DEFAULT; |
nothing calls this directly
no test coverage detected