Package africa.absa.inception.reference
Interface IReferenceService
-
- All Known Implementing Classes:
ReferenceService
public interface IReferenceServiceThe IReferenceService interface defines the functionality provided by a Reference Service implementation.- Author:
- Marcus Portmann
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_LOCALE_IDThe default locale ID.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Country>getCountries()Retrieve the country reference data for all locales.List<Country>getCountries(String localeId)Retrieve the country reference data for a specific locale.List<Language>getLanguages()Retrieve the language reference data for all locales.List<Language>getLanguages(String localeId)Retrieve the language reference data for a specific locale.List<MeasurementSystem>getMeasurementSystems()Retrieve the measurement system reference data for all locales.List<MeasurementSystem>getMeasurementSystems(String localeId)Retrieve the measurement system reference data for a specific locale.List<MeasurementUnit>getMeasurementUnits()Retrieve the measurement unit reference data for all locales.List<MeasurementUnit>getMeasurementUnits(String localeId)Retrieve the measurement unit reference data for a specific locale.List<MeasurementUnitType>getMeasurementUnitTypes()Retrieve the measurement unit type reference data for all locales.List<MeasurementUnitType>getMeasurementUnitTypes(String localeId)Retrieve the measurement unit type reference data for a specific locale.List<Region>getRegions()Retrieve the region reference data for all locales.List<Region>getRegions(String localeId)Retrieve the region reference data for a specific locale.List<TimeZone>getTimeZones()Retrieve the time zone reference data for all locales.List<TimeZone>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 Detail
-
DEFAULT_LOCALE_ID
static final String DEFAULT_LOCALE_ID
The default locale ID.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCountries
List<Country> getCountries() throws ServiceUnavailableException
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
List<Language> getLanguages() throws ServiceUnavailableException
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
List<MeasurementSystem> getMeasurementSystems() throws ServiceUnavailableException
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
List<MeasurementUnitType> getMeasurementUnitTypes() throws ServiceUnavailableException
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
List<MeasurementUnit> getMeasurementUnits() throws ServiceUnavailableException
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
List<Region> getRegions() throws ServiceUnavailableException
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
List<TimeZone> getTimeZones() throws ServiceUnavailableException
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
boolean isValidCountry(String countryCode) throws ServiceUnavailableException
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
boolean isValidLanguage(String languageCode) throws ServiceUnavailableException
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
boolean isValidMeasurementSystem(String measurementSystemCode) throws ServiceUnavailableException
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
boolean isValidMeasurementUnit(String measurementUnitCode) throws ServiceUnavailableException
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
boolean isValidRegion(String regionCode) throws ServiceUnavailableException
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
boolean isValidTimeZone(String timeZoneCode) throws ServiceUnavailableException
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
-
-