com.ibm.commerce.price.beans
Class FormattedMonetaryAmountDataBean

java.lang.Object
  |
  +--MonetaryAmountDataBean
        |
        +--com.ibm.commerce.price.beans.FormattedMonetaryAmountDataBean
Direct Known Subclasses:
PriceDataBean

public class FormattedMonetaryAmountDataBean
extends MonetaryAmountDataBean

A formatter bean used to format monetary amounts.

See Also:
Serialized Form

Constructor Summary
FormattedMonetaryAmountDataBean()
          Formatted monetary amount data bean default constructor.
FormattedMonetaryAmountDataBean(com.ibm.commerce.price.utils.MonetaryAmount aMonetaryAmount, StoreAccessBean aStoreAccessBean, java.lang.Integer aLangId)
          Formatted monetary amount data bean constructor.
 
Method Summary
 java.math.BigDecimal getAmount()
          Get the amount to be formatted.
  CommandContext getCommandContext()
          Get the command context.
 java.lang.String getCurrency()
          Get the currency of the monetary amount.
  TypedProperty getRequestProperties()
          Get request properties.
 void populate()
          Create the formatted monetary amount.
 void setAmount(java.math.BigDecimal newAmount)
          Set the value of the monetary amount.
 void setCommandContext( CommandContext commandContext)
          Set the command context.
 void setCurrency(java.lang.String newCurrency)
          Set the monetary currency.
 void setRequestProperties( TypedProperty param)
          Set request properties (not implemented).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormattedMonetaryAmountDataBean

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

FormattedMonetaryAmountDataBean

public FormattedMonetaryAmountDataBean(com.ibm.commerce.price.utils.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.
Method Detail

getAmount

public java.math.BigDecimal getAmount()
Get the amount to be formatted.
Returns:
the amount.

getCommandContext

public CommandContext getCommandContext()
Get the command context.
Returns:
the command context.

getCurrency

public java.lang.String getCurrency()
Get the currency of the monetary amount.
Returns:
the currency.

getRequestProperties

public TypedProperty getRequestProperties()
Get request properties.
Returns:
null.

populate

public void populate()
              throws java.lang.Exception
Create the formatted monetary amount.
Throws:
java.lang.Exception

setAmount

public void setAmount(java.math.BigDecimal newAmount)
Set the value of the monetary amount. If this method is not called, zero is assumed.
Parameters:
newAmount - monetary value.

setCommandContext

public void setCommandContext(CommandContext commandContext)
Set the command context.
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.
Parameters:
newCurrency - monetary currency.

setRequestProperties

public void setRequestProperties(TypedProperty param)
                          throws java.lang.Exception
Set request properties (not implemented).
Parameters:
param - com.ibm.commerce.datatype.TypedProperty
Throws:
java.lang.Exception