|
||||||||||
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(org.apache.solr.common.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 org.apache.solr.common.SolrException
sourceCurrencyCode
- targetCurrencyCode
-
exception
- if the rate is not defined in the provider
org.apache.solr.common.SolrException
Set<String> listAvailableCurrencies()
boolean reload() throws org.apache.solr.common.SolrException
org.apache.solr.common.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 providervoid inform(org.apache.solr.common.ResourceLoader loader) throws org.apache.solr.common.SolrException
Typically called after init
loader
- a @ResourceLoader instance
org.apache.solr.common.SolrException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |