public interface MasterDataManagement
Management class for master data.
Modifier and Type | Field and Description |
---|---|
static String |
MASTERDATA_LANGUAGE_PREFIX
The property prefix for the language values.
|
Modifier and Type | Method and Description |
---|---|
void |
addLanguage(String languageCode,
String name)
Adds a new language or updates an existing language for the given code.
|
Country |
findCountryByCode(String countryCode)
Finds a country by the country code.
|
Language |
findLanguageByCode(String languageCode)
Finds a language by the language code.
|
Map<String,String> |
getAllLanguages()
Returns all languages for the client.
|
Collection<Language> |
getAvailableLanguages()
This method returns all available languages.
|
List<Country> |
getCountries(Locale locale)
Returns a list of all countries in the database.
|
List<Language> |
getLanguages() |
List<SimplifiedTimeZone> |
getTimeZones() |
Collection<Language> |
getUsedLanguages()
This method returns all available languages plus the language of the current user.
|
boolean |
isAvailableLanguage(Locale locale)
Test whether the language of the locale belongs to the available languages.
|
void |
postInitialization() |
void |
removeLanguage(String languageCode)
Removes the language for the given code.
|
static final String MASTERDATA_LANGUAGE_PREFIX
void addLanguage(String languageCode, String name)
languageCode
- The language code as LANGUAGE_COUNTY_VARIANTname
- The name of the language (Should be the foreign name).Country findCountryByCode(String countryCode)
Finds a country by the country code.
Language findLanguageByCode(String languageCode)
Finds a language by the language code.
@Transactional(readOnly=true) Map<String,String> getAllLanguages()
@Transactional(readOnly=true) Collection<Language> getAvailableLanguages()
getUsedLanguages()
it
will not include an inactive language of the current user.
Will maintain the languages itself and not use the database.getUsedLanguages()
List<Country> getCountries(Locale locale)
Returns a list of all countries in the database.
List<Language> getLanguages()
List<SimplifiedTimeZone> getTimeZones()
@Transactional(readOnly=true) Collection<Language> getUsedLanguages()
getAvailableLanguages()
Will use the database only for getting the language of the current user.getAvailableLanguages()
@Transactional(readOnly=true) boolean isAvailableLanguage(Locale locale)
locale
- the locale to testvoid postInitialization()
void removeLanguage(String languageCode)
languageCode
- The code of the language to remove.Copyright © 2019 Communote team. All rights reserved.