Class FraudCheckButtonCellRenderer
- java.lang.Object
-
- de.hybris.platform.omsbackoffice.renderers.FraudCheckButtonCellRenderer
-
- All Implemented Interfaces:
com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,FraudReportModel>
public class FraudCheckButtonCellRenderer extends java.lang.Object implements com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,FraudReportModel>
This cell renderer displays a accept potentially fraudulent order button and handles the button click.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringACCEPT_FRAUD_ITEMprotected static java.lang.StringDISABLEDprotected static java.lang.StringFRAUD_BUTTONprotected static java.lang.StringORDER_EVENT_NAMEprotected static java.lang.StringREJECT_FRAUD_ITEM
-
Constructor Summary
Constructors Constructor Description FraudCheckButtonCellRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidacceptPotentiallyFraudulentOrder(OrderModel order)Accept the order which had a fraud notice.protected booleancanPerformOperation(OrderModel order)check if the fraud can be rejected or accepted.protected voidexecuteFraudulentOperation(OrderModel order)Save the order with the new attribute value for fraudulent.protected BusinessProcessServicegetBusinessProcessService()protected ModelServicegetModelService()protected com.hybris.cockpitng.util.notifications.NotificationServicegetNotificationService()com.hybris.cockpitng.engine.WidgetInstanceManagergetWidgetInstanceManager()protected voidrejectPotentiallyFraudulentOrder(OrderModel order)Reject the order which had a fraud noticevoidrender(org.zkoss.zul.Listcell parent, com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn columnConfiguration, FraudReportModel object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManger)voidsetBusinessProcessService(BusinessProcessService businessProcessService)voidsetModelService(ModelService modelService)voidsetNotificationService(com.hybris.cockpitng.util.notifications.NotificationService notificationService)voidsetWidgetInstanceManager(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
-
-
-
Field Detail
-
FRAUD_BUTTON
protected static final java.lang.String FRAUD_BUTTON
- See Also:
- Constant Field Values
-
REJECT_FRAUD_ITEM
protected static final java.lang.String REJECT_FRAUD_ITEM
- See Also:
- Constant Field Values
-
ACCEPT_FRAUD_ITEM
protected static final java.lang.String ACCEPT_FRAUD_ITEM
- See Also:
- Constant Field Values
-
ORDER_EVENT_NAME
protected static final java.lang.String ORDER_EVENT_NAME
- See Also:
- Constant Field Values
-
DISABLED
protected static final java.lang.String DISABLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public void render(org.zkoss.zul.Listcell parent, com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn columnConfiguration, FraudReportModel object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManger)- Specified by:
renderin interfacecom.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,FraudReportModel>
-
rejectPotentiallyFraudulentOrder
protected void rejectPotentiallyFraudulentOrder(OrderModel order)
Reject the order which had a fraud notice- Parameters:
order- aOrderModel
-
acceptPotentiallyFraudulentOrder
protected void acceptPotentiallyFraudulentOrder(OrderModel order)
Accept the order which had a fraud notice.- Parameters:
order- aOrderModel
-
canPerformOperation
protected boolean canPerformOperation(OrderModel order)
check if the fraud can be rejected or accepted.- Parameters:
order- theOrderModel- Returns:
- true if the operation can be executed.
-
executeFraudulentOperation
protected void executeFraudulentOperation(OrderModel order)
Save the order with the new attribute value for fraudulent.
Send the event to business process service- Parameters:
order- anOrderModel- Throws:
ModelSavingException- aModelSavingException
-
getBusinessProcessService
protected BusinessProcessService getBusinessProcessService()
-
setBusinessProcessService
public void setBusinessProcessService(BusinessProcessService businessProcessService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getNotificationService
protected com.hybris.cockpitng.util.notifications.NotificationService getNotificationService()
-
setNotificationService
public void setNotificationService(com.hybris.cockpitng.util.notifications.NotificationService notificationService)
-
getWidgetInstanceManager
public com.hybris.cockpitng.engine.WidgetInstanceManager getWidgetInstanceManager()
-
setWidgetInstanceManager
public void setWidgetInstanceManager(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
-
-