© 2001 BEA Systems, Inc.

com.beasys.commerce.ebusiness.tax
Interface TaxCalculator

All Superinterfaces:
BusinessSmartComponent, java.io.Serializable, Session

public interface TaxCalculator
extends Session

A generic Tax Calculator. Implementations for different tax packages should subclass this class

See Also:
TaxCalculatorHome, TaxCalculatorImpl

Method Summary
 TaxResult calculateTax(TaxParameters params, TaxLineList lines)
          Calculate tax based on the parameters given.
 Price calculateTotalTax(TaxParameters params, Price total)
          This essentially creates an itemLine with no taxcode, 1 unit, and calls calculateTax with the line and parameters.
 Address[] getAlternateAddresses(Address address)
          Given an address (with the stipulation that the Zipcode/postalcode is correct) return a set of addresses that may be the correct address (city, county combinations)
 

Method Detail

calculateTax

public TaxResult calculateTax(TaxParameters params,
                              TaxLineList lines)
                       throws java.rmi.RemoteException,
                              SystemException,
                              TaxException
Calculate tax based on the parameters given. Only sales/use taxes for Canada and the US is implemented. The basic TaxCalculator requires an override percentage. If one of the additional modules are used, then additional functionality will be provided. Addresses should go through getAlternateAddresses before being passed in. Otherwise accurate tax calculation can not be performed.
Parameters:
params - TaxParameters provided for tax calculation
lines - TaxLineList provided for tax calculation
Throws:
SystemException -  
TaxException -  

getAlternateAddresses

public Address[] getAlternateAddresses(Address address)
                                throws java.rmi.RemoteException,
                                       SystemException,
                                       TaxException
Given an address (with the stipulation that the Zipcode/postalcode is correct) return a set of addresses that may be the correct address (city, county combinations)
Parameters:
address - Address which needs to be checked.
Throws:
SystemException -  

calculateTotalTax

public Price calculateTotalTax(TaxParameters params,
                               Price total)
                        throws java.rmi.RemoteException,
                               SystemException,
                               TaxException
This essentially creates an itemLine with no taxcode, 1 unit, and calls calculateTax with the line and parameters.
Parameters:
params - TaxParameters provided for tax calculation
total - Total amount on which tax is to be calculated
Throws:
TaxException -  

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved