class AssigneeFieldInitializer implements FieldInitializer<AssigneeEditorFieldDefinition> {

    @Override
    public void initialize(AssigneeEditorFieldDefinition field,
                           FieldElement fieldElement,
                           FormGenerationContext context) {
        field.setDefaultValue(fieldElement.getParams().getOrDefault("defaultValue",
                                                                    ""));
        field.setType(AssigneeType.valueOf(fieldElement.getParams().getOrDefault("type",
                                                                                 "USER")));
        field.setMax(Integer.valueOf(fieldElement.getParams().getOrDefault("max",
                                                                           "-1")));
    }

}