Class ConsignmentMenuRenderer
- java.lang.Object
-
- de.hybris.platform.warehousingbackoffice.renderers.ConsignmentMenuRenderer
-
- All Implemented Interfaces:
com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,java.lang.Object>
public class ConsignmentMenuRenderer extends java.lang.Object implements com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,java.lang.Object>Renders the three-dots menu in order to display some options while viewing tasks in the Inbox section.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringACTION_BUTTONprotected static java.lang.StringACTION_CELLprotected static java.lang.StringCAN_PRINT_RETURNFORM_KEYprotected static java.lang.StringCAN_PRINT_RETURNSHIPPINGLABEL_KEYprotected static java.lang.StringCAPTURE_PAYMENT_ON_CONSIGNMENTprotected static java.lang.StringMENU_POPUP_POSITIONprotected static java.lang.StringNON_SELECTABLE_TAGSprotected static java.lang.StringPACK_ACTIONprotected static java.lang.StringPICK_ACTIONprotected static java.lang.StringROW_POPUP_STYLEprotected static java.lang.StringSOCKET_OUT_CONTEXT
-
Constructor Summary
Constructors Constructor Description ConsignmentMenuRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.zkoss.zul.MenupopupcreateMenuPopup(WorkflowActionModel workflowActionModel, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)Creates the popup menu associated to the three-dots menu.protected ConfigurationServicegetConfigurationService()protected ConsignmentPrintDocumentStrategygetConsignmentPrintExportFormStrategy()protected ConsignmentPrintDocumentStrategygetConsignmentPrintPackSlipStrategy()protected ConsignmentPrintDocumentStrategygetConsignmentPrintPickSlipStrategy()protected ConsignmentPrintDocumentStrategygetConsignmentPrintReturnFormStrategy()protected ConsignmentPrintDocumentStrategygetConsignmentPrintReturnShippingLabelStrategy()protected ConsignmentPrintDocumentStrategygetConsignmentPrintShippingLabelStrategy()protected PrintExportFormStrategygetPrintExportFormStrategy()protected java.util.List<ConsignmentStatus>getReallocableConsignmentStatuses()protected voidonActionClick(org.zkoss.zul.Listcell actionColumn, org.zkoss.zul.Menupopup menuPopup)Brings up the popup menu.protected voidprintDocument(WorkflowActionModel workflowActionModel, ConsignmentModel consignmentModel)Prints a document depending on theWorkflowActionModelthat is to be performedprotected voidprintExportSlip(ConsignmentModel consignmentModel)Prints the export slip for aConsignmentModelif possible.protected voidprintReturnFormAndLabel(ConsignmentModel consignmentModel)Evaluates ifConsignmentModel.RETURNFORMandConsignmentModel.RETURNLABELneeds to be printed.
And prints the document, if requiredvoidrender(org.zkoss.zul.Listcell listCell, com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn columnConfiguration, java.lang.Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)protected java.lang.StringresolveLabel(java.lang.String labelKey)Gets the localized label for the given key.
-
-
-
Field Detail
-
ROW_POPUP_STYLE
protected static final java.lang.String ROW_POPUP_STYLE
- See Also:
- Constant Field Values
-
SOCKET_OUT_CONTEXT
protected static final java.lang.String SOCKET_OUT_CONTEXT
- See Also:
- Constant Field Values
-
ACTION_BUTTON
protected static final java.lang.String ACTION_BUTTON
- See Also:
- Constant Field Values
-
ACTION_CELL
protected static final java.lang.String ACTION_CELL
- See Also:
- Constant Field Values
-
CAN_PRINT_RETURNFORM_KEY
protected static final java.lang.String CAN_PRINT_RETURNFORM_KEY
- See Also:
- Constant Field Values
-
CAN_PRINT_RETURNSHIPPINGLABEL_KEY
protected static final java.lang.String CAN_PRINT_RETURNSHIPPINGLABEL_KEY
- See Also:
- Constant Field Values
-
PICK_ACTION
protected static final java.lang.String PICK_ACTION
- See Also:
- Constant Field Values
-
PACK_ACTION
protected static final java.lang.String PACK_ACTION
- See Also:
- Constant Field Values
-
NON_SELECTABLE_TAGS
protected static final java.lang.String NON_SELECTABLE_TAGS
- See Also:
- Constant Field Values
-
MENU_POPUP_POSITION
protected static final java.lang.String MENU_POPUP_POSITION
- See Also:
- Constant Field Values
-
CAPTURE_PAYMENT_ON_CONSIGNMENT
protected static final java.lang.String CAPTURE_PAYMENT_ON_CONSIGNMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public void render(org.zkoss.zul.Listcell listCell, com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn columnConfiguration, java.lang.Object object, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)- Specified by:
renderin interfacecom.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,java.lang.Object>
-
createMenuPopup
protected org.zkoss.zul.Menupopup createMenuPopup(WorkflowActionModel workflowActionModel, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
Creates the popup menu associated to the three-dots menu. All options associated to aConsignmentModelmust be placed here.- Parameters:
workflowActionModel- theWorkflowActionModelwith the attachedConsignmentModelwhich will be used to populate the various actionswidgetInstanceManager- theWidgetInstanceManager- Returns:
- the newly populated
Menupopup
-
onActionClick
protected void onActionClick(org.zkoss.zul.Listcell actionColumn, org.zkoss.zul.Menupopup menuPopup)Brings up the popup menu.- Parameters:
actionColumn- theListcellwhich was selectedmenuPopup- theMenupopupthat will be opened
-
resolveLabel
protected java.lang.String resolveLabel(java.lang.String labelKey)
Gets the localized label for the given key.- Parameters:
labelKey- the key for which the label is required- Returns:
- the localized label
-
printDocument
protected void printDocument(WorkflowActionModel workflowActionModel, ConsignmentModel consignmentModel)
Prints a document depending on theWorkflowActionModelthat is to be performed- Parameters:
workflowActionModel- theWorkflowActionModelwhich will be used to know which document to print based on the task that is to be performedconsignmentModel- theConsignmentModelwhose status will be verified
-
printReturnFormAndLabel
protected void printReturnFormAndLabel(ConsignmentModel consignmentModel)
Evaluates ifConsignmentModel.RETURNFORMandConsignmentModel.RETURNLABELneeds to be printed.
And prints the document, if required- Parameters:
consignmentModel- theConsignmentModelfor which return form and return label needs to be printed
-
printExportSlip
protected void printExportSlip(ConsignmentModel consignmentModel)
Prints the export slip for aConsignmentModelif possible.- Parameters:
consignmentModel- theConsignmentModelfor which the export slip will be printed
-
getConsignmentPrintPickSlipStrategy
protected ConsignmentPrintDocumentStrategy getConsignmentPrintPickSlipStrategy()
-
getConsignmentPrintPackSlipStrategy
protected ConsignmentPrintDocumentStrategy getConsignmentPrintPackSlipStrategy()
-
getConsignmentPrintExportFormStrategy
protected ConsignmentPrintDocumentStrategy getConsignmentPrintExportFormStrategy()
-
getConsignmentPrintShippingLabelStrategy
protected ConsignmentPrintDocumentStrategy getConsignmentPrintShippingLabelStrategy()
-
getPrintExportFormStrategy
protected PrintExportFormStrategy getPrintExportFormStrategy()
-
getConsignmentPrintReturnFormStrategy
protected ConsignmentPrintDocumentStrategy getConsignmentPrintReturnFormStrategy()
-
getConsignmentPrintReturnShippingLabelStrategy
protected ConsignmentPrintDocumentStrategy getConsignmentPrintReturnShippingLabelStrategy()
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
getReallocableConsignmentStatuses
protected java.util.List<ConsignmentStatus> getReallocableConsignmentStatuses()
-
-