public interface CurrencyProviderSpi
SPI (core) to be registered using the
Bootstrap, which allows to
register/provide additional currencies into the system automatically on
startup. The implementation is allowed to be implemented in y contextual way,
so depending on the runtime context, different currencies may be available.- Author:
- Anatole Tresch
-
Method Summary
Modifier and Type Method Description java.util.Set<CurrencyUnit>getCurrencies(CurrencyQuery query)Return aCurrencyUnitinstances matching the givenCurrencyContext.default java.lang.StringgetProviderName()The unique name of this currency provider instance.default booleanisCurrencyAvailable(CurrencyQuery query)Checks if aCurrencyUnitinstances matching the givenCurrencyContextis available from this provider.
-
Method Details
-
getProviderName
default java.lang.String getProviderName()The unique name of this currency provider instance.- Returns:
- the unique provider id, never null or empty.
-
isCurrencyAvailable
Checks if aCurrencyUnitinstances matching the givenCurrencyContextis available from this provider.- Parameters:
query- theCurrencyQuerycontaining the parameters determining the query. not null.- Returns:
- false, if no such unit is provided by this provider.
-
getCurrencies
Return aCurrencyUnitinstances matching the givenCurrencyContext.- Parameters:
query- theCurrencyQuerycontaining the parameters determining the query. not null.- Returns:
- the corresponding
CurrencyUnits matching, never null.
-