com.ibm.commerce.price.beans

Class CategorizedMonetaryAmountsDataBean

    • Constructor Detail

      • CategorizedMonetaryAmountsDataBean

        public CategorizedMonetaryAmountsDataBean()
        CategorizedMonetaryAmountFormatter constructor.
      • CategorizedMonetaryAmountsDataBean

        public CategorizedMonetaryAmountsDataBean(MonetaryAmount aMonetaryAmount,
                                                  com.ibm.commerce.common.objects.StoreAccessBean aStoreAccessBean,
                                                  java.lang.Integer aLangId,
                                                  java.lang.String aCategoryName)
        CategorizedMonetaryAmountFormatter constructor.
        Parameters:
        aStoreAccessBean -
        aLangId -
        aCategoryName -
        aMonetaryAmount - com.ibm.commerce.price.utils.MonetaryAmount
      • CategorizedMonetaryAmountsDataBean

        public CategorizedMonetaryAmountsDataBean(MonetaryAmount aMonetaryAmount,
                                                  com.ibm.commerce.common.objects.StoreAccessBean aStoreAccessBean,
                                                  java.lang.Integer aLangId,
                                                  java.lang.String aCategoryName,
                                                  java.util.Hashtable aDescHash,
                                                  java.util.Hashtable aAmountHash,
                                                  java.util.Hashtable aAmountDBHash)
        CategorizedMonetaryAmountFormatter constructor.
        Parameters:
        aStoreAccessBean -
        aLangId -
        aCategoryName -
        aDescHash -
        aAmountHash -
        aAmountDBHash -
        aMonetaryAmount - com.ibm.commerce.price.utils.MonetaryAmount
      • CategorizedMonetaryAmountsDataBean

        public CategorizedMonetaryAmountsDataBean(MonetaryAmount aMonetaryAmount,
                                                  com.ibm.commerce.common.objects.StoreAccessBean aStoreAccessBean,
                                                  java.lang.Integer aLangId,
                                                  java.lang.String aCategoryName,
                                                  java.util.Hashtable aDescHash,
                                                  java.util.Hashtable aAmountHash,
                                                  java.util.Hashtable aAmountDBHash,
                                                  java.util.HashMap aRateHash)
        CategorizedMonetaryAmountFormatter constructor.
        Parameters:
        aStoreAccessBean -
        aLangId -
        aCategoryName -
        aDescHash -
        aAmountHash -
        aAmountDBHash -
        aMonetaryAmount - com.ibm.commerce.price.utils.MonetaryAmount
        aRateHash -
    • Method Detail

      • getACategorizedAmountWithName

        public java.lang.String getACategorizedAmountWithName(java.lang.String aCategory)
        Returns the monetary amount and name of a particular category.
        Specified by:
        getACategorizedAmountWithName in interface CategorizedMonetaryAmountsSmartDataBean
        Parameters:
        aCategory - - the category
        Returns:
        the String representing monetary amount and the corresponding name of a particular category.
      • getACategorizedValueWithName

        public java.lang.String getACategorizedValueWithName(java.lang.String aCategory)
        Returns the monetary value and name of a particular category.
        Specified by:
        getACategorizedValueWithName in interface CategorizedMonetaryAmountsSmartDataBean
        Parameters:
        aCategory - - the category
        Returns:
        the String representing monetary value and the corresponding name of a particular category.
      • getAllCategorizedAmountsWithNames

        public java.lang.String getAllCategorizedAmountsWithNames()
        Returns all of the categorized monetary amounts and names.
        Specified by:
        getAllCategorizedAmountsWithNames in interface CategorizedMonetaryAmountsSmartDataBean
        Returns:
        the String representing all of the categorized monetary amounts and the corresponding category names.
      • getAllCategorizedAmountsWithNamesAndRates

        public java.lang.String getAllCategorizedAmountsWithNamesAndRates()
        Returns all of the categorized monetary amounts ,names and rates. Currently this method is only applicable when VAT(value-added-tax) is enabled.
        Returns:
        the String representing all of the categorized monetary amounts and the corresponding category names and category rates.
      • getAllCategorizedValuesWithNames

        public java.lang.String getAllCategorizedValuesWithNames()
        Returns all of the categorized monetary values and names.
        Specified by:
        getAllCategorizedValuesWithNames in interface CategorizedMonetaryAmountsSmartDataBean
        Returns:
        the String representing all of the categorized monetary values and the corresponding category names.
      • getAllCategorizedValuesWithNamesAndRates

        public java.lang.String getAllCategorizedValuesWithNamesAndRates()
        Returns all of the categorized monetary values , names and rates. Currently this method is only applicable when VAT(value-added-tax) is enabled.
        Returns:
        the String representing all of the categorized monetary values and the corresponding category names and tax rates.
      • getCategorizedRatesAndNames

        public java.util.HashMap getCategorizedRatesAndNames()
        Gets the categorized rates and names hashtable. Currently this method is only applicable when VAT(Value-Added-Tax) is enabled. Then VAT is not enabled, this hash table is empty.
        Returns:
        the HashMap containing the categorized descriptions and names.
      • getCategoryAmount

        public java.math.BigDecimal getCategoryAmount()
        This method gets the category monetary value. When there is only 1 tax category applied to products, this field is to keep this specific tax category's amount. When there are more than 1 tax categories applied to products, this field is to save the total amount. Users can find the tax details for each categories in hash maps provided within this data bean.
        Specified by:
        getCategoryAmount in interface CategorizedMonetaryAmountsSmartDataBean
        Returns:
        the BigDecimal containing the monetary value.
      • getCommandContext

        public com.ibm.commerce.command.CommandContext getCommandContext()
        Gets the command context.
        Returns:
        the com.ibm.commerce.command.CommandContext.
      • getRequestProperties

        public com.ibm.commerce.datatype.TypedProperty getRequestProperties()
        Gets the request properties.
        Returns:
        the com.ibm.commerce.datatype.TypedProperty containing the request properties.
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to create the hashtable that contains the categories and their corresponding monetary amounts. Loads data into the data bean when the DataBeanManager.activate() runs.
        Throws:
        java.lang.Exception
      • setCategorizedAmountsDBAndNames

        public void setCategorizedAmountsDBAndNames(java.util.Hashtable aCategorizedAmountsDB)
        Sets the categorized names and MonetaryAmountDataBean hashtable.
        Specified by:
        setCategorizedAmountsDBAndNames in interface CategorizedMonetaryAmountsInputDataBean
        Parameters:
        aCategorizedAmountsDB - the categorized amounts data bean and names hashtable.
      • setCategorizedRatesAndNames

        public void setCategorizedRatesAndNames(java.util.HashMap aCategorizedRatesAndNames)
        Sets the categorized rates and names hashtable.
        Parameters:
        aCategorizedRatesAndNames -
      • setCommandContext

        public void setCommandContext(com.ibm.commerce.command.CommandContext commandContext)
        Sets the command context.
        Parameters:
        commandContext - com.ibm.commerce.command.CommandContext.
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
                                  throws java.lang.Exception
        Sets the request properties.
        Parameters:
        param - com.ibm.commerce.datatype.TypedProperty.
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Returns all of the categorized monetary amounts or monetary values and their corresponding category names.
        Specified by:
        toString in interface CategorizedMonetaryAmountsSmartDataBean
        Overrides:
        toString in class MonetaryAmountDataBean
        Returns:
        the String representing all of the categorized monetary amounts or monetary values and their corresponding category names.