com.softslate.commerce.customer.order
Class CheckoutAction
java.lang.Object
org.apache.struts.action.Action
com.softslate.commerce.customer.core.BaseAction
com.softslate.commerce.customer.order.CheckoutAction
- Direct Known Subclasses:
- CallbackAction, CheckoutAddressesAction, CheckoutAddressesFormAction, CheckoutComboAction, CheckoutComboFormAction, CheckoutComboShippingAction, CheckoutComboShippingFormAction, CheckoutConfirmAction, CheckoutDeclineLoginAction, CheckoutLoginAction, CheckoutLoginFormAction, CheckoutPaymentFormAction, CheckoutRegisterAction, CheckoutRegisterFormAction, CheckoutShippingAction, CheckoutShippingFormAction, CouponAction, OrderFormAction, OrderProcessAction, PayPalExpressReturnAction, PaypointCallbackAction
public class CheckoutAction
- extends BaseAction
Struts action class that corresponds to the store's checkout link. Used for
requests to "/Checkout.do" and as a superclass for all of the other action
classes in the checkout process.
The execute
method of this class decides what checkout screen
to direct the user to based on the status of the session and the store's
database configuration.
The idea behind CheckoutAction
is to provide a single
superclass that manages nearly all of the forms and processing for the
checkout process. This allows developers to easily create custom checkout
screens by extending CheckoutAction
, using its methods in
different combinations.
To allow developers to more easily override these methods, a delegate pattern
is used, in which most methods are delegated to CheckoutUtils and
CheckoutUtilsImpl, which may be subclassed to implement custom functionality.
- Author:
- David Tobey
Field Summary |
(package private) static org.apache.commons.logging.Log |
log
|
Fields inherited from class org.apache.struts.action.Action |
servlet |
Methods inherited from class org.apache.struts.action.Action |
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
static org.apache.commons.logging.Log log
CheckoutAction
public CheckoutAction()
execute
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
- Forwards the user to the appropriate checkout screen based on the status
of the session and the store's database settings.
- Overrides:
execute
in class org.apache.struts.action.Action
- Throws:
java.lang.Exception
prepareLoginForm
public void prepareLoginForm(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
prepareRegisterForm
public void prepareRegisterForm(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processCheckoutLogin
public org.apache.struts.action.ActionForward processCheckoutLogin(BaseForm baseForm,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
- Throws:
java.lang.Exception
processCheckoutRegister
public org.apache.struts.action.ActionForward processCheckoutRegister(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processDeclineLogin
public org.apache.struts.action.ActionForward processDeclineLogin(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadShippingOptions
public java.util.Collection loadShippingOptions(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
prepareCheckoutAddressesForm
public void prepareCheckoutAddressesForm(CheckoutAddressesForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
prepareCheckoutShippingForm
public void prepareCheckoutShippingForm(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processCheckoutAddresses
public org.apache.struts.action.ActionForward processCheckoutAddresses(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processCheckoutAddresses
public org.apache.struts.action.ActionForward processCheckoutAddresses(BaseForm baseForm,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
- Throws:
java.lang.Exception
processInventoryDiscountCheck
public java.util.Map processInventoryDiscountCheck(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processCheckoutShipping
public org.apache.struts.action.ActionForward processCheckoutShipping(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processShipping
public java.util.Map processShipping(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processTax
public java.util.Map processTax(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
preparePaymentForms
public void preparePaymentForms(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
preparePaymentForm
public void preparePaymentForm(org.apache.struts.action.ActionForm paymentForm,
BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processCheckoutPayment
public org.apache.struts.action.ActionForward processCheckoutPayment(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
validatePaymentForm
public boolean validatePaymentForm(org.apache.struts.action.ActionForm paymentForm,
BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processPayment
public int processPayment(PaymentProcessor paymentProcessor,
org.apache.struts.action.ActionForm paymentForm,
BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processCheckoutConfirm
public org.apache.struts.action.ActionForward processCheckoutConfirm(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
processOrderComplete
public java.util.Map processOrderComplete(BaseForm baseForm)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © SoftSlate, LLC 20032005