com.softslate.commerce.customer.order
Class CartAddForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended bycom.softslate.commerce.customer.core.BaseForm
          extended bycom.softslate.commerce.customer.order.CartAddForm
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CartItemEditForm

public class CartAddForm
extends BaseForm

Struts form class for submissions to add items to the current user's cart. Used for requests to "/CartAdd.do".

The validate method of this class checks the orderProductQuantities property to make sure the user entered a quantity greater than zero for at least one product. It checks the orderProductCodes property to make sure that at least one product code was submitted.

It also populates the orderAttributes property with submitted product attributes and their values.

Author:
David Tobey
See Also:
CartAddAction, Serialized Form

Field Summary
(package private) static org.apache.commons.logging.Log log
           
private  java.util.HashMap orderAttributes
           
private  java.lang.String[] orderProductCodes
           
private  java.lang.String[] orderProductQuantities
           
private  java.lang.String[] requiredAttributeCodes
           
private  java.lang.String[] requiredAttributeNames
           
private static long serialVersionUID
           
 
Fields inherited from class com.softslate.commerce.customer.core.BaseForm
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
CartAddForm()
           
 
Method Summary
 java.util.HashMap getOrderAttributes()
           
 java.lang.String[] getOrderProductCodes()
           
 java.lang.String[] getOrderProductQuantities()
           
 java.lang.String[] getRequiredAttributeCodes()
           
 java.lang.String[] getRequiredAttributeNames()
           
 void setOrderAttributes(java.util.HashMap orderAttributes)
           
 void setOrderProductCodes(java.lang.String[] orderProductCodes)
           
 void setOrderProductQuantities(java.lang.String[] orderProductQuantities)
           
 void setRequiredAttributeCodes(java.lang.String[] requiredAttributeCodes)
           
 void setRequiredAttributeNames(java.lang.String[] requiredAttributeNames)
           
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
           
 void validateAttributes()
           
 void validateProductCode()
           
 void validateQuantity()
           
 
Methods inherited from class com.softslate.commerce.customer.core.BaseForm
getBusinessObjectFactory, getErrors, getMapping, getMessage, getMessages, getRequest, getSettingsBean, getUser, initializeProperties, setBusinessObjectFactory, setErrors, setMapping, setMessages, setRequest, setSettingsBean, setUser
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

log

static org.apache.commons.logging.Log log

orderProductCodes

private java.lang.String[] orderProductCodes

requiredAttributeCodes

private java.lang.String[] requiredAttributeCodes

requiredAttributeNames

private java.lang.String[] requiredAttributeNames

orderProductQuantities

private java.lang.String[] orderProductQuantities

orderAttributes

private java.util.HashMap orderAttributes
Constructor Detail

CartAddForm

public CartAddForm()
Method Detail

getOrderProductCodes

public java.lang.String[] getOrderProductCodes()

setOrderProductCodes

public void setOrderProductCodes(java.lang.String[] orderProductCodes)

getRequiredAttributeCodes

public java.lang.String[] getRequiredAttributeCodes()

setRequiredAttributeCodes

public void setRequiredAttributeCodes(java.lang.String[] requiredAttributeCodes)

getRequiredAttributeNames

public java.lang.String[] getRequiredAttributeNames()

setRequiredAttributeNames

public void setRequiredAttributeNames(java.lang.String[] requiredAttributeNames)

getOrderProductQuantities

public java.lang.String[] getOrderProductQuantities()

setOrderProductQuantities

public void setOrderProductQuantities(java.lang.String[] orderProductQuantities)

getOrderAttributes

public java.util.HashMap getOrderAttributes()

setOrderAttributes

public void setOrderAttributes(java.util.HashMap orderAttributes)

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest request)

validateQuantity

public void validateQuantity()

validateProductCode

public void validateProductCode()

validateAttributes

public void validateAttributes()


Copyright © SoftSlate, Inc. 2003–2005