Package api.mpba.rastvdmy.service
Interface CurrencyDataService
- All Known Implementing Classes:
CurrencyDataServiceImpl
public interface CurrencyDataService
Service for managing currency data and operations.
-
Method Summary
Modifier and TypeMethodDescriptionconvertCurrency
(String baseCurrency, String targetCurrency) Converts an amount from a base currency to a target currency.findAllCurrencies
(jakarta.servlet.http.HttpServletRequest request) Finds all available currencies.void
Finds and retrieves all exchange rates.findByCurrency
(jakarta.servlet.http.HttpServletRequest request, String currency) Finds currency data by the specified currency code.
-
Method Details
-
findAllCurrencies
Finds all available currencies.- Parameters:
request
- the HTTP request containing user information- Returns:
- a list of all available
CurrencyData
-
findByCurrency
Finds currency data by the specified currency code.- Parameters:
request
- the HTTP request containing user informationcurrency
- the currency code for which to retrieve data- Returns:
- the
CurrencyData
associated with the specified currency code
-
convertCurrency
Converts an amount from a base currency to a target currency.- Parameters:
baseCurrency
- the currency to convert fromtargetCurrency
- the currency to convert to- Returns:
- the
CurrencyData
containing the conversion result
-
findAllExchangeRates
void findAllExchangeRates()Finds and retrieves all exchange rates. This method may return void if it only updates the internal state or performs side effects without returning data.
-