use of com.khartec.waltz.model.Duration in project waltz by khartec.
the class EntityStatisticEndpoint method calculateHistoricStatTallyRoute.
private List<TallyPack<String>> calculateHistoricStatTallyRoute(Request request, Response response) throws IOException {
IdSelectionOptions idSelectionOptions = readIdSelectionOptionsFromBody(request);
RollupKind rollupKind = extractRollupKind(request);
Duration duration = EnumUtilities.readEnum(request.queryParams("duration"), Duration.class, s -> Duration.MONTH);
Long statisticId = getId(request);
return entityStatisticService.calculateHistoricStatTally(statisticId, rollupKind, idSelectionOptions, duration);
}
Aggregations