|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.bc.fx.AbstractRatesProvider
com.ibm.btt.bc.fx.impl.RatesProviderImpl
public class RatesProviderImpl
This class provides the logic for retrieving the appropriate Foreign Exchange conversion rates. Note that this class does not actually access the database. Instead, it calls the getRate method of the RatesRepository class to retrieve the data it needs.
Constructor Summary | |
---|---|
RatesProviderImpl()
|
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
getAllSupportedCurrencies()
Returns all supported currency codes in a Set. |
java.lang.String |
getBasicMonetaryItem()
Returns the basic monetary item of foreign exchange. |
java.util.Set<java.lang.String> |
getDefinedMonetaryItems()
Returns all defined monetary item types. |
(package private) java.math.BigDecimal |
getDirectRate(RatesQueryRequest request,
boolean isBuy,
int scale)
Return the conversion rate between the source currency and the destination currency if a direct conversion exists between the two. |
java.math.BigDecimal |
getRate(RatesQueryRequest request,
boolean isBuy)
Returns the rate at which the financial institution buys or sells the destination currency. |
void |
setBasicMonetaryItem(java.lang.String basicMonetoryItem)
Sets the basic monetary item of foreign exchange. |
Methods inherited from class com.ibm.btt.bc.fx.AbstractRatesProvider |
---|
getConversionCurrency, getRatesRepository, setConversionCurrency, setRatesRepository |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RatesProviderImpl()
Method Detail |
---|
java.math.BigDecimal getDirectRate(RatesQueryRequest request, boolean isBuy, int scale) throws ForeignExchangeException
request
- the rates repository instance of the rates providerisBuy
- specifying wheather the requested rate is a buy rate
ForeignExchangeException
public java.math.BigDecimal getRate(RatesQueryRequest request, boolean isBuy) throws ForeignExchangeException
RatesProvider
request
- the RatesQueryRequest instance specifying the information of
the queryisBuy
- true if the requested rate is a buy rate, otherwise it should
be false
ForeignExchangeException
- occurs if there is an error accessing the ratepublic java.lang.String getBasicMonetaryItem()
public void setBasicMonetaryItem(java.lang.String basicMonetoryItem)
basicMonetoryItem
- the basic monetary item of foreign exchangepublic java.util.Set<java.lang.String> getAllSupportedCurrencies() throws ForeignExchangeException
RatesProvider
ForeignExchangeException
- occurs if there is an error accessing the Setpublic java.util.Set<java.lang.String> getDefinedMonetaryItems() throws ForeignExchangeException
RatesProvider
ForeignExchangeException
- occurs if there is an error accessing the Set
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |