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

    Fields
    Modifier and Type
    Field
    Description
     
    protected org.broadleafcommerce.core.offer.service.OfferService
     
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    offerCode(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model)
    Can be overridden to provide request mappings.
    void
     
    submitOfferCode(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • offerService

      protected org.broadleafcommerce.core.offer.service.OfferService offerService
    • customerOfferCodeService

      protected CustomerOfferCodeService customerOfferCodeService
    • view

      protected String 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

      public String getView()
    • setView

      public void setView(String view)