Reference > IBM Sales Center extension points


Currency format extension point

This extension point is to allow the globalization plug-in to implement locale-specific currency formatting.


Identifier:

com.ibm.commerce.telesales.g11n.currencyFormat


Description:

This extension point is to allow the globalization plug-in to implement locale-specific currency formatting.


Configuration Markup:

<!ELEMENT extension ( currencyFormatter , currencyFormat+)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

<!ELEMENT currencyFormatter EMPTY>

<!ATTLIST currencyFormatter

id CDATA #IMPLIED

class CDATA #REQUIRED>

Currency formatter class definition.

<!ELEMENT currencyFormat ( currency)>

<!ATTLIST currencyFormat

id CDATA #REQUIRED>

A currency code specific currency format definition.

<!ELEMENT currency ( currencyLine)>

<!ELEMENT currencyLine EMPTY>

<!ATTLIST currencyLine

currencySymbol CDATA #REQUIRED

currencyCode CDATA #IMPLIED

description CDATA #IMPLIED

currencyPrefixPositive CDATA #IMPLIED

currencyPrefixNegative CDATA #IMPLIED

currencySuffixPositive CDATA #IMPLIED

currencySuffixNegative CDATA #IMPLIED

decimalPlaces CDATA #IMPLIED

displayLocale CDATA #IMPLIED

radixPoint CDATA #IMPLIED

groupingChar CDATA #IMPLIED

numberPattern CDATA #IMPLIED

roundingMultiple CDATA #IMPLIED

numberUsgId CDATA #IMPLIED

roundingMethod CDATA #IMPLIED

minApproveAmount CDATA #IMPLIED

customizedCurrencyString CDATA #IMPLIED>

A Currency line definition.


Examples:

<extension
point="com.ibm.commerce.telesales.g11n.currencyFormat">  
 
<currencyFormatter 
class="com.ibm.commerce.telesales.g11n.CurrencyFormatter"/>
<!-- currency formatter for INR -->  
<currencyFormat
id="com.ibm.commerce.telesales.g11n.currencyFormat.INR">   
<currency>    
<currencyLine
     currencyCode="INR"
     currencyPrefixPositive="RS"
     currencyPrefixNegative="-RS"
     currencySymbol="RS"
     description="Indian Rupees"
     numberPattern = "#,##0.00"
     roundingMultiple ="1"
     roundingMethod = "R"
     decimalPlaces = "2"/>   
</currency>  
</currencyFormat>   
<!-- currency formatter for CNY -->  
<currencyFormat
id="com.ibm.commerce.telesales.g11n.currencyFormat.CNY">   
<currency>    
<currencyLine
     currencyCode="CNY"
     currencyPreffixPositive="CNY"
     currencyPrefixNegative="-CNY"
     currencySymbol="CNY"
     description="Chinese Yuan"
     numberPattern = "#,##0.00"  
     roundingMultiple ="1"
     roundingMethod = "R"
     decimalPlaces = "2"/>   
</currency>  
</currencyFormat> 
</extension>


API Information:

This extension point allows customization of the way the currency format is displayed. One can specify a currencyFormatter class name using the attribute class of the element currencyFormatter. If defined, this class" formatCurrency method will be invoked by the globalization class. The globalization class also will set the currency format corresponding to the customer"s selected currency if it is defined in the extension point. For more details, see the example in the Examples section.


Supplied Implementation:

The IBM Sales Center globalization plugin includes a "DefaultCurrencyFomatter" class which formats the currency using "java.text.NumberFormat.getCurrencyInstance(Locale.getDefault)"


+

Search Tips   |   Advanced Search