com.netgrif.application.engine.workflow.web.responsebodies.LocalisedMapOptionsField Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.workflow.web.responsebodies;
import com.netgrif.application.engine.petrinet.domain.I18nString;
import com.netgrif.application.engine.petrinet.domain.dataset.MapOptionsField;
import lombok.Data;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
@Data
public class LocalisedMapOptionsField extends LocalisedField {
private Map options;
public LocalisedMapOptionsField(MapOptionsField field, Locale locale) {
super(field, locale);
this.options = field.getOptions()
.entrySet()
.stream()
.collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().getTranslation(locale), (o1, o2) -> o1, LinkedHashMap::new));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy