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.String
ACCEPT_FRAUD_ITEM
protected static java.lang.String
DISABLED
protected static java.lang.String
FRAUD_BUTTON
protected static java.lang.String
ORDER_EVENT_NAME
protected static java.lang.String
REJECT_FRAUD_ITEM
-
Constructor Summary
Constructors Constructor Description FraudCheckButtonCellRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
acceptPotentiallyFraudulentOrder(OrderModel order)
Accept the order which had a fraud notice.protected boolean
canPerformOperation(OrderModel order)
check if the fraud can be rejected or accepted.protected void
executeFraudulentOperation(OrderModel order)
Save the order with the new attribute value for fraudulent.protected BusinessProcessService
getBusinessProcessService()
protected ModelService
getModelService()
protected com.hybris.cockpitng.util.notifications.NotificationService
getNotificationService()
com.hybris.cockpitng.engine.WidgetInstanceManager
getWidgetInstanceManager()
protected void
rejectPotentiallyFraudulentOrder(OrderModel order)
Reject the order which had a fraud noticevoid
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)
void
setBusinessProcessService(BusinessProcessService businessProcessService)
void
setModelService(ModelService modelService)
void
setNotificationService(com.hybris.cockpitng.util.notifications.NotificationService notificationService)
void
setWidgetInstanceManager(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:
render
in 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)
-
-