Package org.apache.solr.schema
Class MockExchangeRateProvider
- java.lang.Object
-
- org.apache.solr.schema.MockExchangeRateProvider
-
- All Implemented Interfaces:
org.apache.solr.schema.ExchangeRateProvider
public class MockExchangeRateProvider extends Object implements org.apache.solr.schema.ExchangeRateProvider
Simple mock provider with fixed rates and some assertions
-
-
Constructor Summary
Constructors Constructor Description MockExchangeRateProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getExchangeRate(String sourceCurrencyCode, String targetCurrencyCode)
void
inform(org.apache.lucene.util.ResourceLoader loader)
void
init(Map<String,String> args)
Set<String>
listAvailableCurrencies()
boolean
reload()
-
-
-
Method Detail
-
getExchangeRate
public double getExchangeRate(String sourceCurrencyCode, String targetCurrencyCode)
- Specified by:
getExchangeRate
in interfaceorg.apache.solr.schema.ExchangeRateProvider
-
listAvailableCurrencies
public Set<String> listAvailableCurrencies()
- Specified by:
listAvailableCurrencies
in interfaceorg.apache.solr.schema.ExchangeRateProvider
-
reload
public boolean reload() throws org.apache.solr.common.SolrException
- Specified by:
reload
in interfaceorg.apache.solr.schema.ExchangeRateProvider
- Throws:
org.apache.solr.common.SolrException
-
init
public void init(Map<String,String> args)
- Specified by:
init
in interfaceorg.apache.solr.schema.ExchangeRateProvider
-
inform
public void inform(org.apache.lucene.util.ResourceLoader loader) throws org.apache.solr.common.SolrException
- Specified by:
inform
in interfaceorg.apache.solr.schema.ExchangeRateProvider
- Throws:
org.apache.solr.common.SolrException
-
-