com.ibm.commerce.price.beans

Class FormattedMonetaryAmountDataBean

    • Constructor Detail

      • FormattedMonetaryAmountDataBean

        public FormattedMonetaryAmountDataBean()
        Formatted monetary amount data bean default constructor.
      • FormattedMonetaryAmountDataBean

        public FormattedMonetaryAmountDataBean(MonetaryAmount aMonetaryAmount,
                                               com.ibm.commerce.common.objects.StoreAccessBean aStoreAccessBean,
                                               java.lang.Integer aLangId)
        Formatted monetary amount data bean constructor.
        Parameters:
        aMonetaryAmount - monetary amount to format.
        aStoreAccessBean - store under which the formatting is to occur.
        aLangId - language Id under which the formatting is to occur.
    • Method Detail

      • getCommandContext

        public com.ibm.commerce.command.CommandContext getCommandContext()
        Gets the command context.
        Specified by:
        getCommandContext in interface com.ibm.commerce.beans.SmartDataBean
        Returns:
        the command context.
      • getRequestProperties

        public com.ibm.commerce.datatype.TypedProperty getRequestProperties()
        Gets request properties.
        Specified by:
        getRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Returns:
        null.
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to create the formatted monetary amount. Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Throws:
        java.lang.Exception
      • setAmount

        public void setAmount(java.math.BigDecimal newAmount)
        Sets the value of the monetary amount. If this method is not called, zero is assumed.
        Specified by:
        setAmount in interface FormattedMonetaryAmountInputDataBean
        Parameters:
        newAmount - monetary value.
      • setCommandContext

        public void setCommandContext(com.ibm.commerce.command.CommandContext commandContext)
        Sets the command context.
        Specified by:
        setCommandContext in interface com.ibm.commerce.beans.SmartDataBean
        Parameters:
        commandContext - the command context.
      • setCurrency

        public void setCurrency(java.lang.String newCurrency)
        Sets the monetary currency. If this method is not called then the currency is retrieved from the command context.
        Specified by:
        setCurrency in interface FormattedMonetaryAmountInputDataBean
        Parameters:
        newCurrency - monetary currency.
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
                                  throws java.lang.Exception
        Sets request properties (not implemented).
        Specified by:
        setRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Parameters:
        param - com.ibm.commerce.datatype.TypedProperty
        Throws:
        java.lang.Exception