com.ibm.etill.framework.payapi
Class AliasValidationItem

java.lang.Object
  |
  +--com.ibm.etill.framework.payapi.ParameterValidationItem
        |
        +--com.ibm.etill.framework.payapi.AliasValidationItem
All Implemented Interfaces:
FrameworkReturnCodes, com.ibm.etill.framework.payapi.validation.IParameterValidator, PaymentAPIConstants

public class AliasValidationItem
extends ParameterValidationItem
implements PaymentAPIConstants

The AliasValidationItem object is used when we are aliasing protocol data. One case in which this is needed is to preserve compatibility with Payment Server 1.2 AVS keywords. Since the AVS keywords in 1.2 were limited to 17 characters, some of them are different than the keywords defined for Commerce Payments 2.1 (for example in $AVS.STREETADDR (1.2) was renamed to $AVS.STREETADDRESS (2.1). In order to support merchants operating in compatibility mode, cassette developers must support both the Payment Server 1.2 spellings and the Commerce Payments 2.1 spellings. To limit the impact to cassette developers, they simply have to define an alias to the Payment Server 1.2 spellings to the equivalent Commerce Payments 2.1 spellings in the validation table using the AliasValidationItem. The cassette then can use the 2.1 spellings in all its logic. For example: typeMapping.put(PD_AVS_STREETADDRESS, new StringValidationItem(PD_AVS_STREETADDRESS, RC_CASSETTE_AVS_STREETADDRESS, false, 1, 128, "UTF8")); typeMapping.put(PD_AVS_STREETADDR, new AliasValidationItem(PD_AVS_STREETADDR, PD_AVS_STREETADDRESS)); The cassette will use PD_AVS_STREETADDRESS in all of its other logic.

See Also:
ParameterValidationItem, ParameterTable

 
Constructor Summary
AliasValidationItem(String parameterName, String aliasKey)
          Constructor Initialize this AliasValidationItem with the name of the parameter to be validated and the parameter name (key) to be used as an index into the parameter validation Hashtable to find the appropriate ParameterValidationItem to be used.
 
Methods inherited from class com.ibm.etill.framework.payapi.ParameterValidationItem
getAliasKey, validateAndInsert, validateAndInsert, validateAndInsert
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AliasValidationItem

public AliasValidationItem(String parameterName,
                           String aliasKey)
Constructor Initialize this AliasValidationItem with the name of the parameter to be validated and the parameter name (key) to be used as an index into the parameter validation Hashtable to find the appropriate ParameterValidationItem to be used.
Parameters:
parameterName - name given to identify this parameter (e.g. PD_AVS_STREETADDR)
aliasKey - parameter name of the alias (e.g. PD_AVS_STREETADDRESS)