Search in sources :

Example 1 with RollupKind

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);
}
Also used : RollupKind(org.finos.waltz.model.entity_statistic.RollupKind) IdSelectionOptions(org.finos.waltz.model.IdSelectionOptions)

Example 2 with RollupKind

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);
}
Also used : Duration(org.finos.waltz.model.Duration) RollupKind(org.finos.waltz.model.entity_statistic.RollupKind) IdSelectionOptions(org.finos.waltz.model.IdSelectionOptions)

Aggregations

IdSelectionOptions (org.finos.waltz.model.IdSelectionOptions)2 RollupKind (org.finos.waltz.model.entity_statistic.RollupKind)2 Duration (org.finos.waltz.model.Duration)1