This class implements an javax.
that loads data from the European Central Bank data feed (XML). It loads the
current exchange rates, as well as historic rates for the past 90 days. The
provider loads all data up to 1999 into its historic data cache.
The default date is yesterday or the most recent day of week. To uses exchange rate from a specific date, you can use this way:
CurrencyUnit termCurrency = ...;
LocalDate localDate = ...;
ConversionQuery conversionQuery = ConversionQueryBuilder.of().setTermCurrency(euro).setTimestamp(localDate).build();v
CurrencyConversion currencyConversion = provider.getCurrencyConversion(conversionQuery);
MonetaryAmount money = ...;
MonetaryAmount result = currencyConversion.apply(money);
| Modifier and Type | Field and Description |
|---|---|
| private static final ProviderContext | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| protected LoadDataInformation | getDefaultLoadData()
Implements abstract org. Gets the default data loading configuration. |
| CONTEXT | back to summary |
|---|---|
| private static final ProviderContext CONTEXT | |
| DATA_ID | back to summary |
|---|---|
| private static final String DATA_ID | |
| ECBHistoric90RateProvider | back to summary |
|---|---|
| public ECBHistoric90RateProvider() | |
| getDataId | back to summary |
|---|---|
| public String getDataId() Implements abstract org.
| |
| getDefaultLoadData | back to summary |
|---|---|
| protected LoadDataInformation getDefaultLoadData() Implements abstract org. Doc from org. Gets the default data loading configuration. This configuration is used if no other is provided.
| |