Search in sources :

Example 1 with FEFilter

use of com.bakdata.conquery.apiv1.frontend.FEFilter in project conquery by bakdata.

the class AbstractSelectFilter method configureFrontend.

@Override
public void configureFrontend(FEFilter f) throws ConceptConfigurationException {
    f.setTemplate(getTemplate());
    f.setType(filterType);
    if (values == null || values.isEmpty()) {
        return;
    }
    if (maximumSize != -1 && values.size() > maximumSize) {
        log.trace("Too many possible values ({} of {} in Filter[{}]). Upgrading to BigMultiSelect", values.size(), maximumSize, getId());
        f.setType(FEFilterType.BIG_MULTI_SELECT);
    }
    if (this.filterType != FEFilterType.BIG_MULTI_SELECT) {
        f.setOptions(values.stream().map(v -> new FEValue(getLabelFor(v), v)).collect(Collectors.toList()));
    }
}
Also used : FEValue(com.bakdata.conquery.apiv1.frontend.FEValue)

Aggregations

FEValue (com.bakdata.conquery.apiv1.frontend.FEValue)1