|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.bl.BaseMgr
com.konakart.bl.TaxMgr
public class TaxMgr
TaxMgr class
| Nested Class Summary | |
|---|---|
protected class |
TaxMgr.StaticData
Used to store the static data of this manager |
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
the log |
protected static java.lang.String |
mutex
mutex |
protected static java.util.Map<java.lang.String,TaxMgr.StaticData> |
staticDataHM
Hash Map that contains the static data |
| Fields inherited from class com.konakart.bl.BaseMgr |
|---|
templateBaseDir |
| Constructor Summary | |
|---|---|
TaxMgr(KKEngIf eng)
Constructor |
|
| Method Summary | |
|---|---|
java.math.BigDecimal |
addStoreTax(java.math.BigDecimal cost,
int taxClassId)
This is a utility method to directly get the final cost. |
java.math.BigDecimal |
addStoreTax(java.math.BigDecimal cost,
int taxClassId,
int quantity)
This is a utility method to directly get the final cost. |
java.math.BigDecimal |
addTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId)
This is a utility method to directly get the final cost. |
java.math.BigDecimal |
addTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId,
int quantity)
This is a utility method to directly get the final cost. |
Country[] |
getAllCountries()
Returns an array of all defined countries |
Country |
getCountryPerId(int countryId)
Returns the country object for the country id, or Null if the country doesn't exist in the DB. |
Country |
getCountryPerName(java.lang.String countryName)
Returns the country object for the country name, or Null if the country doesn't exist in the DB. |
GeoZone[] |
getGeoZonesPerZone(ZoneIf zone)
Find the GeoZones that exist for a particular zone |
java.math.BigDecimal |
getStoreTax(java.math.BigDecimal cost,
int taxClassId)
This is a utility method to directly return the tax that needs to be applied for a defined item cost and a quantity of 1. |
java.math.BigDecimal |
getStoreTax(java.math.BigDecimal cost,
int taxClassId,
int quantity)
This is a utility method to directly return the total tax that needs to be applied for a defined item cost and quantity. |
java.math.BigDecimal |
getStoreTaxRate(int taxClassId)
Returns the tax rate for the store for a taxClassId. |
java.math.BigDecimal |
getTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId)
This is a utility method to directly return the tax that needs to be applied for a defined item cost and a quantity of 1. |
java.math.BigDecimal |
getTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId,
int quantity)
This is a utility method to directly return the total tax that needs to be applied for a defined item cost and quantity. |
int |
getTaxQuantityRule()
Returns the rule used to calculate tax for products with multiple quantities. |
java.math.BigDecimal |
getTaxRate(int countryId,
int zoneId,
int taxClassId)
The tax rate can be calculated based on the country id, the zone id and the tax class id. |
TaxRate[] |
getTaxRateObjects(int countryId,
int zoneId,
int taxClassId)
The tax rate can be calculated based on the country id, the zone id and the tax class id. |
int |
getTaxScale()
Returns the precision use for calculating tax that matches the ADMIN_CURRENCY_DECIMAL_PLACES configuration variable. |
Zone |
getZonePerCountryAndCode(int countryId,
java.lang.String zoneDesc)
The zone name and zone code is compared with the zoneDesc parameter in order to determine whether a zone exists in the DB matching zoneDesc for the country defined by countryId. |
Zone |
getZonePerId(int zoneId)
Get a zone for a zoneId |
Zone[] |
getZonesPerCountry(int countryId)
Get all zones for a country. |
void |
refreshConfigs()
Get the config variables needed to setup the tax mgr |
Zone[] |
searchForZones(ZoneSearchIf search)
Search for zones using various search criteria |
protected void |
setZoneCriteriaWithStandardAttributes(org.apache.torque.util.Criteria c)
Sets the criteria with the standard attributes so as not to have to repeat this code many times. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,TaxMgr.StaticData> staticDataHM
| Constructor Detail |
|---|
public TaxMgr(KKEngIf eng)
throws java.lang.Exception
eng -
java.lang.Exception| Method Detail |
|---|
public void refreshConfigs()
throws java.lang.Exception
refreshConfigs in interface TaxMgrIfjava.lang.Exception
public Zone getZonePerCountryAndCode(int countryId,
java.lang.String zoneDesc)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
getZonePerCountryAndCode in interface TaxMgrIfcountryId - zoneDesc -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public Zone[] getZonesPerCountry(int countryId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
getZonesPerCountry in interface TaxMgrIfcountryId -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public Zone[] searchForZones(ZoneSearchIf search)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
searchForZones in interface TaxMgrIfsearch -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public Zone getZonePerId(int zoneId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
TaxMgrIf
getZonePerId in interface TaxMgrIfzoneId -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public java.math.BigDecimal getStoreTaxRate(int taxClassId)
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
KKException
TaxMgrIf
getStoreTaxRate in interface TaxMgrIftaxClassId -
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException
public java.math.BigDecimal getTaxRate(int countryId,
int zoneId,
int taxClassId)
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
KKException
getTaxRate in interface TaxMgrIfcountryId - zoneId - taxClassId -
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException
public TaxRate[] getTaxRateObjects(int countryId,
int zoneId,
int taxClassId)
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
KKException
getTaxRateObjects in interface TaxMgrIfcountryId - zoneId - taxClassId -
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException
public java.math.BigDecimal getTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
getTax in interface TaxMgrIfcost - countryId - zoneId - taxClassId -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.math.BigDecimal getTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId,
int quantity)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
getTax in interface TaxMgrIfcost - countryId - zoneId - taxClassId - quantity -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.math.BigDecimal getStoreTax(java.math.BigDecimal cost,
int taxClassId)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
getStoreTax in interface TaxMgrIfcost - taxClassId -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.math.BigDecimal getStoreTax(java.math.BigDecimal cost,
int taxClassId,
int quantity)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
getStoreTax in interface TaxMgrIfcost - taxClassId - quantity -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.math.BigDecimal addTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
addTax in interface TaxMgrIfcost - countryId - zoneId - taxClassId -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.math.BigDecimal addTax(java.math.BigDecimal cost,
int countryId,
int zoneId,
int taxClassId,
int quantity)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
addTax in interface TaxMgrIfcost - countryId - zoneId - taxClassId -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.math.BigDecimal addStoreTax(java.math.BigDecimal cost,
int taxClassId)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
addStoreTax in interface TaxMgrIfcost - taxClassId -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.math.BigDecimal addStoreTax(java.math.BigDecimal cost,
int taxClassId,
int quantity)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
addStoreTax in interface TaxMgrIfcost - taxClassId - quantity -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public GeoZone[] getGeoZonesPerZone(ZoneIf zone)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
getGeoZonesPerZone in interface TaxMgrIfzone -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public Country[] getAllCountries()
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
KKException
TaxMgrIf
getAllCountries in interface TaxMgrIfcom.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException
public Country getCountryPerName(java.lang.String countryName)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
getCountryPerName in interface TaxMgrIfcountryName -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public Country getCountryPerId(int countryId)
throws KKException,
org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
getCountryPerId in interface TaxMgrIfcountryId -
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public int getTaxQuantityRule()
throws KKException
getTaxQuantityRule in interface TaxMgrIfKKException
public int getTaxScale()
throws KKException
getTaxScale in interface TaxMgrIfKKExceptionprotected void setZoneCriteriaWithStandardAttributes(org.apache.torque.util.Criteria c)
c -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||