Search in sources :

Example 1 with Duration

use of org.finos.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 = 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

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