protected AbstractQueryDto<?> getQueryDtoForQuery(String queryString, String resourceType) {
try {
if (EntityTypes.TASK.equals(resourceType)) {
return getObjectMapper().readValue(queryString, TaskQueryDto.class);
} else {
throw new InvalidRequestException(Status.BAD_REQUEST, "Queries for resource type '" + resourceType + "' are currently not supported by filters.");
}
} catch (IOException e) {
throw new InvalidRequestException(Status.BAD_REQUEST, e, "Invalid query for resource type '" + resourceType + "'");
}
}