@Test public void testSerializeMetaData() { List<MetaDataRow> metaDataRows = new ArrayList<>(); metaDataRows.add(new MetaDataRow("att1", "val1")); metaDataRows.add(new MetaDataRow("att2", "val2")); metaDataRows.add(new MetaDataRow("att3", "val3,val4")); String s = metaDataEditor.serializeMetaDataAttributes(metaDataRows); assertEquals("att1ßval1Øatt2ßval2Øatt3ßval3,val4", s); }
@Override public String serializeMetaDataAttributes(final List<MetaDataRow> metaDataRows) { List<MetaDataAttribute> metaData = new ArrayList<>(); for (MetaDataRow row : metaDataRows) { if (row.getAttribute() != null && row.getAttribute().length() > 0) { metaData.add(new MetaDataAttribute(row)); } } return StringUtils.getStringForList(metaData, DELIMITER); }
MetaDataEditorFieldRenderer extends FieldRenderer<MetaDataEditorFieldDefinition, DefaultFormGroup> implements MetaDataEditorWidgetView.Presenter { @Override public String serializeMetaDataAttributes(final List<MetaDataRow> metaDataRows) { List<MetaDataAttribute> metaData = new ArrayList<>(); for (MetaDataRow row : metaDataRows) { if (row.getAttribute() != null && row.getAttribute().length() > 0) { metaData.add(new MetaDataAttribute(row)); } } return StringUtils.getStringForList(metaData, DELIMITER); } }
MetaDataEditorFieldRenderer extends FieldRenderer<MetaDataEditorFieldDefinition, DefaultFormGroup> implements MetaDataEditorWidgetView.Presenter { @Override public String serializeMetaDataAttributes(final List<MetaDataRow> metaDataRows) { List<MetaDataAttribute> metaData = new ArrayList<>(); for (MetaDataRow row : metaDataRows) { if (row.getAttribute() != null && row.getAttribute().length() > 0) { metaData.add(new MetaDataAttribute(row)); } } return StringUtils.getStringForList(metaData, DELIMITER); } @Inject  MetaDataEditorFieldRenderer(final MetaDataEditorWidgetView metaDataEditor,
                                       final SessionManager sessionManager,
                                       final ErrorPopupPresenter errorPopupPresenter,
                                       final Event<NotificationEvent> notification); }
MetaDataEditorFieldRenderer extends FieldRenderer<MetaDataEditorFieldDefinition, DefaultFormGroup> implements MetaDataEditorWidgetView.Presenter { @Override public String serializeMetaDataAttributes(final List<MetaDataRow> metaDataRows) { List<MetaDataAttribute> metaData = new ArrayList<>(); for (MetaDataRow row : metaDataRows) { if (row.getAttribute() != null && row.getAttribute().length() > 0) { metaData.add(new MetaDataAttribute(row)); } } return StringUtils.getStringForList(metaData, DELIMITER); } @Inject  MetaDataEditorFieldRenderer(final MetaDataEditorWidgetView metaDataEditor,
                                       final SessionManager sessionManager,
                                       final ErrorPopupPresenter errorPopupPresenter,
                                       final Event<NotificationEvent> notification); @Override String getName(); @Override void doSave(); @Override void addAttribute(); @Override void notifyModelChanged(); @Override List<MetaDataRow> deserializeMetaDataAttributes(final String s); @Override String serializeMetaDataAttributes(final List<MetaDataRow> metaDataRows); @Override boolean isDuplicateAttribute(final String attribute); @Override void removeMetaData(final MetaDataRow metaDataRow); @Override Path getDiagramPath(); @Override void showErrorMessage(String message); }
MetaDataEditorFieldRenderer extends FieldRenderer<MetaDataEditorFieldDefinition, DefaultFormGroup> implements MetaDataEditorWidgetView.Presenter { @Override public String serializeMetaDataAttributes(final List<MetaDataRow> metaDataRows) { List<MetaDataAttribute> metaData = new ArrayList<>(); for (MetaDataRow row : metaDataRows) { if (row.getAttribute() != null && row.getAttribute().length() > 0) { metaData.add(new MetaDataAttribute(row)); } } return StringUtils.getStringForList(metaData, DELIMITER); } @Inject  MetaDataEditorFieldRenderer(final MetaDataEditorWidgetView metaDataEditor,
                                       final SessionManager sessionManager,
                                       final ErrorPopupPresenter errorPopupPresenter,
                                       final Event<NotificationEvent> notification); @Override String getName(); @Override void doSave(); @Override void addAttribute(); @Override void notifyModelChanged(); @Override List<MetaDataRow> deserializeMetaDataAttributes(final String s); @Override String serializeMetaDataAttributes(final List<MetaDataRow> metaDataRows); @Override boolean isDuplicateAttribute(final String attribute); @Override void removeMetaData(final MetaDataRow metaDataRow); @Override Path getDiagramPath(); @Override void showErrorMessage(String message);  }