com.ibm.commerce.isv.kit.tax
Class TIKHelper

java.lang.Object
  |
  +--com.ibm.commerce.isv.kit.tax.TIKHelper

public class TIKHelper
extends java.lang.Object

This TIKHelper Class provides utility methods for setting up the required information for tax calculation.


Field Summary
static java.math.BigDecimal BIG_DECIMAL_ZERO
          The big decimal zero field
static java.lang.Double DOUBLE_ZERO
          The double zero field
static java.lang.Integer INTEGER_ZERO
          The integer zero field
static java.lang.Long LONG_ZERO
          The long zero field
static java.lang.Object NULL
          The null field
 
Constructor Summary
TIKHelper()
          PriceCalculationHelper constructor comment.
 
Method Summary
static  TIKHelper getInstance()
          Get the instance of the helper class.
 java.util.Hashtable resolveCountryCode(java.lang.String aCountry, java.util.Enumeration aCountryEnum)
          Resolves the country code.
 java.util.Hashtable resolveStateCode(java.lang.String aState, java.util.Enumeration aStateEnum)
          Resolves the state code.
 java.util.Enumeration retrieveCountryEntry( CommandContext aCommandContext, java.lang.String aCountry)
          Retrieves the country entry based on the input.
 java.util.Enumeration retrieveCountryInfo( CommandContext aCommandContext)
          Resolves the country code information.
 java.util.Enumeration retrieveStateEntry( CommandContext aCommandContext, java.lang.String aState)
          Retrieves the state entry based on the input.
 java.util.Enumeration retrieveStateInfo( CommandContext aCommandContext, java.lang.String aCountry)
          Resolves the state code information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final java.lang.Object NULL
The null field

BIG_DECIMAL_ZERO

public static final java.math.BigDecimal BIG_DECIMAL_ZERO
The big decimal zero field

DOUBLE_ZERO

public static final java.lang.Double DOUBLE_ZERO
The double zero field

INTEGER_ZERO

public static final java.lang.Integer INTEGER_ZERO
The integer zero field

LONG_ZERO

public static final java.lang.Long LONG_ZERO
The long zero field
Constructor Detail

TIKHelper

public TIKHelper()
PriceCalculationHelper constructor comment.
Method Detail

getInstance

public static TIKHelper getInstance()
Get the instance of the helper class.
Returns:
The TIKHelper instance

resolveCountryCode

public java.util.Hashtable resolveCountryCode(java.lang.String aCountry,
                                              java.util.Enumeration aCountryEnum)
                                       throws ECException
Resolves the country code.
Parameters:
aCountry - the country name or abbreviation.
aCountryEnum - the enumeration of a list of country information.
Returns:
The country code and country name.
Throws:
ECException - Raised with message _ERR_ADM_REMOTEEXCEPTION whenever a communication related problems occured Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured

resolveStateCode

public java.util.Hashtable resolveStateCode(java.lang.String aState,
                                            java.util.Enumeration aStateEnum)
                                     throws ECException
Resolves the state code.
Parameters:
aState - the state name of abbreviation.
aStateEnum - the enumeration of a list of state information.
Returns:
The state code and state name.
Throws:
ECException - Raised with message _ERR_ADM_REMOTEEXCEPTION whenever a communication related problems occured Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured

retrieveCountryInfo

public java.util.Enumeration retrieveCountryInfo(CommandContext aCommandContext)
                                          throws ECException
Resolves the country code information.
Parameters:
aCommandContext - the command context for the language id.
Returns:
The enumeration of a list of countries.
Throws:
ECException - Raised with message _ERR_ADM_REMOTEEXCEPTION whenever a communication related problems occured Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured

retrieveStateInfo

public java.util.Enumeration retrieveStateInfo(CommandContext aCommandContext,
                                               java.lang.String aCountry)
                                        throws ECException
Resolves the state code information.
Parameters:
aCommandContext - the command context for the language id.
aCountry - the country name which the state is part of.
Returns:
The enumeration of a list of states.
Throws:
ECException - Raised with message _ERR_ADM_REMOTEEXCEPTION whenever a communication related problems occured Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured

retrieveCountryEntry

public java.util.Enumeration retrieveCountryEntry(CommandContext aCommandContext,
                                                  java.lang.String aCountry)
                                           throws ECException
Retrieves the country entry based on the input.
Parameters:
aCommandContext - the command context for the language id.
aCountry - the code or the name of the country.
Returns:
The enumeration of a list of countries.
Throws:
ECException - Raised with message _ERR_ADM_REMOTEEXCEPTION whenever a communication related problems occured Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured

retrieveStateEntry

public java.util.Enumeration retrieveStateEntry(CommandContext aCommandContext,
                                                java.lang.String aState)
                                         throws ECException
Retrieves the state entry based on the input.
Parameters:
aCommandContext - the command context for the language id.
aState - the code or the name of the state.
Returns:
The enumeration of a list of state code and country name.
Throws:
ECException - Raised with message _ERR_ADM_REMOTEEXCEPTION whenever a communication related problems occured Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured