Class PrintShippingLabelAction
- java.lang.Object
-
- de.hybris.platform.warehousingbackoffice.actions.printshippinglabel.PrintShippingLabelAction
-
- All Implemented Interfaces:
com.hybris.cockpitng.actions.CockpitAction<ConsignmentModel,ConsignmentModel>
public class PrintShippingLabelAction extends java.lang.Object implements com.hybris.cockpitng.actions.CockpitAction<ConsignmentModel,ConsignmentModel>
Action responsible for generating aConsignmentModel.SHIPPINGLABEL
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringPOPUP_UNSAVED_CONSIGNMENT_MESSAGEprotected static java.lang.StringPOPUP_UNSAVED_CONSIGNMENT_TITLE
-
Constructor Summary
Constructors Constructor Description PrintShippingLabelAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanPerform(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)java.lang.StringgetConfirmationMessage(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)protected ConsignmentPrintDocumentStrategygetConsignmentPrintShippingLabelStrategy()protected ModelServicegetModelService()booleanneedsConfirmation(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)com.hybris.cockpitng.actions.ActionResult<ConsignmentModel>perform(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)protected voidprintShippingLabel(ConsignmentModel consignment)Generates a shipping label forConsignmentModelbased on theConsignmentPrintDocumentStrategyprotected voidprocessMessageboxEvent(org.zkoss.zk.ui.event.Event clickEvent, com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext, java.util.Map<java.lang.String,java.lang.Object> parentWidgetMap)Handles the message box popup action when the object is modified.
-
-
-
Field Detail
-
POPUP_UNSAVED_CONSIGNMENT_MESSAGE
protected static final java.lang.String POPUP_UNSAVED_CONSIGNMENT_MESSAGE
- See Also:
- Constant Field Values
-
POPUP_UNSAVED_CONSIGNMENT_TITLE
protected static final java.lang.String POPUP_UNSAVED_CONSIGNMENT_TITLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
perform
public com.hybris.cockpitng.actions.ActionResult<ConsignmentModel> perform(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)
- Specified by:
performin interfacecom.hybris.cockpitng.actions.CockpitAction<ConsignmentModel,ConsignmentModel>
-
canPerform
public boolean canPerform(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)
- Specified by:
canPerformin interfacecom.hybris.cockpitng.actions.CockpitAction<ConsignmentModel,ConsignmentModel>
-
needsConfirmation
public boolean needsConfirmation(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)
- Specified by:
needsConfirmationin interfacecom.hybris.cockpitng.actions.CockpitAction<ConsignmentModel,ConsignmentModel>
-
getConfirmationMessage
public java.lang.String getConfirmationMessage(com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext)
- Specified by:
getConfirmationMessagein interfacecom.hybris.cockpitng.actions.CockpitAction<ConsignmentModel,ConsignmentModel>
-
processMessageboxEvent
protected void processMessageboxEvent(org.zkoss.zk.ui.event.Event clickEvent, com.hybris.cockpitng.actions.ActionContext<ConsignmentModel> consignmentModelActionContext, java.util.Map<java.lang.String,java.lang.Object> parentWidgetMap)Handles the message box popup action when the object is modified. Saves theConsignmentModelon YES. Refreshes theConsignmentModelon NO. Reloads theConsignmentModelin backoffice.- Parameters:
clickEvent- the event that contains the button clickedconsignmentModelActionContext- the action context that contains the consignment
-
printShippingLabel
protected void printShippingLabel(ConsignmentModel consignment)
Generates a shipping label forConsignmentModelbased on theConsignmentPrintDocumentStrategy- Parameters:
consignment- the consignment
-
getConsignmentPrintShippingLabelStrategy
protected ConsignmentPrintDocumentStrategy getConsignmentPrintShippingLabelStrategy()
-
getModelService
protected ModelService getModelService()
-
-