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.-
Method Summary
Modifier and TypeMethodDescriptiongetCurrencies(CurrencyQuery query) Return aCurrencyUnitinstances matching the givenCurrencyContext.default StringThe unique name of this currency provider instance.default booleanisCurrencyAvailable(CurrencyQuery query) Checks if aCurrencyUnitinstances matching the givenCurrencyContextis available from this provider.
-
Method Details
-
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.
-