Class LocaleService
java.lang.Object
com.bluebell.greenhouse.radicle.services.locale.LocaleService
Service-layer for country and currency lookups.
- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindCountry(String countryIsoCode) Attempts to resolve a country by ISO code.findCountryByIsoCodeOrCode(String countryValue) Attempts to resolve a country by ISO code first, then by the legacy enum code.findCountryForCurrency(String currencyIsoCode) Attempts to resolve the default country for a currency ISO code.findCurrency(String currencyIsoCode) Attempts to resolve a currency by ISO code.findCurrencyByIsoCodeOrCode(String currencyValue) Attempts to resolve a currency by ISO code first, then by the legacy enum code.Returns all supported countries.getCountry(String countryIsoCode) Returns the country for the given ISO code.getCountryForCurrency(String currencyIsoCode) Returns the default country for the given currency ISO code.Returns the supported country ISO codes.Returns the supported country phone codes.Returns all supported currencies.getCurrency(String currencyIsoCode) Returns the currency for the given ISO code.getCurrencyForCountry(String countryIsoCode) Returns the default currency for the given country ISO code.Returns the supported currency ISO codes.booleanisSupportedLocale(String locale) Checks if the given string is a supported locale token.booleanmatchesLocale(Country country, String locale) Checks whether the given country matches the locale token.
-
Constructor Details
-
LocaleService
public LocaleService()
-
-
Method Details
-
getCountryPhoneCodes
-
getCountryIsoCodes
-
getCurrencyIsoCodes
-
getCountries
Returns all supported countries.- Returns:
ListofCountryDTO
-
getCurrencies
@Cacheable(cacheNames="localeReference", key="'currencies'") public List<CurrencyDTO> getCurrencies()Returns all supported currencies.- Returns:
ListofCurrencyDTO
-
getCountryForCurrency
-
getCurrencyForCountry
-
getCountry
-
getCurrency
-
isSupportedLocale
Checks if the given string is a supported locale token.- Parameters:
locale- locale token- Returns:
- true if supported
-
matchesLocale
-
findCountry
-
findCountryByIsoCodeOrCode
-
findCurrency
-
findCurrencyByIsoCodeOrCode
-
findCountryForCurrency
-