|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CartDiscountProcessor
Interface for business logic methods having to do with discounts in a user's cart.
CartProcessor
employs an
instance implementing CartDiscountProcessor
when discounting
needs to be processed.
When the application needs to create an instance that implements
CartDiscountProcessor
,
BusinessObjectFactory
finds the name of the Java class to instantiate from the
"cartDiscountProcessorImplementer" setting in the
appComponents.properties
file.
The default "cartDiscountProcessorImplementer" is
BasicCartDiscountProcessor
.
InventoryProcessor
Method Summary | |
---|---|
boolean |
isDiscountOk(Discount discount,
java.lang.Double previousOrderTotal)
Checks that a given discount is applicable. |
java.util.Map |
processAddItems(java.util.Collection orderItems)
Processes discounts upon adding an item or items to the user's cart. |
java.util.Map |
processCouponCode(java.util.Map parameters)
Processes discounts as a user enters a coupon code. |
java.util.Map |
processCustomerLogin(java.util.Map parameters)
Processes discounts as a customer logs in. |
java.util.Map |
processCustomerLogout(java.util.Map parameters)
Processes discounts as a customer logs out. |
java.util.Map |
processOnCheckout(java.util.Map parameters)
Processes discounts during checkout, as taxes and shipping are processed. |
java.util.Map |
processOrderComplete(java.util.Map parameters)
Processes discounts as a user's order is completed. |
java.util.Map |
processRemoveDiscounts()
Removes all the discounts in the current user's cart. |
Method Detail |
---|
java.util.Map processAddItems(java.util.Collection orderItems) throws java.lang.Exception
BasicCartDiscountProcessor.processDiscounts(Collection, boolean)
orderItems
- The collection of OrderItem
objects being added
to the cart.
Map
containing results of the processing. The
default implementation returns null.
java.lang.Exception
java.util.Map processOnCheckout(java.util.Map parameters) throws java.lang.Exception
BasicCartDiscountProcessor.processDiscounts(Collection, boolean)
parameters
- A Map
with any parameters needed for the
processing. The default implementation does not use this
argument.
Map
containing results of the processing. The
default implementation returns null.
java.lang.Exception
java.util.Map processCouponCode(java.util.Map parameters) throws java.lang.Exception
BasicCartDiscountProcessor.processDiscounts(Collection, boolean)
parameters
- A Map
with any parameters needed for the
processing. The default implementation does not use this
argument.
Map
containing results of the processing. The
default implementation returns null.
java.lang.Exception
java.util.Map processCustomerLogin(java.util.Map parameters) throws java.lang.Exception
BasicCartDiscountProcessor.processDiscounts(Collection, boolean)
parameters
- A Map
with any parameters needed for the
processing. The default implementation does not use this
argument.
Map
containing results of the processing. The
default implementation returns null.
java.lang.Exception
java.util.Map processCustomerLogout(java.util.Map parameters) throws java.lang.Exception
BasicCartDiscountProcessor.processDiscounts(Collection, boolean)
parameters
- A Map
with any parameters needed for the
processing. The default implementation does not use this
argument.
Map
containing results of the processing. The
default implementation returns null.
java.lang.Exception
java.util.Map processOrderComplete(java.util.Map parameters) throws java.lang.Exception
BasicCartDiscountProcessor.processDiscounts(Collection, boolean)
parameters
- A Map
with any parameters needed for the
processing. The default implementation does not use this
argument.
Map
containing results of the processing. The
default implementation returns null.
java.lang.Exception
java.util.Map processRemoveDiscounts() throws java.lang.Exception
BasicCartProcessor.processRemoveItem(OrderItem)
Map
containing results of the processing. The
default implementation returns null.
java.lang.Exception
boolean isDiscountOk(Discount discount, java.lang.Double previousOrderTotal) throws java.lang.Exception
discount
- The discount whose applicability is being checked.previousOrderTotal
- The previous order total of the current user, or null. Some
discounts are only applicable if the user has previously
placed orders totalling a certain amount.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |