com.konakart.bl.modules.ordertotal
Class BaseOrderTotalModule
java.lang.Object
com.konakart.bl.modules.BaseModule
com.konakart.bl.modules.ordertotal.BaseOrderTotalModule
- Direct Known Subclasses:
- ProductDiscount, Shipping, Subtotal, Tax, Total, TotalDiscount
public class BaseOrderTotalModule
- extends BaseModule
|
Method Summary |
protected com.konakart.bl.CurrencyMgr |
getCurrMgr()
|
protected java.math.BigDecimal |
getCustomBigDecimal(java.lang.String customAttr,
int customId)
Utility method that gets a BigDecimal from one of the promotion custom attributes |
protected boolean |
getCustomBoolean(java.lang.String customAttr,
int customId)
Utility method that gets a boolean from one of the promotion custom attributes |
protected int |
getCustomInt(java.lang.String customAttr,
int customId)
Utility method that gets an int from one of the promotion custom attributes |
protected java.lang.String |
getCustomString(java.lang.String customAttr,
int customId)
Utility method that gets a String from one of the promotion custom attributes. |
protected com.konakart.app.OrderTotal |
getDiscountOrderTotalFromList(com.konakart.app.Order order,
java.util.List<com.konakart.app.OrderTotal> orderTotalList)
This is a helper method for the discount modules. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseOrderTotalModule
public BaseOrderTotalModule()
getCustomInt
protected int getCustomInt(java.lang.String customAttr,
int customId)
throws com.konakart.app.KKException
- Utility method that gets an int from one of the promotion custom attributes
- Parameters:
customAttr - customId -
- Returns:
- int
- Throws:
com.konakart.app.KKException
getCustomBigDecimal
protected java.math.BigDecimal getCustomBigDecimal(java.lang.String customAttr,
int customId)
throws com.konakart.app.KKException
- Utility method that gets a BigDecimal from one of the promotion custom attributes
- Parameters:
customAttr - customId -
- Returns:
- BigDecimal
- Throws:
com.konakart.app.KKException
getCustomBoolean
protected boolean getCustomBoolean(java.lang.String customAttr,
int customId)
throws com.konakart.app.KKException
- Utility method that gets a boolean from one of the promotion custom attributes
- Parameters:
customAttr - customId -
- Returns:
- boolean
- Throws:
com.konakart.app.KKException
getCustomString
protected java.lang.String getCustomString(java.lang.String customAttr,
int customId)
throws com.konakart.app.KKException
- Utility method that gets a String from one of the promotion custom attributes. It ensures
that the value isn't null.
- Parameters:
customAttr - customId -
- Returns:
- String
- Throws:
com.konakart.app.KKException
getCurrMgr
protected com.konakart.bl.CurrencyMgr getCurrMgr()
getDiscountOrderTotalFromList
protected com.konakart.app.OrderTotal getDiscountOrderTotalFromList(com.konakart.app.Order order,
java.util.List<com.konakart.app.OrderTotal> orderTotalList)
throws com.konakart.app.KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
- This is a helper method for the discount modules. Many promotions may be relevant for an
order. This method receives all of the relative promotions (in the form of Order Total
objects) in a list as an input parameter. It sums all of the cumulative promotions into a
single Order Total object and then compares all of the order totals that it has, in order to
select the one that provides the largest discount.
- Parameters:
order - orderTotalList -
- Returns:
- An OrderTotal object
- Throws:
com.konakart.app.KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
Copyright © 2006 DS Data Systems UK Ltd.