com.elasticpath.sfweb.formbean.impl
Class BillingAndReviewFormBeanImpl

java.lang.Object
  extended by com.elasticpath.sfweb.formbean.impl.EpFormBeanImpl
      extended by com.elasticpath.sfweb.formbean.impl.BillingAndReviewFormBeanImpl
All Implemented Interfaces:
BillingAndReviewFormBean, EpFormBean, java.io.Serializable

public class BillingAndReviewFormBeanImpl
extends EpFormBeanImpl
implements BillingAndReviewFormBean

Bean used to provide and capture information from the Billing and Review screen.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.elasticpath.sfweb.formbean.BillingAndReviewFormBean
PAYMENT_OPTION_EXISTING_CREDIT_CARD, PAYMENT_OPTION_NEW_CREDIT_CARD, PAYMENT_OPTION_PAYPAL_EXPRESS
 
Constructor Summary
BillingAndReviewFormBeanImpl()
          Default constructor.
 
Method Summary
 Address getBillingAddress()
          Get the billing address.
 java.util.Map getCardTypeMap()
          Get a map of the card types for the Spring input form.
 Customer getCustomer()
          Gets the Customer.
 java.util.List getExistingCreditCards()
          Retrieve the collection of existing credit cards that the customer may use for payment.
 java.util.Map getMonthMap()
          Get a map of the numbers of months of the year for the Spring form input for credit card expiry.
 OrderPayment getOrderPayment()
          Get the orderPayment used to collect payment information.
 CustomerCreditCard getSelectedExistingCreditCard()
          Returns the existing credit card selected by the user.
 long getSelectedExistingCreditCardUid()
          Returns the id of the existing credit card selected by the user.
 java.lang.String getSelectedPaymentOption()
          Get the payment option that the user has selected.
 Address getShippingAddress()
          Get the shipping address.
 java.util.Map getYearMap()
          Get a map of years for the Spring form input for credit card expiry.
 boolean isSaveCreditCardForFutureUse()
          Indicates whether the user wishes to save a new credit card.
 boolean isValidateCvv2()
          True if the cvv2 code (Card Security Code) should be validated.
 void setBillingAddress(Address billingAddress)
          Set the billing address.
 void setCardTypes(java.util.List cardTypes)
          Set the card types available as a list of Strings.
 void setCustomer(Customer customer)
          Sets the Customer.
 void setExistingCreditCards(java.util.List existingCreditCards)
          Set the collection of existing credit cards that the customer may use for payment.
 void setOrderPayment(OrderPayment orderPayment)
          Set the orderPayment used to collect payment information.
 void setSaveCreditCardForFutureUse(boolean saveCreditCard)
          Set whether new credit card information should be saved for future use.
 void setSelectedExistingCreditCardUid(long selectedExistingCardUid)
          Sets the id of the existing credit card selected by the user.
 void setSelectedPaymentOption(java.lang.String selectedPaymentOption)
          Set the payment option that the user has selected.
 void setShippingAddress(Address shippingAddress)
          Set the shipping address.
 void setValidateCvv2(boolean validate)
          Set whether or not the cvv2 code should be validated.
 
Methods inherited from class com.elasticpath.sfweb.formbean.impl.EpFormBeanImpl
getElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.sfweb.formbean.EpFormBean
getElasticPath
 

Constructor Detail

BillingAndReviewFormBeanImpl

public BillingAndReviewFormBeanImpl()
Default constructor.

Method Detail

getBillingAddress

public Address getBillingAddress()
Get the billing address.

Specified by:
getBillingAddress in interface BillingAndReviewFormBean
Returns:
the billing address

getCardTypeMap

public java.util.Map getCardTypeMap()
Get a map of the card types for the Spring input form.

Specified by:
getCardTypeMap in interface BillingAndReviewFormBean
Returns:
the credit card type map

getCustomer

public Customer getCustomer()
Gets the Customer.

Specified by:
getCustomer in interface BillingAndReviewFormBean
Returns:
the Customer.

getExistingCreditCards

public java.util.List getExistingCreditCards()
Retrieve the collection of existing credit cards that the customer may use for payment.

Specified by:
getExistingCreditCards in interface BillingAndReviewFormBean
Returns:
a list of CustomerCreditCards

getMonthMap

public java.util.Map getMonthMap()
Get a map of the numbers of months of the year for the Spring form input for credit card expiry.

Specified by:
getMonthMap in interface BillingAndReviewFormBean
Returns:
map of month digit strings

getOrderPayment

public OrderPayment getOrderPayment()
Get the orderPayment used to collect payment information.

Specified by:
getOrderPayment in interface BillingAndReviewFormBean
Returns:
the orderPayment

getSelectedExistingCreditCard

public CustomerCreditCard getSelectedExistingCreditCard()
Returns the existing credit card selected by the user.

Specified by:
getSelectedExistingCreditCard in interface BillingAndReviewFormBean
Returns:
the CustomerCreditCard or null if there is no valid selected credit card.

getSelectedExistingCreditCardUid

public long getSelectedExistingCreditCardUid()
Returns the id of the existing credit card selected by the user.

Specified by:
getSelectedExistingCreditCardUid in interface BillingAndReviewFormBean
Returns:
the credit card UID

getSelectedPaymentOption

public java.lang.String getSelectedPaymentOption()
Get the payment option that the user has selected.

Specified by:
getSelectedPaymentOption in interface BillingAndReviewFormBean
Returns:
a constant value indicating the user's selection

getShippingAddress

public Address getShippingAddress()
Get the shipping address.

Specified by:
getShippingAddress in interface BillingAndReviewFormBean
Returns:
the shipping address

getYearMap

public java.util.Map getYearMap()
Get a map of years for the Spring form input for credit card expiry.

Specified by:
getYearMap in interface BillingAndReviewFormBean
Returns:
map of year strings

isSaveCreditCardForFutureUse

public boolean isSaveCreditCardForFutureUse()
Indicates whether the user wishes to save a new credit card.

Specified by:
isSaveCreditCardForFutureUse in interface BillingAndReviewFormBean
Returns:
true if the card information is to be saved, false otherwise

isValidateCvv2

public boolean isValidateCvv2()
True if the cvv2 code (Card Security Code) should be validated.

Specified by:
isValidateCvv2 in interface BillingAndReviewFormBean
Returns:
see above

setBillingAddress

public void setBillingAddress(Address billingAddress)
Set the billing address.

Specified by:
setBillingAddress in interface BillingAndReviewFormBean
Parameters:
billingAddress - the billing address

setCardTypes

public void setCardTypes(java.util.List cardTypes)
Set the card types available as a list of Strings.

Specified by:
setCardTypes in interface BillingAndReviewFormBean
Parameters:
cardTypes - a list of String card types

setCustomer

public void setCustomer(Customer customer)
Sets the Customer.

Specified by:
setCustomer in interface BillingAndReviewFormBean
Parameters:
customer - Customer.

setExistingCreditCards

public void setExistingCreditCards(java.util.List existingCreditCards)
Set the collection of existing credit cards that the customer may use for payment.

Specified by:
setExistingCreditCards in interface BillingAndReviewFormBean
Parameters:
existingCreditCards - a list of CustomerCreditCards

setOrderPayment

public void setOrderPayment(OrderPayment orderPayment)
Set the orderPayment used to collect payment information.

Specified by:
setOrderPayment in interface BillingAndReviewFormBean
Parameters:
orderPayment - the orderPayment

setSaveCreditCardForFutureUse

public void setSaveCreditCardForFutureUse(boolean saveCreditCard)
Set whether new credit card information should be saved for future use.

Specified by:
setSaveCreditCardForFutureUse in interface BillingAndReviewFormBean
Parameters:
saveCreditCard - set to true to indicate that the new credit card information should be saved

setSelectedExistingCreditCardUid

public void setSelectedExistingCreditCardUid(long selectedExistingCardUid)
Sets the id of the existing credit card selected by the user. Setting this value sets the payment option to EXISTING_CREDIT_CARD.

Specified by:
setSelectedExistingCreditCardUid in interface BillingAndReviewFormBean
Parameters:
selectedExistingCardUid - the credit card UID

setSelectedPaymentOption

public void setSelectedPaymentOption(java.lang.String selectedPaymentOption)
Set the payment option that the user has selected. This value will be re-set to EXISTING_CREDIT_CARD if setSelectedExistingCreditCardUid(card) is invoked.

Specified by:
setSelectedPaymentOption in interface BillingAndReviewFormBean
Parameters:
selectedPaymentOption - a payment option constant defined in this interface

setShippingAddress

public void setShippingAddress(Address shippingAddress)
Set the shipping address.

Specified by:
setShippingAddress in interface BillingAndReviewFormBean
Parameters:
shippingAddress - the shipping address

setValidateCvv2

public void setValidateCvv2(boolean validate)
Set whether or not the cvv2 code should be validated.

Specified by:
setValidateCvv2 in interface BillingAndReviewFormBean
Parameters:
validate - true if the cvv2 should be validated.