IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.gui
Class EuroConverter

java.lang.Object
  extended bycom.ibm.dse.gui.EuroConverter

public class EuroConverter
extends java.lang.Object

The EuroConverter class is a Bean that provides the functionality to convert any amount into European currency and vice versa.


Field Summary
static java.lang.String EURO_ATS
          Conversion Rate EURO to ATS.
static java.lang.String EURO_BEF
          Conversion Rate EURO to BEF.
static java.lang.String EURO_DEM
          Conversion Rate EURO to DEM.
static java.lang.String EURO_ESP
          Conversion Rate EURO to ESP.
static java.lang.String EURO_FIM
          Conversion Rate EURO to FIM.
static java.lang.String EURO_FRF
          Conversion Rate EURO to FRF.
static java.lang.String EURO_IEP
          Conversion Rate EURO to IEP.
static java.lang.String EURO_ITL
          Conversion Rate EURO to ITL.
static java.lang.String EURO_NLG
          Conversion Rate EURO to NLG.
static java.lang.String EURO_PTE
          Conversion Rate EURO to PTE.
(package private)  Hashtable fieldEuroCurrencies
           
(package private)  Hashtable fieldLabelCurrencies
           
protected  java.beans.PropertyChangeSupport propertyChange
           
 
Constructor Summary
EuroConverter()
          This constructor creates a EuroConverter object.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Generated to support the propertyChange field.
 java.lang.String convertFromEuro(java.lang.String amount, java.lang.String targetCurrencyId)
          Converts an amount in European currency into an amount in the specified currency (targetCurrencyId).
 java.lang.String convertToEuro(java.lang.String amount, java.lang.String sourceCurrencyId)
          Converts an amount in the specified currency (sourceCurrencyId) into euro currency.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Generated to support the propertyChange field.
 Hashtable getEuroCurrencies()
          Gets the euroCurrencies property (java.util.Hashtable) value.
 java.lang.String[] getEuropeanCurrencies()
          Returns all the European currency labels included in the labelCurrencies dictionary.
 java.lang.String getISOcodeFromLabel(java.lang.String label)
          Returns an ISOcode corresponding to a given currency label.
 Hashtable getLabelCurrencies()
          Gets the labelCurrencies property (java.util.Hashtable) value.
 void modifyCurrencyLabel(java.lang.String ISO_code, java.lang.String label)
          Allows modification of a value in the labelCurrencies dictionary.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Generated to support the propertyChange field.
 void setLabelCurrencies(Hashtable labelCurrencies)
          Sets the labelCurrencies property (java.util.Hashtable) value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EURO_DEM

public static final java.lang.String EURO_DEM
Conversion Rate EURO to DEM.

See Also:
Constant Field Values

EURO_ESP

public static final java.lang.String EURO_ESP
Conversion Rate EURO to ESP.

See Also:
Constant Field Values

EURO_FRF

public static final java.lang.String EURO_FRF
Conversion Rate EURO to FRF.

See Also:
Constant Field Values

EURO_BEF

public static final java.lang.String EURO_BEF
Conversion Rate EURO to BEF.

See Also:
Constant Field Values

EURO_NLG

public static final java.lang.String EURO_NLG
Conversion Rate EURO to NLG.

See Also:
Constant Field Values

EURO_PTE

public static final java.lang.String EURO_PTE
Conversion Rate EURO to PTE.

See Also:
Constant Field Values

EURO_ITL

public static final java.lang.String EURO_ITL
Conversion Rate EURO to ITL.

See Also:
Constant Field Values

EURO_ATS

public static final java.lang.String EURO_ATS
Conversion Rate EURO to ATS.

See Also:
Constant Field Values

EURO_IEP

public static final java.lang.String EURO_IEP
Conversion Rate EURO to IEP.

See Also:
Constant Field Values

EURO_FIM

public static final java.lang.String EURO_FIM
Conversion Rate EURO to FIM.

See Also:
Constant Field Values

fieldEuroCurrencies

Hashtable fieldEuroCurrencies

propertyChange

protected transient java.beans.PropertyChangeSupport propertyChange

fieldLabelCurrencies

Hashtable fieldLabelCurrencies
Constructor Detail

EuroConverter

public EuroConverter()
This constructor creates a EuroConverter object.

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Generated to support the propertyChange field.

Parameters:
listener - PropertyChangeListener, the listener

convertFromEuro

public java.lang.String convertFromEuro(java.lang.String amount,
                                        java.lang.String targetCurrencyId)
                                 throws DSEInvalidCurrencyCode
Converts an amount in European currency into an amount in the specified currency (targetCurrencyId).

Parameters:
amount - java.lang.String, the amount to be converted
targetCurrencyId - java.lang.String, the target currency identifier
Returns:
java.lang.String - the converted amount
Throws:
DSEInvalidCurrencyCode

convertToEuro

public java.lang.String convertToEuro(java.lang.String amount,
                                      java.lang.String sourceCurrencyId)
                               throws DSEInvalidCurrencyCode
Converts an amount in the specified currency (sourceCurrencyId) into euro currency.

Parameters:
amount - java.lang.String, the amount to be converted
sourceCurrencyId - java.lang.String, the source currency identifier
Returns:
java.lang.String - the converted amount
Throws:
DSEInvalidCurrencyCode

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Generated to support the propertyChange field.


getEuroCurrencies

public Hashtable getEuroCurrencies()
Gets the euroCurrencies property (java.util.Hashtable) value.

Returns:
Hashtable - the euroCurrencies property value
See Also:
#setEuroCurrencies

getEuropeanCurrencies

public java.lang.String[] getEuropeanCurrencies()
Returns all the European currency labels included in the labelCurrencies dictionary.

Returns:
String[] - the list of label currencies

getISOcodeFromLabel

public java.lang.String getISOcodeFromLabel(java.lang.String label)
Returns an ISOcode corresponding to a given currency label.

Parameters:
label - java.lang.String, the currency label
Returns:
java.lang.String - the ISO code

getLabelCurrencies

public Hashtable getLabelCurrencies()
Gets the labelCurrencies property (java.util.Hashtable) value.

Returns:
Hashtable - the labelCurrencies property value
See Also:
setLabelCurrencies(com.ibm.dse.base.Hashtable)

modifyCurrencyLabel

public void modifyCurrencyLabel(java.lang.String ISO_code,
                                java.lang.String label)
                         throws DSEInvalidCurrencyCode
Allows modification of a value in the labelCurrencies dictionary.

Parameters:
ISO_code - java.lang.String, the currency ISO code
label - java.lang.String, the currency label
Throws:
DSEInvalidCurrencyCode

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Generated to support the propertyChange field.

Parameters:
listener - PropertyChangeListener, the listener

setLabelCurrencies

public void setLabelCurrencies(Hashtable labelCurrencies)
Sets the labelCurrencies property (java.util.Hashtable) value.

Parameters:
labelCurrencies - The new value for the property
See Also:
getLabelCurrencies()

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005