Class BroadleafOfferCodeController
java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
com.broadleafcommerce.advancedoffer.web.controller.BroadleafOfferCodeController
public class BroadleafOfferCodeController
extends org.broadleafcommerce.common.web.controller.BroadleafAbstractController
Provides a default implementation of a controller that can be extended, for convenience,
to handle the submission of a promo code.
- Author:
- Kelly Tisdell
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CustomerOfferCodeServiceprotected org.broadleafcommerce.core.offer.service.OfferServiceprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetView()offerCode(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) Can be overridden to provide request mappings.voidsubmitOfferCode(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String offerCode) Can be overridden to provide request mappings, this method will typically handle a POST method.Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
-
Field Details
-
offerService
protected org.broadleafcommerce.core.offer.service.OfferService offerService -
customerOfferCodeService
-
view
-
-
Constructor Details
-
BroadleafOfferCodeController
public BroadleafOfferCodeController()
-
-
Method Details
-
offerCode
public String offerCode(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) Can be overridden to provide request mappings. By default this method simply returns the string that represents the view.- Parameters:
request-response-model-- Returns:
-
submitOfferCode
public String submitOfferCode(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String offerCode) throws IOException Can be overridden to provide request mappings, this method will typically handle a POST method.- Parameters:
request-response-model-offerCode-- Returns:
- Throws:
IOException
-
getView
-
setView
-