|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.service.impl.AbstractEpServiceImpl com.elasticpath.service.shoppingcart.impl.CheckoutServiceImpl
public class CheckoutServiceImpl
Provides a service to execute a shopping cart checkout.
Constructor Summary | |
---|---|
CheckoutServiceImpl()
|
Method Summary | |
---|---|
void |
calculateTaxAndBeforeTaxValue(ShoppingCart shoppingCart)
Complete the tax related calculation for the given shoppingCart. |
void |
checkout(ShoppingCart shoppingCart,
OrderPayment orderPayment)
Processes an order for the items in the specified shopping cart. |
void |
retrieveShippingOption(ShoppingCart shoppingCart)
Retrieve the valid shippingServiceLevels based on the given shoppingCart, and set the first one of the valid shippingServiceLevels as the selected shipping option by default. |
void |
setCheckoutEventHandler(CheckoutEventHandler checkoutEventHandler)
Set the handler to be notified of checkout events. |
void |
setCustomerService(CustomerService customerService)
Set the customer service. |
void |
setCustomerSessionService(CustomerSessionService customerSessionService)
Set the customer session service. |
void |
setEmailService(EmailService emailService)
Set the emailService. |
void |
setInventoryService(InventoryService inventoryService)
Set the inventory service. |
void |
setOrderService(OrderService orderService)
Set the order service. |
void |
setPaymentTypeFactory(PaymentTypeFactory paymentTypeFactory)
Set the PaymentTypeFactory singleton. |
void |
setRuleService(RuleService ruleService)
Set the rule service. |
void |
setShippingServiceLevelService(ShippingServiceLevelService shippingServiceLevelService)
Set the shippingServiceLevel service. |
void |
setShoppingCartService(ShoppingCartService shoppingCartService)
Set the shopping cart service. |
void |
setTaxJurisdictionService(TaxJurisdictionService taxJurisdictionService)
Set the taxJurisdiction service. |
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.service.EpService |
---|
getElasticPath, setElasticPath |
Constructor Detail |
---|
public CheckoutServiceImpl()
Method Detail |
---|
public void calculateTaxAndBeforeTaxValue(ShoppingCart shoppingCart)
calculateTaxAndBeforeTaxValue
in interface CheckoutService
shoppingCart
- the current shopping cart.public void checkout(ShoppingCart shoppingCart, OrderPayment orderPayment)
checkout
in interface CheckoutService
shoppingCart
- the cart to checkoutorderPayment
- the orderPayment representing the payment detail information. Javadoc tags not used due to a Checkstyle processing error:
throws CardDeclinedException if the card is declined throws CardExpiredException if the card has expired throws CardErrorException
if there was an error processing the given information throws EpServiceException if the payment processing fails throws
InsufficientInventoryException if there is not enough inventory to complete the orderpublic void retrieveShippingOption(ShoppingCart shoppingCart)
retrieveShippingOption
in interface CheckoutService
shoppingCart
- the current shopping cart.public void setCheckoutEventHandler(CheckoutEventHandler checkoutEventHandler)
checkoutEventHandler
- the CheckoutEventHandler
public void setCustomerService(CustomerService customerService)
setCustomerService
in interface CheckoutService
customerService
- the customer service.public void setCustomerSessionService(CustomerSessionService customerSessionService)
customerSessionService
- the customer session servicepublic void setEmailService(EmailService emailService)
emailService
- the emailServicepublic void setInventoryService(InventoryService inventoryService)
inventoryService
- the inventory servicepublic void setOrderService(OrderService orderService)
setOrderService
in interface CheckoutService
orderService
- the order servicepublic void setPaymentTypeFactory(PaymentTypeFactory paymentTypeFactory)
PaymentTypeFactory
singleton.
paymentTypeFactory
- the paymentTypeFactory singleton.public void setRuleService(RuleService ruleService)
setRuleService
in interface CheckoutService
ruleService
- the rule servicepublic void setShippingServiceLevelService(ShippingServiceLevelService shippingServiceLevelService)
setShippingServiceLevelService
in interface CheckoutService
shippingServiceLevelService
- the shippingServiceLevel service.public void setShoppingCartService(ShoppingCartService shoppingCartService)
setShoppingCartService
in interface CheckoutService
shoppingCartService
- the shopping cart servicepublic void setTaxJurisdictionService(TaxJurisdictionService taxJurisdictionService)
setTaxJurisdictionService
in interface CheckoutService
taxJurisdictionService
- the taxJurisdiction service
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |