|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.core.web.controller.checkout.AbstractCheckoutController
org.broadleafcommerce.core.web.controller.checkout.BroadleafCheckoutController
public class BroadleafCheckoutController
In charge of performing the various checkout operations
| Field Summary | |
|---|---|
protected static String |
baseConfirmationView
|
protected static String |
cartPageRedirect
|
protected static String |
checkoutPageRedirect
|
protected static String |
checkoutView
|
protected static String |
multishipAddAddressSuccessView
|
protected static String |
multishipAddAddressView
|
protected static String |
multishipSuccessView
|
protected static String |
multishipView
|
| Fields inherited from class org.broadleafcommerce.core.web.controller.checkout.AbstractCheckoutController |
|---|
addressService, billingInfoFormValidator, checkoutService, countryService, creditCardPaymentInfoFactory, customerAddressService, customerService, fulfillmentGroupService, fulfillmentOptionService, fulfillmentPricingService, multishipAddAddressFormValidator, orderInfoFormValidator, orderMultishipOptionService, orderService, paymentInfoTypeService, securePaymentInfoService, shippingInfoFormValidator, stateService |
| Constructor Summary | |
|---|---|
BroadleafCheckoutController()
|
|
| Method Summary | |
|---|---|
String |
checkout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
Renders the default checkout page. |
String |
completeCheckout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
BillingInfoForm billingForm,
org.springframework.validation.BindingResult result)
Processes the request to complete checkout If the paymentMethod is undefined or "creditCard" delegates to the "completeSecureCreditCardCheckout" method. |
String |
completeSecureCreditCardCheckout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
BillingInfoForm billingForm,
org.springframework.validation.BindingResult result)
Processes the request to complete checkout using a Credit Card This method assumes that a credit card payment info will be either sent to a third party gateway or saved in a secure schema. |
String |
convertToSingleship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Converts the order to singleship by collapsing all of the fulfillment groups into the default one |
protected void |
copyShippingAddressToBillingAddress(Order order,
BillingInfoForm billingInfoForm)
This method will copy the shipping address of the first fulfillment group on the order to the billing address on the BillingInfoForm that is passed in. |
String |
getBaseConfirmationView()
|
String |
getCartPageRedirect()
|
String |
getCheckoutPageRedirect()
|
String |
getCheckoutView()
|
protected String |
getConfirmationView(String orderNumber)
|
String |
getMultishipAddAddressSuccessView()
|
String |
getMultishipAddAddressView()
|
String |
getMultishipSuccessView()
|
String |
getMultishipView()
|
protected boolean |
hasValidOrderInfo(Order cart)
A helper method used to determine the validity of order info |
protected boolean |
hasValidShippingAddresses(Order cart)
A helper method used to determine the validity of the fulfillment groups |
protected void |
initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
Initializes some custom binding operations for the checkout flow. |
protected List<String> |
populateExpirationMonths()
A helper method used to construct a list of Credit Card Expiration Months Useful for expiration dropdown menus. |
protected List<String> |
populateExpirationYears()
A helper method used to construct a list of Credit Card Expiration Years Useful for expiration dropdown menus. |
protected void |
populateModelWithShippingReferenceData(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model)
|
protected void |
putFulfillmentOptionsAndEstimationOnModel(org.springframework.ui.Model model)
A helper method to retrieve all fulfillment options for the cart |
String |
saveGlobalOrderDetails(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
OrderInfoForm orderInfoForm,
org.springframework.validation.BindingResult result)
Attempts to attach the user's email to the order so that they may proceed anonymously |
String |
saveMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
OrderMultishipOptionForm orderMultishipOptionForm,
org.springframework.validation.BindingResult result)
Processes the given options for multiship. |
String |
saveMultishipAddAddress(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
ShippingInfoForm addressForm,
org.springframework.validation.BindingResult result)
Processes the requested add address from the multiship process. |
String |
saveMultiShipInstruction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
MultiShipInstructionForm instructionForm)
|
String |
savePaymentForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
|
String |
saveSingleShip(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
ShippingInfoForm shippingForm,
org.springframework.validation.BindingResult result)
Processes the request to save a single shipping address Note that the default Broadleaf implementation creates an order with a single fulfillment group. |
String |
showMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Renders the multiship page. |
String |
showMultishipAddAddress(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
Renders the add address form during the multiship process |
| Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController |
|---|
getContextPath, isAjaxRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static String cartPageRedirect
protected static String checkoutView
protected static String checkoutPageRedirect
protected static String multishipView
protected static String multishipAddAddressView
protected static String multishipAddAddressSuccessView
protected static String multishipSuccessView
protected static String baseConfirmationView
| Constructor Detail |
|---|
public BroadleafCheckoutController()
| Method Detail |
|---|
public String checkout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
request - response - model -
public String convertToSingleship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
throws PricingException
request - response - model -
PricingException
public String saveGlobalOrderDetails(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
OrderInfoForm orderInfoForm,
org.springframework.validation.BindingResult result)
throws ServiceException
request - model - errors - emailAddress -
ServiceException
public String saveSingleShip(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
ShippingInfoForm shippingForm,
org.springframework.validation.BindingResult result)
throws PricingException,
ServiceException
request - response - model - shippingForm -
ServiceException
PricingException
public String savePaymentForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
throws PricingException
PricingException
public String showMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
request - response - model -
public String saveMultiship(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
OrderMultishipOptionForm orderMultishipOptionForm,
org.springframework.validation.BindingResult result)
throws PricingException,
ServiceException
request - response - model - orderMultishipOptionForm -
PricingException
ServiceExceptionshowMultiship(HttpServletRequest, HttpServletResponse, Model)
public String showMultishipAddAddress(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model)
request - response - model -
public String saveMultishipAddAddress(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
ShippingInfoForm addressForm,
org.springframework.validation.BindingResult result)
throws ServiceException
request - response - model - addressForm -
ServiceException
public String saveMultiShipInstruction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
MultiShipInstructionForm instructionForm)
throws ServiceException,
PricingException
ServiceException
PricingException
public String completeCheckout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
BillingInfoForm billingForm,
org.springframework.validation.BindingResult result)
throws CheckoutException,
PricingException,
ServiceException
request - response - model - billingForm -
ServiceException
CheckoutException
PricingException
public String completeSecureCreditCardCheckout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
BillingInfoForm billingForm,
org.springframework.validation.BindingResult result)
throws CheckoutException,
PricingException,
ServiceException
request - response - model - billingForm -
ServiceException
CheckoutException
PricingException
protected void copyShippingAddressToBillingAddress(Order order,
BillingInfoForm billingInfoForm)
billingInfoForm - protected boolean hasValidShippingAddresses(Order cart)
cart -
protected boolean hasValidOrderInfo(Order cart)
cart -
protected void putFulfillmentOptionsAndEstimationOnModel(org.springframework.ui.Model model)
protected List<String> populateExpirationMonths()
protected List<String> populateExpirationYears()
protected void initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
throws Exception
request - binder -
Exception
protected void populateModelWithShippingReferenceData(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model)
public String getCartPageRedirect()
public String getCheckoutView()
public String getCheckoutPageRedirect()
public String getMultishipView()
public String getMultishipAddAddressView()
public String getMultishipSuccessView()
public String getMultishipAddAddressSuccessView()
public String getBaseConfirmationView()
protected String getConfirmationView(String orderNumber)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||