com.konakartadmin.blif
Interface AdminTaxMgrIf

All Known Implementing Classes:
AdminTaxMgr

public interface AdminTaxMgrIf

AdminTaxMgrIf


Method Summary
 int deleteCountry(int id)
          Delete a Country
 int deleteGeoZone(int id)
          Delete a Tax Area - and all it's mappings
 int deleteSubZone(int id)
          Delete a Zone
 int deleteTaxClass(int id)
          Delete a TaxClass
 int deleteTaxRate(int id)
          Delete a TaxRate
 int deleteZone(int id)
          Delete a Zone
 boolean doesCountryExist(int id)
          Checks to see whether a country already exists with this id
 boolean doesGeoZoneExist(int id)
          Return true if the zone exists.
 boolean doesSubZoneExist(int id)
          Return true if the zone exists.
 boolean doesTaxClassExist(int taxClassId)
          Return true if the tax class exists.
 boolean doesTaxRateExist(int id)
          Return true if the zone exists.
 boolean doesZoneExist(int id)
          Return true if the zone exists.
 AdminCountry[] getAllCountriesFull()
          Returns an array of fully populated countries.
 AdminGeoZone[] getAllGeoZones()
          Get an array of AdminGeoZones from the DB.
 AdminTaxClass[] getAllTaxClassesFull()
          Returns an array of all tax class objects.
 AdminTaxRateSearchResult getAllTaxRates()
          This returns an AdminTaxRateSearchResult object.
 int getAllTaxRatesCount()
          Returns a count of the number of TaxRates
 AdminCountrySearchResult getCountries(AdminCountrySearch search, int offset, int size)
          This returns an AdminCountrySearchResult object.
 int getCountriesCount(AdminCountrySearch search)
          Returns a count of the number of Countries
 AdminCountry getCountryById(int countryId)
          Returns the country object for the country id, or Null if the country doesn't exist in the DB.
 AdminCountry getCountryByName(java.lang.String countryName)
          Returns the country object for the country name, or Null if the country doesn't exist in the DB.
 AdminGeoZoneSearchResult getGeoZones(AdminGeoZoneSearch search, int offset, int size)
          This returns an AdminGeoZoneSearchResult object.
 int getGeoZonesCount(AdminGeoZoneSearch search)
          Returns a count of the number of Zones with the specified search criteria
 AdminSubZoneSearchResult getSubZones(AdminSubZoneSearch search, int offset, int size)
          This returns an AdminSubZoneSearchResult object.
 int getSubZonesCount(AdminSubZoneSearch search)
          Returns a count of the number of Zones with the specified search criteria
 AdminTaxClassSearchResult getTaxClasses(AdminTaxClassSearch search)
          This returns an AdminTaxClassSearchResult object.
 int getTaxQuantityRule()
          Returns the rule used to calculate tax for products with multiple quantities.
 AdminTaxRateSearchResult getTaxRates(AdminTaxRateSearch search, int offset, int size)
          This returns an AdminTaxRateSearchResult object.
 int getTaxRatesCount(AdminTaxRateSearch search)
          Returns a count of the number of TaxRates with the specified search criteria
 int getTaxScale()
          Returns the precision use for calculating tax that matches the ADMIN_CURRENCY_DECIMAL_PLACES configuration variable.
 AdminZone 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.
 AdminZone getZonePerId(int zoneId)
          Returns the zone if it exists, otherwise null
 AdminZoneSearchResult getZones(AdminZoneSearch search, int offset, int size)
          This returns an AdminZoneSearchResult object.
 AdminZone[] getZonesById(int countryId)
          Returns an array of AdminZones in the specified country - fully-populated
 int getZonesCount(AdminZoneSearch search)
          Returns a count of the number of Zones with the specified search criteria
 int insertCountry(AdminCountry country)
          Insert an AdminCountry object
 int insertGeoZone(AdminGeoZone insertObj)
          Insert an AdminGeoZone object
 int insertSubZone(AdminSubZone insertObj)
          Insert an AdminSubZone object
 int insertTaxClass(AdminTaxClass taxClass)
          Insert an AdminTaxClass object
 int insertTaxRate(AdminTaxRate insertObj)
          Insert an AdminTaxRate object
 int insertZone(AdminZone insertObj)
          Insert an AdminZone object
 void refreshConfigs()
          Refresh the configuration of the Admin Currency Manager
 int updateCountry(AdminCountry country)
          Update an AdminCountry object
 int updateGeoZone(AdminGeoZone updateObj)
          Update an AdminGeoZone object
 int updateSubZone(AdminSubZone updateObj)
          Update an AdminSubZone object
 int updateTaxClass(AdminTaxClass taxClass)
          Update an AdminTaxClass object
 int updateTaxRate(AdminTaxRate updateObj)
          Update an AdminTaxRate object
 int updateZone(AdminZone updateObj)
          Update an AdminZone object
 

Method Detail

getAllCountriesFull

AdminCountry[] getAllCountriesFull()
                                   throws com.workingdogs.village.DataSetException,
                                          org.apache.torque.TorqueException,
                                          KKAdminException
Returns an array of fully populated countries.

Returns:
Returns an array of countries - fully-populated
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

getCountryByName

AdminCountry getCountryByName(java.lang.String countryName)
                              throws KKAdminException,
                                     org.apache.torque.TorqueException,
                                     com.workingdogs.village.DataSetException
Returns the country object for the country name, or Null if the country doesn't exist in the DB. If there is more than one country with the same name, we return the first one that we find.

Parameters:
countryName -
Returns:
Returns a country object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCountryById

AdminCountry getCountryById(int countryId)
                            throws KKAdminException,
                                   org.apache.torque.TorqueException,
                                   com.workingdogs.village.DataSetException
Returns the country object for the country id, or Null if the country doesn't exist in the DB.

Parameters:
countryId -
Returns:
Returns a country object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getAllTaxClassesFull

AdminTaxClass[] getAllTaxClassesFull()
                                     throws com.workingdogs.village.DataSetException,
                                            org.apache.torque.TorqueException,
                                            KKAdminException
Returns an array of all tax class objects.

Returns:
Returns an array of TaxClasses
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

getTaxClasses

AdminTaxClassSearchResult getTaxClasses(AdminTaxClassSearch search)
                                        throws KKAdminException
This returns an AdminTaxClassSearchResult object.

Parameters:
search -
Returns:
Returns an AdminTaxClassSearchResult object
Throws:
KKAdminException

deleteTaxClass

int deleteTaxClass(int id)
                   throws KKAdminException
Delete a TaxClass

Parameters:
id - A TaxClass id
Returns:
returns the id of the deleted TaxClass
Throws:
KKAdminException

insertTaxClass

int insertTaxClass(AdminTaxClass taxClass)
                   throws KKAdminException
Insert an AdminTaxClass object

Parameters:
taxClass - An AdminTaxClass object
Returns:
returns the id of the inserted AdminTaxClass object
Throws:
KKAdminException

updateTaxClass

int updateTaxClass(AdminTaxClass taxClass)
                   throws KKAdminException
Update an AdminTaxClass object

Parameters:
taxClass - An AdminTaxClass object
Returns:
returns the id of the updated AdminTaxClass object
Throws:
KKAdminException

doesTaxClassExist

boolean doesTaxClassExist(int taxClassId)
                          throws org.apache.torque.TorqueException,
                                 KKAdminException
Return true if the tax class exists.

Parameters:
taxClassId -
Returns:
True if the category exists
Throws:
org.apache.torque.TorqueException
KKAdminException

getZonesById

AdminZone[] getZonesById(int countryId)
                         throws com.workingdogs.village.DataSetException,
                                org.apache.torque.TorqueException,
                                KKAdminException
Returns an array of AdminZones in the specified country - fully-populated

Parameters:
countryId -
Returns:
Returns an array of AdminZones in the specified country - fully-populated
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

getZonePerCountryAndCode

AdminZone getZonePerCountryAndCode(int countryId,
                                   java.lang.String zoneDesc)
                                   throws org.apache.torque.TorqueException,
                                          com.workingdogs.village.DataSetException,
                                          KKAdminException
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. An example of this would be to compare the state of an address with FL or Florida.

Parameters:
countryId -
zoneDesc -
Returns:
the zoneif it exists, otherwise null
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getZonePerId

AdminZone getZonePerId(int zoneId)
                       throws org.apache.torque.TorqueException,
                              com.workingdogs.village.DataSetException,
                              KKAdminException
Returns the zone if it exists, otherwise null

Parameters:
zoneId -
Returns:
the zone if it exists, otherwise null
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getZones

AdminZoneSearchResult getZones(AdminZoneSearch search,
                               int offset,
                               int size)
                               throws KKAdminException
This returns an AdminZoneSearchResult object.

Parameters:
search - the definition of the search - can be null
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminZoneSearchResult object
Throws:
KKAdminException

deleteZone

int deleteZone(int id)
               throws KKAdminException
Delete a Zone

Parameters:
id - A Zone id
Returns:
returns the id of the deleted Zone
Throws:
KKAdminException

insertZone

int insertZone(AdminZone insertObj)
               throws KKAdminException
Insert an AdminZone object

Parameters:
insertObj - An AdminZone object
Returns:
returns the id of the inserted AdminZone object
Throws:
KKAdminException

updateZone

int updateZone(AdminZone updateObj)
               throws KKAdminException
Update an AdminZone object

Parameters:
updateObj - An AdminZone object
Returns:
returns the id of the updated AdminZone object
Throws:
KKAdminException

doesZoneExist

boolean doesZoneExist(int id)
                      throws org.apache.torque.TorqueException,
                             KKAdminException
Return true if the zone exists.

Parameters:
id - zone id
Returns:
True if the zone exists
Throws:
org.apache.torque.TorqueException
KKAdminException

getZonesCount

int getZonesCount(AdminZoneSearch search)
                  throws org.apache.torque.TorqueException,
                         com.workingdogs.village.DataSetException,
                         KKAdminException
Returns a count of the number of Zones with the specified search criteria

Parameters:
search - Search criteria
Returns:
A count of the number of Zones with the specified search criteria
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getAllGeoZones

AdminGeoZone[] getAllGeoZones()
                              throws java.lang.Exception
Get an array of AdminGeoZones from the DB. Always append the "--none--" geo zone as the first element in the array.

Returns:
Returns an array of AdminGeoZones - fully-populated
Throws:
java.lang.Exception

getGeoZones

AdminGeoZoneSearchResult getGeoZones(AdminGeoZoneSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
This returns an AdminGeoZoneSearchResult object.

Parameters:
search - the definition of the search - can be null
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminGeoZoneSearchResult object
Throws:
KKAdminException

deleteGeoZone

int deleteGeoZone(int id)
                  throws KKAdminException
Delete a Tax Area - and all it's mappings

Parameters:
id - A Tax Area id
Returns:
returns the id of the deleted Tax Area
Throws:
KKAdminException

insertGeoZone

int insertGeoZone(AdminGeoZone insertObj)
                  throws KKAdminException
Insert an AdminGeoZone object

Parameters:
insertObj - An AdminGeoZone object
Returns:
returns the id of the inserted AdminGeoZone object
Throws:
KKAdminException

updateGeoZone

int updateGeoZone(AdminGeoZone updateObj)
                  throws KKAdminException
Update an AdminGeoZone object

Parameters:
updateObj - An AdminGeoZone object
Returns:
returns the id of the updated AdminGeoZone object
Throws:
KKAdminException

doesGeoZoneExist

boolean doesGeoZoneExist(int id)
                         throws org.apache.torque.TorqueException,
                                KKAdminException
Return true if the zone exists.

Parameters:
id - zone id
Returns:
True if the zone exists
Throws:
org.apache.torque.TorqueException
KKAdminException

getGeoZonesCount

int getGeoZonesCount(AdminGeoZoneSearch search)
                     throws org.apache.torque.TorqueException,
                            com.workingdogs.village.DataSetException,
                            KKAdminException
Returns a count of the number of Zones with the specified search criteria

Parameters:
search - Search criteria
Returns:
A count of the number of Zones with the specified search criteria
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getSubZones

AdminSubZoneSearchResult getSubZones(AdminSubZoneSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
This returns an AdminSubZoneSearchResult object.

Parameters:
search - the definition of the search - can be null
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminSubZoneSearchResult object
Throws:
KKAdminException

deleteSubZone

int deleteSubZone(int id)
                  throws KKAdminException
Delete a Zone

Parameters:
id - A Zone id
Returns:
returns the id of the deleted Zone
Throws:
KKAdminException

insertSubZone

int insertSubZone(AdminSubZone insertObj)
                  throws KKAdminException
Insert an AdminSubZone object

Parameters:
insertObj - An AdminSubZone object
Returns:
returns the id of the inserted AdminSubZone object
Throws:
KKAdminException

updateSubZone

int updateSubZone(AdminSubZone updateObj)
                  throws KKAdminException
Update an AdminSubZone object

Parameters:
updateObj - An AdminSubZone object
Returns:
returns the id of the updated AdminSubZone object
Throws:
KKAdminException

doesSubZoneExist

boolean doesSubZoneExist(int id)
                         throws org.apache.torque.TorqueException,
                                KKAdminException
Return true if the zone exists.

Parameters:
id - zone id
Returns:
True if the zone exists
Throws:
org.apache.torque.TorqueException
KKAdminException

getSubZonesCount

int getSubZonesCount(AdminSubZoneSearch search)
                     throws org.apache.torque.TorqueException,
                            com.workingdogs.village.DataSetException,
                            KKAdminException
Returns a count of the number of Zones with the specified search criteria

Parameters:
search - Search criteria
Returns:
A count of the number of Zones with the specified search criteria
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getCountriesCount

int getCountriesCount(AdminCountrySearch search)
                      throws org.apache.torque.TorqueException,
                             com.workingdogs.village.DataSetException,
                             KKAdminException
Returns a count of the number of Countries

Parameters:
search - Search criteria
Returns:
A count of the number of Countries
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getCountries

AdminCountrySearchResult getCountries(AdminCountrySearch search,
                                      int offset,
                                      int size)
                                      throws KKAdminException
This returns an AdminCountrySearchResult object.

Parameters:
search -
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminCountrySearchResult object
Throws:
KKAdminException

deleteCountry

int deleteCountry(int id)
                  throws KKAdminException
Delete a Country

Parameters:
id - A Country id
Returns:
returns the id of the deleted Country
Throws:
KKAdminException

insertCountry

int insertCountry(AdminCountry country)
                  throws KKAdminException
Insert an AdminCountry object

Parameters:
country - An AdminCountry object
Returns:
returns the id of the inserted AdminCountry object
Throws:
KKAdminException

updateCountry

int updateCountry(AdminCountry country)
                  throws KKAdminException
Update an AdminCountry object

Parameters:
country - An AdminCountry object
Returns:
returns the id of the updated AdminCountry object
Throws:
KKAdminException

doesCountryExist

boolean doesCountryExist(int id)
                         throws org.apache.torque.TorqueException,
                                KKAdminException
Checks to see whether a country already exists with this id

Parameters:
id - the country Id
Returns:
Returns true if the country already exists
Throws:
org.apache.torque.TorqueException
KKAdminException

getAllTaxRates

AdminTaxRateSearchResult getAllTaxRates()
                                        throws KKAdminException
This returns an AdminTaxRateSearchResult object.

Returns:
Returns an AdminTaxRateSearchResult object
Throws:
KKAdminException

getTaxRates

AdminTaxRateSearchResult getTaxRates(AdminTaxRateSearch search,
                                     int offset,
                                     int size)
                                     throws KKAdminException
This returns an AdminTaxRateSearchResult object.

Parameters:
search - the definition of the search - can be null
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminTaxRateSearchResult object
Throws:
KKAdminException

deleteTaxRate

int deleteTaxRate(int id)
                  throws KKAdminException
Delete a TaxRate

Parameters:
id - A TaxRate id
Returns:
returns the id of the deleted TaxRate
Throws:
KKAdminException

insertTaxRate

int insertTaxRate(AdminTaxRate insertObj)
                  throws KKAdminException
Insert an AdminTaxRate object

Parameters:
insertObj - An AdminTaxRate object
Returns:
returns the id of the inserted AdminTaxRate object
Throws:
KKAdminException

updateTaxRate

int updateTaxRate(AdminTaxRate updateObj)
                  throws KKAdminException
Update an AdminTaxRate object

Parameters:
updateObj - An AdminTaxRate object
Returns:
returns the id of the updated AdminTaxRate object
Throws:
KKAdminException

doesTaxRateExist

boolean doesTaxRateExist(int id)
                         throws org.apache.torque.TorqueException,
                                KKAdminException
Return true if the zone exists.

Parameters:
id - zone id
Returns:
True if the zone exists
Throws:
org.apache.torque.TorqueException
KKAdminException

getTaxRatesCount

int getTaxRatesCount(AdminTaxRateSearch search)
                     throws org.apache.torque.TorqueException,
                            com.workingdogs.village.DataSetException,
                            KKAdminException
Returns a count of the number of TaxRates with the specified search criteria

Parameters:
search - Search criteria
Returns:
A count of the number of TaxRates with the specified search criteria
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getAllTaxRatesCount

int getAllTaxRatesCount()
                        throws org.apache.torque.TorqueException,
                               com.workingdogs.village.DataSetException,
                               KKAdminException
Returns a count of the number of TaxRates

Returns:
A count of the number of TaxRates
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

refreshConfigs

void refreshConfigs()
                    throws java.lang.Exception
Refresh the configuration of the Admin Currency Manager

Throws:
java.lang.Exception

getTaxQuantityRule

int getTaxQuantityRule()
                       throws KKAdminException
Returns the rule used to calculate tax for products with multiple quantities. The supported rules are:
    • TaxUtils.TAX_PER_ITEM : The tax is calculated for a single item, to the number of decimal places defined by scale. Then this value is multiplied by the quantity.
      TaxUtils.TAX_ON_TOTAL : The tax is calculated for the total amount (single item cost x quantity).
  • Returns:
    the taxQuantityRule
    Throws:
    KKAdminException

    getTaxScale

    int getTaxScale()
                    throws KKAdminException
    Returns the precision use for calculating tax that matches the ADMIN_CURRENCY_DECIMAL_PLACES configuration variable.

    Returns:
    the taxScale
    Throws:
    KKAdminException


    Copyright © 2011 DS Data Systems UK Ltd.