com.netgrif.application.engine.workflow.web.responsebodies.LocalisedChoiceField 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.ChoiceField;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Set;
@Data
@NoArgsConstructor
public class LocalisedChoiceField extends LocalisedField {
protected List choices;
public LocalisedChoiceField(ChoiceField field, Locale locale) {
super(field, locale);
this.choices = new LinkedList<>();
Set choices = field.getChoices();
for (I18nString choice : choices) {
this.choices.add(choice.getTranslation(locale));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy