toolbox.services.util
Class CurrencyCodeServiceISO4217Impl

Package class diagram package CurrencyCodeServiceISO4217Impl
java.lang.Object
  extended by toolbox.services.BaseService
      extended by toolbox.services.util.CurrencyCodeServiceISO4217Impl
All Implemented Interfaces:
Service, CurrencyCodeService

public class CurrencyCodeServiceISO4217Impl
extends BaseService
implements CurrencyCodeService

Simple CurrencyCodeService implementation that performs mappings based on the ISO 4217 standard.

This implemementations configuration data is obtained from the ISO 4217 Wikipedia page.


Constructor Summary
CurrencyCodeServiceISO4217Impl()
          Default constructor.
 
Method Summary
 java.lang.String getCurrencyCode(java.lang.String number)
          Return the currency code for the given currecy number.
 java.lang.String getCurrencyNumber(java.lang.String code)
          Return the currency number for the given currency code.
 
Methods inherited from class toolbox.services.BaseService
create, destroy, getConfigHome, getName, getProperties, getProperty, getXMLProperties, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrencyCodeServiceISO4217Impl

public CurrencyCodeServiceISO4217Impl()
Default constructor.

Method Detail

getCurrencyNumber

public java.lang.String getCurrencyNumber(java.lang.String code)
Return the currency number for the given currency code.

Specified by:
getCurrencyNumber in interface CurrencyCodeService
Parameters:
code - String containing the currency code.
Returns:
String containing the currency number or null if the code cannot be mapped.

getCurrencyCode

public java.lang.String getCurrencyCode(java.lang.String number)
Return the currency code for the given currecy number.

Specified by:
getCurrencyCode in interface CurrencyCodeService
Parameters:
number - String containing the currency number.
Returns:
String containing the currency code or null if the number could not be mapped.