Class VoucherApplierInset
- java.lang.Object
-
- de.hybris.platform.voucher.backoffice.cockpitng.editor.insets.VoucherApplierInset
-
- All Implemented Interfaces:
com.hybris.cockpitng.editors.CockpitEditorRenderer<java.lang.Object>
public class VoucherApplierInset extends java.lang.Object implements com.hybris.cockpitng.editors.CockpitEditorRenderer<java.lang.Object>Inset for applying vouchers to theAbstractOrderModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classVoucherApplierInset.RedeemVoucherEventListenerprotected static classVoucherApplierInset.SimpleVoucherExceptionprotected static classVoucherApplierInset.VoucherExceptionprotected static classVoucherApplierInset.VoucherViolationException
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUTTON_SCLASSstatic java.lang.StringBUTTON_WRAPPER_SCLASSprotected static java.lang.StringCURRENT_OBJECT_PARAMprotected static java.lang.StringEMPTY_VOUCHER_CODE_MSGprotected static java.lang.StringERROR_INVALID_VOUCHER_CODE_MSGprotected static java.lang.StringERROR_UNKNOWN_MSGprotected static java.lang.StringERROR_VOUCHER_ALREADY_APPLIED_MSGprotected static java.lang.StringERROR_VOUCHER_ALREADY_USED_MSGprotected static java.lang.StringERROR_VOUCHER_TOTALPRICE_EXCEEDED_MSGprotected static java.lang.StringERROR_WRONG_PARENT_TYPE_MSGstatic java.lang.StringINSET_SCLASSprotected static java.lang.StringINVALID_VOUCHER_CODE_MSGprotected static java.lang.StringPARENT_OBJECT_PARAMprotected static java.lang.StringREDEEM_BUTTON_MSGstatic java.lang.StringREDEEM_BUTTON_SCLASSprotected static java.lang.StringRELEASE_BUTTON_MSGstatic java.lang.StringRELEASE_BUTTON_SCLASSstatic java.lang.StringTEXTBOX_SCLASSstatic java.lang.StringTEXTBOX_WRAPPER_SCLASSprotected static java.lang.StringVOUCHER_CODE_PLACEHOLDER_LABELprotected static java.lang.StringVOUCHER_VIOLATION_HEADER_MSG
-
Constructor Summary
Constructors Constructor Description VoucherApplierInset()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyVoucher(java.lang.String voucherCode, AbstractOrderModel abstractOrder)protected voidcheckOrderAfterRedeem(VoucherModel voucher, java.lang.String voucherCode, AbstractOrderModel abstractOrder)protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadegetObjectFacade()protected VoucherModelServicegetVoucherModelService()protected VoucherServicegetVoucherService()protected voidreleaseVoucher(java.lang.String voucherCode, AbstractOrderModel abstractOrder)voidrender(org.zkoss.zk.ui.Component parent, com.hybris.cockpitng.editors.EditorContext<java.lang.Object> context, com.hybris.cockpitng.editors.EditorListener<java.lang.Object> listener)voidsetObjectFacade(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)voidsetVoucherModelService(VoucherModelService voucherModelService)voidsetVoucherService(VoucherService voucherService)protected voidvalidateVoucherCode(java.lang.String voucherCode)
-
-
-
Field Detail
-
VOUCHER_CODE_PLACEHOLDER_LABEL
protected static final java.lang.String VOUCHER_CODE_PLACEHOLDER_LABEL
- See Also:
- Constant Field Values
-
REDEEM_BUTTON_MSG
protected static final java.lang.String REDEEM_BUTTON_MSG
- See Also:
- Constant Field Values
-
RELEASE_BUTTON_MSG
protected static final java.lang.String RELEASE_BUTTON_MSG
- See Also:
- Constant Field Values
-
ERROR_WRONG_PARENT_TYPE_MSG
protected static final java.lang.String ERROR_WRONG_PARENT_TYPE_MSG
- See Also:
- Constant Field Values
-
INVALID_VOUCHER_CODE_MSG
protected static final java.lang.String INVALID_VOUCHER_CODE_MSG
- See Also:
- Constant Field Values
-
EMPTY_VOUCHER_CODE_MSG
protected static final java.lang.String EMPTY_VOUCHER_CODE_MSG
- See Also:
- Constant Field Values
-
VOUCHER_VIOLATION_HEADER_MSG
protected static final java.lang.String VOUCHER_VIOLATION_HEADER_MSG
- See Also:
- Constant Field Values
-
ERROR_INVALID_VOUCHER_CODE_MSG
protected static final java.lang.String ERROR_INVALID_VOUCHER_CODE_MSG
- See Also:
- Constant Field Values
-
ERROR_VOUCHER_ALREADY_APPLIED_MSG
protected static final java.lang.String ERROR_VOUCHER_ALREADY_APPLIED_MSG
- See Also:
- Constant Field Values
-
ERROR_VOUCHER_ALREADY_USED_MSG
protected static final java.lang.String ERROR_VOUCHER_ALREADY_USED_MSG
- See Also:
- Constant Field Values
-
ERROR_VOUCHER_TOTALPRICE_EXCEEDED_MSG
protected static final java.lang.String ERROR_VOUCHER_TOTALPRICE_EXCEEDED_MSG
- See Also:
- Constant Field Values
-
ERROR_UNKNOWN_MSG
protected static final java.lang.String ERROR_UNKNOWN_MSG
- See Also:
- Constant Field Values
-
INSET_SCLASS
public static final java.lang.String INSET_SCLASS
- See Also:
- Constant Field Values
-
TEXTBOX_SCLASS
public static final java.lang.String TEXTBOX_SCLASS
- See Also:
- Constant Field Values
-
TEXTBOX_WRAPPER_SCLASS
public static final java.lang.String TEXTBOX_WRAPPER_SCLASS
- See Also:
- Constant Field Values
-
BUTTON_SCLASS
public static final java.lang.String BUTTON_SCLASS
- See Also:
- Constant Field Values
-
REDEEM_BUTTON_SCLASS
public static final java.lang.String REDEEM_BUTTON_SCLASS
- See Also:
- Constant Field Values
-
RELEASE_BUTTON_SCLASS
public static final java.lang.String RELEASE_BUTTON_SCLASS
- See Also:
- Constant Field Values
-
BUTTON_WRAPPER_SCLASS
public static final java.lang.String BUTTON_WRAPPER_SCLASS
- See Also:
- Constant Field Values
-
PARENT_OBJECT_PARAM
protected static final java.lang.String PARENT_OBJECT_PARAM
- See Also:
- Constant Field Values
-
CURRENT_OBJECT_PARAM
protected static final java.lang.String CURRENT_OBJECT_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public void render(org.zkoss.zk.ui.Component parent, com.hybris.cockpitng.editors.EditorContext<java.lang.Object> context, com.hybris.cockpitng.editors.EditorListener<java.lang.Object> listener)- Specified by:
renderin interfacecom.hybris.cockpitng.editors.CockpitEditorRenderer<java.lang.Object>
-
applyVoucher
protected void applyVoucher(java.lang.String voucherCode, AbstractOrderModel abstractOrder) throws VoucherApplierInset.VoucherException, VoucherApplierInset.VoucherViolationException, VoucherApplierInset.SimpleVoucherException
-
releaseVoucher
protected void releaseVoucher(java.lang.String voucherCode, AbstractOrderModel abstractOrder) throws VoucherApplierInset.VoucherException, VoucherApplierInset.SimpleVoucherException
-
validateVoucherCode
protected void validateVoucherCode(java.lang.String voucherCode) throws VoucherApplierInset.SimpleVoucherException
-
checkOrderAfterRedeem
protected void checkOrderAfterRedeem(VoucherModel voucher, java.lang.String voucherCode, AbstractOrderModel abstractOrder) throws VoucherApplierInset.VoucherException, VoucherApplierInset.SimpleVoucherException
-
setVoucherService
public void setVoucherService(VoucherService voucherService)
-
getVoucherService
protected VoucherService getVoucherService()
-
setVoucherModelService
public void setVoucherModelService(VoucherModelService voucherModelService)
-
getVoucherModelService
protected VoucherModelService getVoucherModelService()
-
setObjectFacade
public void setObjectFacade(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)
-
getObjectFacade
protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade getObjectFacade()
-
-