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