@Test public void testAddAvailableField() { formEditorHelper.addAvailableField(employeeFields.get(0)); Map<String, FieldDefinition> availableFields = formEditorHelper.getAvailableFields(); assertEquals("The added field should be returned in available fields", employeeFields.size() + 1, availableFields.size()); }
public void addAvailableField(FieldDefinition field) { if (modelContainsField(field)) { availableFields.put(field.getId(), field); } }
FormEditorHelper { public void addAvailableField(FieldDefinition field) { if (modelContainsField(field)) { availableFields.put(field.getId(), field); } } }
FormEditorHelper { public void addAvailableField(FieldDefinition field) { if (modelContainsField(field)) { availableFields.put(field.getId(), field); } } @Inject  FormEditorHelper(FieldManager fieldManager,
                            ManagedInstance<EditorFieldLayoutComponent> editorFieldLayoutComponents,
                            SyncBeanManager beanManager); }
FormEditorHelper { public void addAvailableField(FieldDefinition field) { if (modelContainsField(field)) { availableFields.put(field.getId(), field); } } @Inject  FormEditorHelper(FieldManager fieldManager,
                            ManagedInstance<EditorFieldLayoutComponent> editorFieldLayoutComponents,
                            SyncBeanManager beanManager); FormModelerContent getContent(); void initHelper(FormModelerContent content); FormDefinition getFormDefinition(); FormModel getFormModel(); void addAvailableFields(); void addAvailableField(FieldDefinition field); void removeAvailableField(FieldDefinition field); FieldDefinition getFormField(String fieldId); void removeField(String fieldId,
                            boolean addToAvailables); boolean modelContainsField(FieldDefinition fieldDefinition); List<String> getCompatibleModelFields(FieldDefinition field); List<String> getCompatibleFieldTypes(FieldDefinition field); FieldDefinition switchToField(FieldDefinition originalField,
                                         String newBinding); FieldDefinition switchToFieldType(FieldDefinition field,
                                             String fieldCode); void saveFormField(FieldDefinition originalField,
                              FieldDefinition fieldCopy); String generateUnboundFieldName(FieldDefinition field); Collection<EditorFieldLayoutComponent> getBaseFieldsDraggables(); Map<String, FieldDefinition> getAvailableFields(); FormEditorRenderingContext getRenderingContext(); @PreDestroy void destroy(); }
FormEditorHelper { public void addAvailableField(FieldDefinition field) { if (modelContainsField(field)) { availableFields.put(field.getId(), field); } } @Inject  FormEditorHelper(FieldManager fieldManager,
                            ManagedInstance<EditorFieldLayoutComponent> editorFieldLayoutComponents,
                            SyncBeanManager beanManager); FormModelerContent getContent(); void initHelper(FormModelerContent content); FormDefinition getFormDefinition(); FormModel getFormModel(); void addAvailableFields(); void addAvailableField(FieldDefinition field); void removeAvailableField(FieldDefinition field); FieldDefinition getFormField(String fieldId); void removeField(String fieldId,
                            boolean addToAvailables); boolean modelContainsField(FieldDefinition fieldDefinition); List<String> getCompatibleModelFields(FieldDefinition field); List<String> getCompatibleFieldTypes(FieldDefinition field); FieldDefinition switchToField(FieldDefinition originalField,
                                         String newBinding); FieldDefinition switchToFieldType(FieldDefinition field,
                                             String fieldCode); void saveFormField(FieldDefinition originalField,
                              FieldDefinition fieldCopy); String generateUnboundFieldName(FieldDefinition field); Collection<EditorFieldLayoutComponent> getBaseFieldsDraggables(); Map<String, FieldDefinition> getAvailableFields(); FormEditorRenderingContext getRenderingContext(); @PreDestroy void destroy(); static final String UNBOUND_FIELD_NAME_PREFFIX; }