|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.payment.avs.GenericAddressVerificationInfo atg.integrations.taxware.BillingShipping atg.integrations.taxware.VeraZipOrderImpl
public class VeraZipOrderImpl
This class exists to enable easily adding verazip support to OrderImpl. This class works with the TaxWareCalculateSalesTax order processing item.
Most of the code here attempts to implements the VeraZipable interface, mostly through an array of ZipResult objects.
Much of the other code deals with providing access functions so that it can be hooked up to a web page.
A final chunk of code attempts to set whatever can be set from the current ZipResult object.
OrderImpl
,
VeraZipable
,
ZipResult
,
ZipResultItem
,
ZipRequest
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected int[] |
mZipIndexArray
The index into the array associated with the zip result. |
protected ZipResult[] |
mZipResultArray
The zip result returned from verazip. |
Fields inherited from class atg.integrations.taxware.BillingShipping |
---|
mUseBillAddress |
Fields inherited from interface atg.integrations.taxware.VeraZipable |
---|
BILLING_ADDRESS_NAME, SHIP_TO_ADDRESS_NAME |
Constructor Summary | |
---|---|
VeraZipOrderImpl(ApplicationLogging log)
|
Method Summary | |
---|---|
java.lang.String |
getAddressNameForIndex(int index)
|
int |
getBillZipOptionChoice()
gets the index for the currently chosen billing zip option. |
int |
getBillZipOptionCount()
Returns the count of possible string options. |
java.lang.String[] |
getBillZipOptions()
Returns the string array describing the current billing zip options. |
int |
getIndexForAddressName(java.lang.String pName)
Returns the array index for the address with the given name. |
int |
getMaxCountOfZipAddresses()
Returns the maxinumber of addressed to check. |
int |
getShipToZipOptionChoice()
gets the index for the currently chosen ship-to zip option. |
int |
getShipToZipOptionCount()
|
java.lang.String[] |
getShipToZipOptions()
Returns the string array describing the current billing zip options. |
java.lang.String |
getZipErrorString()
Sets the current zip error string. |
ZipRequest |
getZipRequestForAddress(int idxAddress)
Get the request for the specified address object. |
ZipResult |
getZipResultAt(int idx)
Get the ZipResult object. |
boolean |
isZipError()
Returns true if there is currently a zip order. |
protected static boolean |
nullOrEmptyString(java.lang.String pString)
A helper function which checks to see if a string is null or empty. |
protected void |
setBillInfoFromZipResult(ZipResult pZipResult)
Attempts to set whatever information is possible from the specified zip result. |
void |
setBillZipOptionChoice(int pIndex)
Sets the index for the currently chosen zip option. |
protected void |
setShipToInfoFromZipResult(ZipResult pZipResult)
Attempts to set whatever information is possible from the specified zip result. |
void |
setShipToZipOptionChoice(int pIndex)
Sets the index for the currently chosen ship-to zip option. |
void |
setZipError(boolean pIsError)
Sets a zip error -- probably not a good idea to use. |
void |
setZipErrorString(java.lang.String pError)
Sets the current zip error string. |
void |
setZipResultAt(int idx,
ZipResult pZipResult)
Set the ZipResult object at the specified index. |
Methods inherited from class atg.integrations.taxware.BillingShipping |
---|
getBillCity, getBillCountry, getBillState, getBillZip, getShipToCity, getShipToCountry, getShipToState, getShipToZip, getUseBillAddress, setBillCity, setBillCountry, setBillState, setBillZip, setShipToCity, setShipToCountry, setShipToState, setShipToZip, setUseBillAddress |
Methods inherited from class atg.payment.avs.GenericAddressVerificationInfo |
---|
getAddress1, getAddress2, getAddressVerificationItem, getAddressVerificationItems, getPaymentId, setAddress1, setAddress2, setAddressVerificationItems, setPaymentId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected ZipResult[] mZipResultArray
protected int[] mZipIndexArray
Constructor Detail |
---|
public VeraZipOrderImpl(ApplicationLogging log)
Method Detail |
---|
public int getMaxCountOfZipAddresses()
getMaxCountOfZipAddresses
in interface VeraZipable
public int getIndexForAddressName(java.lang.String pName)
getIndexForAddressName
in interface VeraZipable
public java.lang.String getAddressNameForIndex(int index)
getAddressNameForIndex
in interface VeraZipable
protected void setShipToInfoFromZipResult(ZipResult pZipResult)
If a choice has been set, copies any non-matching info from the choice.
protected void setBillInfoFromZipResult(ZipResult pZipResult)
If a choice has been set, copies any non-matching info from the choice.
protected static boolean nullOrEmptyString(java.lang.String pString)
public void setZipResultAt(int idx, ZipResult pZipResult)
Note that we go ahead and call the setXXXXInfoFromZipResult method as well, so that defaults will be there the next time the page is rendered.
Set ZipResut always does real set, regardless of whether mUseBillAddress is set.
setZipResultAt
in interface VeraZipable
public ZipResult getZipResultAt(int idx)
getZipResultAt
in interface VeraZipable
public int getShipToZipOptionCount()
public java.lang.String[] getShipToZipOptions()
public void setShipToZipOptionChoice(int pIndex)
public int getShipToZipOptionChoice()
public int getBillZipOptionCount()
public java.lang.String[] getBillZipOptions()
public void setBillZipOptionChoice(int pIndex)
public int getBillZipOptionChoice()
public ZipRequest getZipRequestForAddress(int idxAddress)
getZipRequestForAddress
in interface VeraZipable
public void setZipErrorString(java.lang.String pError)
setZipErrorString
in interface VeraZipable
public java.lang.String getZipErrorString()
getZipErrorString
in interface VeraZipable
public void setZipError(boolean pIsError)
setZipError
in interface VeraZipable
public boolean isZipError()
isZipError
in interface VeraZipable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |