|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.integrations.taxware.SalesTaxCaller
public class SalesTaxCaller
SalesTaxCaller provides a higher level interface to TaxWare's sales calculation software. Since the shared library may not be re-entrant, synchronize a number of the methods here just to be safe.
Each TaxWare request is made up of an InputHeader and some number of individual records. This interface sends one request at a time.
Each TaxWare response is made up of an OutputHeader and some number of individual records (should be equal to the number of individual input records). The only function one should need to call directly is CalculateTax.
TaxRequest
,
TaxResult
Nested Class Summary | |
---|---|
protected static class |
SalesTaxCaller.InputHeaderRecordDef
|
protected static class |
SalesTaxCaller.OutputHeader
Output header |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
CLOSE_PROCESS_IND
TaxWare Close process indicator value |
protected static boolean |
m_bOpen
Whether TaxWare's files are open or not. |
protected static atg.integrations.taxware.SalesTaxCaller.InputHeader |
m_inputHeader
Input header re-used for each request. |
protected static java.lang.reflect.Method |
m_methodCalculateTax
Method for calculating tax. |
protected static java.lang.Object[] |
m_rgobjArgs
Argument array. |
protected static java.lang.StringBuffer |
m_strbufInput
StringBuffer re-used for each request. |
static java.lang.String |
OPEN_PROCESS_IND
TaxWare Open process indicator value |
Constructor Summary | |
---|---|
SalesTaxCaller()
|
Method Summary | |
---|---|
static TaxResult[] |
calculateTax(TaxRequest[] request)
Calculate the SalesTax (and a myriad of additiona tax information when given a TaxRequest object). |
static TaxResult[] |
calculateTax(TaxRequest[] request,
java.util.Set pNonFatalCompCodes)
|
protected static SalesTaxCaller.OutputHeader |
calculateTaxInternal(TaxRequest[] request,
java.lang.StringBuffer strbuf)
Does all the stuff for calculating tax that needs to be synchronized. |
protected static SalesTaxCaller.OutputHeader |
callCalculate(java.lang.String stringRequest,
java.lang.StringBuffer strbuf,
java.lang.StringBuffer intobj,
boolean vzip)
Do the dynamic call into the taxcommon class. |
static void |
closeTaxWare()
Close down taxware. |
protected static java.lang.StringBuffer |
createBuffer(int header,
int record,
int cRequests)
Create the InputString buffer |
protected static void |
createInputHeader()
Create our input header. |
protected static void |
createInputStringBuffer(int cRequests)
Create our static input string buffer to hold the input header + individual records. |
protected static double |
getTotalTaxAmount(TaxResult taxresult)
|
static void |
main(java.lang.String[] args)
Run some simple tests |
protected static void |
openOrCloseTaxWare(boolean bOpen)
Called to open or close taxware. |
static void |
openTaxWare()
Open taxware. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static java.lang.StringBuffer m_strbufInput
protected static atg.integrations.taxware.SalesTaxCaller.InputHeader m_inputHeader
protected static boolean m_bOpen
protected static java.lang.reflect.Method m_methodCalculateTax
protected static java.lang.Object[] m_rgobjArgs
public static java.lang.String OPEN_PROCESS_IND
public static java.lang.String CLOSE_PROCESS_IND
Constructor Detail |
---|
public SalesTaxCaller()
Method Detail |
---|
protected static void createInputStringBuffer(int cRequests)
protected static java.lang.StringBuffer createBuffer(int header, int record, int cRequests)
protected static void createInputHeader()
protected static void openOrCloseTaxWare(boolean bOpen) throws TaxwareCriticalException, TaxwareMinorException
TaxwareCriticalException
- Thrown if installation problem.
TaxwareMinorException
- Thrown if error returned from TaxWare.SalesTaxService
public static void closeTaxWare() throws TaxwareCriticalException, TaxwareMinorException
TaxwareCriticalException
- Thrown if installation problem.
TaxwareMinorException
- Thrown if error returned from TaxWare.public static void openTaxWare() throws TaxwareCriticalException, TaxwareMinorException
TaxwareCriticalException
- Thrown if installation problem.
TaxwareMinorException
- Thrown if error returned from TaxWare.SalesTaxService
protected static SalesTaxCaller.OutputHeader callCalculate(java.lang.String stringRequest, java.lang.StringBuffer strbuf, java.lang.StringBuffer intobj, boolean vzip) throws TaxwareCriticalException, TaxwareMinorException
TaxwareMinorException
- Thrown if installation problem.
TaxwareCriticalException
- Thrown if error returned from TaxWare.protected static SalesTaxCaller.OutputHeader calculateTaxInternal(TaxRequest[] request, java.lang.StringBuffer strbuf) throws TaxwareMinorException, TaxwareCriticalException
TaxwareCriticalException
- Thrown if installation problem.
TaxwareMinorException
- Thrown if error returned from TaxWare.public static TaxResult[] calculateTax(TaxRequest[] request) throws TaxwareMinorException, TaxwareCriticalException
request
- a TaxRequest object
TaxwareCriticalException
- Thrown if installation problem.
TaxwareMinorException
- Thrown if error returned from TaxWare.public static TaxResult[] calculateTax(TaxRequest[] request, java.util.Set pNonFatalCompCodes) throws TaxwareMinorException, TaxwareCriticalException
TaxwareMinorException
TaxwareCriticalException
protected static double getTotalTaxAmount(TaxResult taxresult)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |