Package africa.absa.inception.reference
Interface IReferenceService
- All Known Implementing Classes:
ReferenceService
public interface IReferenceService
The IReferenceService interface defines the functionality provided by a Reference Service
implementation.
- Author:
- Marcus Portmann
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the country reference data for all locales.getCountries(String localeId) Retrieve the country reference data for a specific locale.Retrieve the language reference data for all locales.getLanguages(String localeId) Retrieve the language reference data for a specific locale.Retrieve the measurement system reference data for all locales.getMeasurementSystems(String localeId) Retrieve the measurement system reference data for a specific locale.Retrieve the measurement unit reference data for all locales.getMeasurementUnits(String localeId) Retrieve the measurement unit reference data for a specific locale.Retrieve the measurement unit type reference data for all locales.getMeasurementUnitTypes(String localeId) Retrieve the measurement unit type reference data for a specific locale.Retrieve the region reference data for all locales.getRegions(String localeId) Retrieve the region reference data for a specific locale.Retrieve the time zone reference data for all locales.getTimeZones(String localeId) Retrieve the time zone reference data for a specific locale.booleanisValidCountry(String countryCode) Check whether the code is a valid code for a country.booleanisValidLanguage(String languageCode) Check whether the code is a valid ISO 639-1 alpha-2 code for a language.booleanisValidMeasurementSystem(String measurementSystemCode) Check whether the code is a valid code for a measurement system.booleanisValidMeasurementUnit(String measurementUnitCode) Check whether the code is a valid code for a measurement unit.booleanisValidMeasurementUnitType(String measurementUnitTypeCode) Check whether the code is a valid code for a measurement unit type.booleanisValidRegion(String regionCode) Check whether the code is a valid code for a region.booleanisValidTimeZone(String timeZoneCode) Check whether the code is a valid code for a time zone.
-
Field Details
-
DEFAULT_LOCALE_ID
The default locale ID.- See Also:
-
-
Method Details
-
getCountries
Retrieve the country reference data for all locales.- Returns:
- the country reference data
- Throws:
ServiceUnavailableException- if the country reference data could not be retrieved
-
getCountries
List<Country> getCountries(String localeId) throws InvalidArgumentException, ServiceUnavailableException Retrieve the country reference data for a specific locale.- Parameters:
localeId- the Unicode locale identifier for the locale to retrieve the country reference data for- Returns:
- the country reference data
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the country reference data could not be retrieved
-
getLanguages
Retrieve the language reference data for all locales.- Returns:
- the language reference data
- Throws:
ServiceUnavailableException- if the language reference data could not be retrieved
-
getLanguages
List<Language> getLanguages(String localeId) throws InvalidArgumentException, ServiceUnavailableException Retrieve the language reference data for a specific locale.- Parameters:
localeId- the Unicode locale identifier for the locale to retrieve the language reference data for- Returns:
- the language reference data
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the language reference data could not be retrieved
-
getMeasurementSystems
Retrieve the measurement system reference data for all locales.- Returns:
- the measurement system reference data
- Throws:
ServiceUnavailableException- if the measurement system reference data could not be retrieved
-
getMeasurementSystems
List<MeasurementSystem> getMeasurementSystems(String localeId) throws InvalidArgumentException, ServiceUnavailableException Retrieve the measurement system reference data for a specific locale.- Parameters:
localeId- the Unicode locale identifier for the locale to retrieve the measurement system reference data for- Returns:
- the measurement system reference data
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the measurement system reference data could not be retrieved
-
getMeasurementUnitTypes
Retrieve the measurement unit type reference data for all locales.- Returns:
- the measurement unit type reference data
- Throws:
ServiceUnavailableException- if the measurement unit type reference data could not be retrieved
-
getMeasurementUnitTypes
List<MeasurementUnitType> getMeasurementUnitTypes(String localeId) throws InvalidArgumentException, ServiceUnavailableException Retrieve the measurement unit type reference data for a specific locale.- Parameters:
localeId- the Unicode locale identifier for the locale to retrieve the measurement unit type reference data for- Returns:
- the measurement unit type reference data
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the measurement unit type reference data could not be retrieved
-
getMeasurementUnits
Retrieve the measurement unit reference data for all locales.- Returns:
- the measurement unit reference data
- Throws:
ServiceUnavailableException- if the measurement unit reference data could not be retrieved
-
getMeasurementUnits
List<MeasurementUnit> getMeasurementUnits(String localeId) throws InvalidArgumentException, ServiceUnavailableException Retrieve the measurement unit reference data for a specific locale.- Parameters:
localeId- the Unicode locale identifier for the locale to retrieve the measurement unit reference data for- Returns:
- the measurement unit reference data
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the measurement unit reference data could not be retrieved
-
getRegions
Retrieve the region reference data for all locales.- Returns:
- the region reference data
- Throws:
ServiceUnavailableException- if the region reference data could not be retrieved
-
getRegions
List<Region> getRegions(String localeId) throws InvalidArgumentException, ServiceUnavailableException Retrieve the region reference data for a specific locale.- Parameters:
localeId- the Unicode locale identifier for the locale to retrieve the region reference data for- Returns:
- the region reference data
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the region reference data could not be retrieved
-
getTimeZones
Retrieve the time zone reference data for all locales.- Returns:
- the time zones reference data
- Throws:
ServiceUnavailableException- if the time zones reference data could not be retrieved
-
getTimeZones
List<TimeZone> getTimeZones(String localeId) throws InvalidArgumentException, ServiceUnavailableException Retrieve the time zone reference data for a specific locale.- Parameters:
localeId- the Unicode locale identifier for the locale to retrieve the time zone reference data for- Returns:
- the time zone reference data
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the time zones reference data could not be retrieved
-
isValidCountry
Check whether the code is a valid code for a country.- Parameters:
countryCode- the code for the country- Returns:
- true if the code is a valid code for a country or false otherwise
- Throws:
ServiceUnavailableException- if the country code check failed
-
isValidLanguage
Check whether the code is a valid ISO 639-1 alpha-2 code for a language.- Parameters:
languageCode- the code for the language- Returns:
- true if the code is a valid ISO 639-1 alpha-2 code for a language or false otherwise
- Throws:
ServiceUnavailableException- if the language code check failed
-
isValidMeasurementSystem
Check whether the code is a valid code for a measurement system.- Parameters:
measurementSystemCode- the code for the measurement system- Returns:
- true if the code is a valid code for a measurement system or false otherwise
- Throws:
ServiceUnavailableException- if the measurement system code check failed
-
isValidMeasurementUnit
Check whether the code is a valid code for a measurement unit.- Parameters:
measurementUnitCode- the code for the measurement unit- Returns:
- true if the code is a valid code for a measurement unit or false otherwise
- Throws:
ServiceUnavailableException- if the measurement unit code check failed
-
isValidMeasurementUnitType
boolean isValidMeasurementUnitType(String measurementUnitTypeCode) throws ServiceUnavailableException Check whether the code is a valid code for a measurement unit type.- Parameters:
measurementUnitTypeCode- the code for the measurement unit type- Returns:
- true if the code is a valid code for a measurement unit type or false otherwise
- Throws:
ServiceUnavailableException- if the measurement unit type code check failed
-
isValidRegion
Check whether the code is a valid code for a region.- Parameters:
regionCode- the code for the region- Returns:
- true if the code is a valid code for a region or false otherwise
- Throws:
ServiceUnavailableException- if the region code check failed
-
isValidTimeZone
Check whether the code is a valid code for a time zone.- Parameters:
timeZoneCode- the code for the time zone- Returns:
- true if the code is a valid code for a time zone or false otherwise
- Throws:
ServiceUnavailableException- if the time zone code check failed
-