@Test public void shouldSetLabel() { testObj.render(listCellMock, columnConfigurationMock, objectMock, dataTypeMock, widgetInstanceManagerMock); verify(listCellMock).setLabel(AMOUNT); }
public void render(final Listcell listCell, final ListColumn columnConfiguration, final Object object, final DataType dataType, final WidgetInstanceManager widgetInstanceManager) { final String qualifier = columnConfiguration.getQualifier(); try { final DataType paymentTransactionDataType = typeFacade.load(PAYMENT_TRANSACTION); if (paymentTransactionDataType != null && permissionFacade.canReadProperty(paymentTransactionDataType.getCode(), qualifier)) { final Object amount = propertyValueService.readValue(object, qualifier); if (amount == null) { listCell.setLabel(EMPTY); } else { listCell.setLabel(getPaymentTransactionAmountValue((PaymentTransactionModel) object, amount)); } } } catch (final TypeNotFoundException e) { LOG.error("Could not render row......", e); } }
PaymentTransactionAmountRenderer implements WidgetComponentRenderer<Listcell, ListColumn, Object> { public void render(final Listcell listCell, final ListColumn columnConfiguration, final Object object, final DataType dataType, final WidgetInstanceManager widgetInstanceManager) { final String qualifier = columnConfiguration.getQualifier(); try { final DataType paymentTransactionDataType = typeFacade.load(PAYMENT_TRANSACTION); if (paymentTransactionDataType != null && permissionFacade.canReadProperty(paymentTransactionDataType.getCode(), qualifier)) { final Object amount = propertyValueService.readValue(object, qualifier); if (amount == null) { listCell.setLabel(EMPTY); } else { listCell.setLabel(getPaymentTransactionAmountValue((PaymentTransactionModel) object, amount)); } } } catch (final TypeNotFoundException e) { LOG.error("Could not render row......", e); } } }
PaymentTransactionAmountRenderer implements WidgetComponentRenderer<Listcell, ListColumn, Object> { public void render(final Listcell listCell, final ListColumn columnConfiguration, final Object object, final DataType dataType, final WidgetInstanceManager widgetInstanceManager) { final String qualifier = columnConfiguration.getQualifier(); try { final DataType paymentTransactionDataType = typeFacade.load(PAYMENT_TRANSACTION); if (paymentTransactionDataType != null && permissionFacade.canReadProperty(paymentTransactionDataType.getCode(), qualifier)) { final Object amount = propertyValueService.readValue(object, qualifier); if (amount == null) { listCell.setLabel(EMPTY); } else { listCell.setLabel(getPaymentTransactionAmountValue((PaymentTransactionModel) object, amount)); } } } catch (final TypeNotFoundException e) { LOG.error("Could not render row......", e); } }  }
PaymentTransactionAmountRenderer implements WidgetComponentRenderer<Listcell, ListColumn, Object> { public void render(final Listcell listCell, final ListColumn columnConfiguration, final Object object, final DataType dataType, final WidgetInstanceManager widgetInstanceManager) { final String qualifier = columnConfiguration.getQualifier(); try { final DataType paymentTransactionDataType = typeFacade.load(PAYMENT_TRANSACTION); if (paymentTransactionDataType != null && permissionFacade.canReadProperty(paymentTransactionDataType.getCode(), qualifier)) { final Object amount = propertyValueService.readValue(object, qualifier); if (amount == null) { listCell.setLabel(EMPTY); } else { listCell.setLabel(getPaymentTransactionAmountValue((PaymentTransactionModel) object, amount)); } } } catch (final TypeNotFoundException e) { LOG.error("Could not render row......", e); } }  void render(final Listcell listCell, final ListColumn columnConfiguration, final Object object, final DataType dataType, final WidgetInstanceManager widgetInstanceManager); @Required void setPropertyValueService(final PropertyValueService propertyValueService); @Required void setLabelService(final LabelService labelService); @Required void setPermissionFacade(final PermissionFacade permissionFacade); @Required void setTypeFacade(final TypeFacade typeFacade); }
PaymentTransactionAmountRenderer implements WidgetComponentRenderer<Listcell, ListColumn, Object> { public void render(final Listcell listCell, final ListColumn columnConfiguration, final Object object, final DataType dataType, final WidgetInstanceManager widgetInstanceManager) { final String qualifier = columnConfiguration.getQualifier(); try { final DataType paymentTransactionDataType = typeFacade.load(PAYMENT_TRANSACTION); if (paymentTransactionDataType != null && permissionFacade.canReadProperty(paymentTransactionDataType.getCode(), qualifier)) { final Object amount = propertyValueService.readValue(object, qualifier); if (amount == null) { listCell.setLabel(EMPTY); } else { listCell.setLabel(getPaymentTransactionAmountValue((PaymentTransactionModel) object, amount)); } } } catch (final TypeNotFoundException e) { LOG.error("Could not render row......", e); } }  void render(final Listcell listCell, final ListColumn columnConfiguration, final Object object, final DataType dataType, final WidgetInstanceManager widgetInstanceManager); @Required void setPropertyValueService(final PropertyValueService propertyValueService); @Required void setLabelService(final LabelService labelService); @Required void setPermissionFacade(final PermissionFacade permissionFacade); @Required void setTypeFacade(final TypeFacade typeFacade);  }