Package org.cyclos.impl.system
Class LocalizationServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.system.LocalizationServiceImpl
-
- All Implemented Interfaces:
LocalizationServiceLocal,Service,LocalizationService
@Component public class LocalizationServiceImpl extends BaseNetworkedHandlerImpl implements LocalizationServiceLocal
Implementation forLocalizationService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description LocalizationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getCountryCodes()Returns all accepted 2-letter iso country codesStringgetCountryName(String code)Returns the country name translated to the current locale according to the ISO country code passed.StringgetDefaultCountryForLanguage(String language)Returns the default country code for a given language code, if anyLocalizationDatagetLocalizationData(String selectedCountryCode, String selectedTimeZoneId)Returns data for editing a country / time zone combinationvoidinitialize()List<CountryVO>listCountries()Returns a list of country codes with their respective namesList<String>listCountryCodes()Returns a list of country codesList<String>listTimeZoneIds()Returns a list of time zone idsList<String>listTimeZoneIdsForCountry(String countryCode)Returns a list of time zone idsList<TimeZoneVO>listTimeZones()Returns a list with all time zonesList<TimeZoneVO>listTimeZonesByCountry(String countryCode)Returns a list of which time zones are available for a given country-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
getCountryCodes
public List<String> getCountryCodes() throws FrameworkException
Description copied from interface:LocalizationServiceLocalReturns all accepted 2-letter iso country codes- Specified by:
getCountryCodesin interfaceLocalizationServiceLocal- Throws:
FrameworkException
-
getCountryName
public String getCountryName(String code)
Description copied from interface:LocalizationServiceLocalReturns the country name translated to the current locale according to the ISO country code passed.- Specified by:
getCountryNamein interfaceLocalizationServiceLocal
-
getDefaultCountryForLanguage
public String getDefaultCountryForLanguage(String language)
Description copied from interface:LocalizationServiceLocalReturns the default country code for a given language code, if any- Specified by:
getDefaultCountryForLanguagein interfaceLocalizationServiceLocal
-
getLocalizationData
public LocalizationData getLocalizationData(String selectedCountryCode, String selectedTimeZoneId) throws FrameworkException
Description copied from interface:LocalizationServiceLocalReturns data for editing a country / time zone combination- Specified by:
getLocalizationDatain interfaceLocalizationServiceLocal- Throws:
FrameworkException
-
initialize
@PostConstruct public void initialize()
-
listCountries
public List<CountryVO> listCountries()
Description copied from interface:LocalizationServiceReturns a list of country codes with their respective names- Specified by:
listCountriesin interfaceLocalizationService
-
listCountryCodes
public List<String> listCountryCodes()
Description copied from interface:LocalizationServiceLocalReturns a list of country codes- Specified by:
listCountryCodesin interfaceLocalizationServiceLocal
-
listTimeZoneIds
public List<String> listTimeZoneIds()
Description copied from interface:LocalizationServiceLocalReturns a list of time zone ids- Specified by:
listTimeZoneIdsin interfaceLocalizationServiceLocal
-
listTimeZoneIdsForCountry
public List<String> listTimeZoneIdsForCountry(String countryCode)
Description copied from interface:LocalizationServiceLocalReturns a list of time zone ids- Specified by:
listTimeZoneIdsForCountryin interfaceLocalizationServiceLocal
-
listTimeZones
public List<TimeZoneVO> listTimeZones() throws FrameworkException
Description copied from interface:LocalizationServiceReturns a list with all time zones- Specified by:
listTimeZonesin interfaceLocalizationService- Throws:
FrameworkException
-
listTimeZonesByCountry
public List<TimeZoneVO> listTimeZonesByCountry(String countryCode) throws FrameworkException
Description copied from interface:LocalizationServiceReturns a list of which time zones are available for a given country- Specified by:
listTimeZonesByCountryin interfaceLocalizationService- Throws:
FrameworkException
-
-