Search in sources :

Example 1 with Duration

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

Aggregations

Duration (com.khartec.waltz.model.Duration)1 IdSelectionOptions (com.khartec.waltz.model.IdSelectionOptions)1 RollupKind (com.khartec.waltz.model.entity_statistic.RollupKind)1