|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ExchangeRateProvider
Interface for providing pluggable exchange rate providers to @CurrencyField
| Method Summary | |
|---|---|
double |
getExchangeRate(String sourceCurrencyCode,
String targetCurrencyCode)
Get the exchange rate betwen the two given currencies |
void |
inform(ResourceLoader loader)
Passes a ResourceLoader, used to read config files from e.g. |
void |
init(Map<String,String> args)
Initializes the provider by passing in a set of key/value configs as a map. |
Set<String> |
listAvailableCurrencies()
List all configured currency codes which are valid as source/target for this Provider |
boolean |
reload()
Ask the currency provider to explicitly reload/refresh its configuration. |
| Method Detail |
|---|
double getExchangeRate(String sourceCurrencyCode,
String targetCurrencyCode)
throws SolrException
SolrException - if the rate is not defined in the providerSet<String> listAvailableCurrencies()
boolean reload()
throws SolrException
SolrException - if there is a problem reloadingvoid init(Map<String,String> args)
Important: Custom config params must be removed from the map before returning
args - a @Map of key/value config params to initialize the provider
void inform(ResourceLoader loader)
throws SolrException
Typically called after init
loader - a @ResourceLoader instance
SolrException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||