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

      Fields 
      Modifier and Type Field and Description
      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 zero field of integer
      static java.lang.Long LONG_ZERO
      The long zero field
      static java.lang.Object NULL
      The null field
      static int SALES_TAX
      The Sales Tax field 0
      static int SHIPPING_AND_SALES_TAX
      The Old style tax - Shipping and Sales Tax field 2
      static int SHIPPING_TAX
      The Shipping Tax field 1
    • Constructor Summary

      Constructors 
      Constructor and Description
      TIKHelper()
      PriceCalculationHelper constructor comment.
    • 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 zero field of integer
      • LONG_ZERO

        public static final java.lang.Long LONG_ZERO
        The long zero field
      • SHIPPING_TAX

        public static final int SHIPPING_TAX
        The Shipping Tax field 1
        See Also:
        Constant Field Values
      • SHIPPING_AND_SALES_TAX

        public static final int SHIPPING_AND_SALES_TAX
        The Old style tax - Shipping and Sales Tax field 2
        See Also:
        Constant Field Values
    • 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