@Test public void simplify_shouldSimplify() { Form form = MetadataUtils.existing(Form.class, CommonMetadata._Form.TRIAGE); SimpleObject result = simplifier.simplify(form); Assert.assertThat(result, hasEntry("id", (Object) form.getId())); Assert.assertThat(result, hasEntry("name", (Object) form.getName())); Assert.assertThat(result, hasEntry("uuid", (Object) form.getUuid())); }
@Override protected SimpleObject simplify(Form form) { SimpleObject ret = new SimpleObject(); ret.put("id", form.getId()); ret.put("name", form.getName()); ret.put("uuid", form.getUuid()); ret.put("formUuid", form.getUuid()); FormDescriptor descriptor = formManager.getFormDescriptor(form); if (descriptor != null) { ret.put("iconProvider", descriptor.getIcon().getProvider()); ret.put("icon", descriptor.getIcon().getPath()); } return ret; }
FormSimplifier extends AbstractSimplifier<Form> { @Override protected SimpleObject simplify(Form form) { SimpleObject ret = new SimpleObject(); ret.put("id", form.getId()); ret.put("name", form.getName()); ret.put("uuid", form.getUuid()); ret.put("formUuid", form.getUuid()); FormDescriptor descriptor = formManager.getFormDescriptor(form); if (descriptor != null) { ret.put("iconProvider", descriptor.getIcon().getProvider()); ret.put("icon", descriptor.getIcon().getPath()); } return ret; } }
FormSimplifier extends AbstractSimplifier<Form> { @Override protected SimpleObject simplify(Form form) { SimpleObject ret = new SimpleObject(); ret.put("id", form.getId()); ret.put("name", form.getName()); ret.put("uuid", form.getUuid()); ret.put("formUuid", form.getUuid()); FormDescriptor descriptor = formManager.getFormDescriptor(form); if (descriptor != null) { ret.put("iconProvider", descriptor.getIcon().getProvider()); ret.put("icon", descriptor.getIcon().getPath()); } return ret; }  }
FormSimplifier extends AbstractSimplifier<Form> { @Override protected SimpleObject simplify(Form form) { SimpleObject ret = new SimpleObject(); ret.put("id", form.getId()); ret.put("name", form.getName()); ret.put("uuid", form.getUuid()); ret.put("formUuid", form.getUuid()); FormDescriptor descriptor = formManager.getFormDescriptor(form); if (descriptor != null) { ret.put("iconProvider", descriptor.getIcon().getProvider()); ret.put("icon", descriptor.getIcon().getPath()); } return ret; }   }
FormSimplifier extends AbstractSimplifier<Form> { @Override protected SimpleObject simplify(Form form) { SimpleObject ret = new SimpleObject(); ret.put("id", form.getId()); ret.put("name", form.getName()); ret.put("uuid", form.getUuid()); ret.put("formUuid", form.getUuid()); FormDescriptor descriptor = formManager.getFormDescriptor(form); if (descriptor != null) { ret.put("iconProvider", descriptor.getIcon().getProvider()); ret.put("icon", descriptor.getIcon().getPath()); } return ret; }    }