com.ibm.commerce.price.beans
Class FormattedMonetaryAmountDataBean
java.lang.Object
|
+--com.ibm.commerce.price.utils.UnitAmountDataBeanImpl
|
+--com.ibm.commerce.price.utils.MonetaryAmountDataBean
|
+--com.ibm.commerce.price.beans.FormattedMonetaryAmountDataBean
- All Implemented Interfaces:
- DataBean, FormattedMonetaryAmountInputDataBean, FormattedMonetaryAmountSmartDataBean, InputDataBean, java.io.Serializable, SmartDataBean
- Direct Known Subclasses:
- PriceDataBean
- public class FormattedMonetaryAmountDataBean
- extends MonetaryAmountDataBean
- implements FormattedMonetaryAmountInputDataBean, FormattedMonetaryAmountSmartDataBean
A formatter bean used to format monetary amounts.
- See Also:
- Serialized Form
Methods inherited from class com.ibm.commerce.price.utils.MonetaryAmountDataBean |
getCounterValueListPrefix, getCounterValueListSeparator, getCounterValueListSuffix, getFormattedCounterValues, getPrimaryFormattedPrice, getPrimaryPrice, isShowCounterValues, setCounterValueListPrefix, setCounterValueListSeparator, setCounterValueListSuffix, setPrimaryPrice, setShowCounterValues, toString |
Methods inherited from class com.ibm.commerce.price.utils.UnitAmountDataBeanImpl |
formatAmount, getCustomizedString, getDescription, getLangId, getNumberUsage, getPrimaryAmount, getPrimaryFormattedAmount, getStoreAccessBean, getSymbol, roundAmount, setLangId, setNumberUsage, setPrimaryAmount, setStoreAccessBean, setUnitManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FormattedMonetaryAmountDataBean
public FormattedMonetaryAmountDataBean()
- Formatted monetary amount data bean default constructor.
FormattedMonetaryAmountDataBean
public FormattedMonetaryAmountDataBean(MonetaryAmount aMonetaryAmount,
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.
getAmount
public java.math.BigDecimal getAmount()
- Get the amount to be formatted.
- Specified by:
getAmount
in interface FormattedMonetaryAmountSmartDataBean
- Returns:
- the amount.
getCommandContext
public CommandContext getCommandContext()
- Get the command context.
- Specified by:
getCommandContext
in interface SmartDataBean
- Returns:
- the command context.
getCurrency
public java.lang.String getCurrency()
- Get the currency of the monetary amount.
- Specified by:
getCurrency
in interface FormattedMonetaryAmountSmartDataBean
- Returns:
- the currency.
getRequestProperties
public TypedProperty getRequestProperties()
- Get request properties.
- Specified by:
getRequestProperties
in interface InputDataBean
- Returns:
- null.
populate
public void populate()
throws java.lang.Exception
- Create the formatted monetary amount.
- Specified by:
populate
in interface SmartDataBean
setAmount
public void setAmount(java.math.BigDecimal newAmount)
- Set 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(CommandContext commandContext)
- Set the command context.
- Specified by:
setCommandContext
in interface SmartDataBean
- Parameters:
commandContext
- the command context.
setCurrency
public void setCurrency(java.lang.String newCurrency)
- Set 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(TypedProperty param)
throws java.lang.Exception
- Set request properties (not implemented).
- Specified by:
setRequestProperties
in interface InputDataBean
- Parameters:
param
- com.ibm.commerce.datatype.TypedProperty