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 aCurrencyUnit
instances matching the givenCurrencyContext
.default java.lang.String
getProviderName()
The unique name of this currency provider instance.default boolean
isCurrencyAvailable(CurrencyQuery query)
Checks if aCurrencyUnit
instances matching the givenCurrencyContext
is 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 aCurrencyUnit
instances matching the givenCurrencyContext
is available from this provider.- Parameters:
query
- theCurrencyQuery
containing the parameters determining the query. not null.- Returns:
- false, if no such unit is provided by this provider.
-
getCurrencies
Return aCurrencyUnit
instances matching the givenCurrencyContext
.- Parameters:
query
- theCurrencyQuery
containing the parameters determining the query. not null.- Returns:
- the corresponding
CurrencyUnit
s matching, never null.
-