com.sap.ip.me.api.conf
Class Localization

java.lang.Object
  extended bycom.sap.ip.me.api.conf.Localization

public final class Localization
extends java.lang.Object

The configuration class offers some methods to read and write localization properties as language, country and time zone

Author:
SAP
See Also:
PropertyKeys

Constructor Summary
Localization()
           
 
Method Summary
static java.util.Vector getAllCountries()
          Gets the country names and the iso codes supported by the mobile infrastructure framework
static java.util.Vector getAllCountriesIsoName()
          Gets the countries supported by the mobile infrastructure framework in two letter iso code
static java.util.Vector getAllCountriesLongName()
          Gets the countries supported by the mobile infrastructure framework
static java.util.Vector getAllCountriesSorted()
          Gets the country names and the iso codes supported by the mobile infrastructure framework
static java.util.Vector getAllLanguages()
          Gets the languages supported by the mobile infrastructure framework
static java.util.Vector getAllTimezones()
          Gets the allTimezones attribute of the Localization class
static java.lang.String getCountry()
          Gets the current country
static java.lang.String getFormatedDate()
          Gets the formatedDate attribute of the Localization class
static java.lang.String getFormatedDate(long l)
          Gets the formatedDate attribute of the Localization class
static java.lang.String getFormatedTime()
          returns the current time (formated)
static java.lang.String getFormatedTime(long l)
          Gets the formatedTime attribute of the Localization class
static java.lang.String getLanguage()
          Gets the language setting of the current user
static java.util.Locale getLocale()
          Gets the locale attribute of the Localization class
static java.util.TimeZone getTimeZone()
          Gets the timeZone attribute of the Localization class
static void setCountry(java.lang.String isoCountry)
          sets the current country
static void setLanguage(java.lang.String languageIso)
          Sets the language attribute of the current user
static void setLocale(java.util.Locale locale)
          Sets the locale attribute of the Localization class this changes also the java default locale.
static void setTimeZone(java.util.TimeZone timeZone)
          Sets the timeZone attribute of the Localization class so the java formatters for date and time will use this timezone.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Localization

public Localization()
Method Detail

getLocale

public static java.util.Locale getLocale()
Gets the locale attribute of the Localization class

Returns:
The locale value

setLocale

public static void setLocale(java.util.Locale locale)
Sets the locale attribute of the Localization class this changes also the java default locale.

Parameters:
locale - The new locale value

getTimeZone

public static java.util.TimeZone getTimeZone()
Gets the timeZone attribute of the Localization class

Returns:
The timeZone value

setTimeZone

public static void setTimeZone(java.util.TimeZone timeZone)
Sets the timeZone attribute of the Localization class so the java formatters for date and time will use this timezone.

Parameters:
timeZone - The new timeZone value

getAllTimezones

public static java.util.Vector getAllTimezones()
Gets the allTimezones attribute of the Localization class

Returns:
The allTimezones value

getAllLanguages

public static java.util.Vector getAllLanguages()
Gets the languages supported by the mobile infrastructure framework

Returns:
a vector with all languages (iso code 639)

getLanguage

public static java.lang.String getLanguage()
Gets the language setting of the current user

Returns:
The language value in iso code 639

setLanguage

public static void setLanguage(java.lang.String languageIso)
Sets the language attribute of the current user

Parameters:
languageIso - The new language value in iso code 639

getAllCountriesLongName

public static java.util.Vector getAllCountriesLongName()
Gets the countries supported by the mobile infrastructure framework

Returns:
a vector with the countries (long names)

getAllCountriesIsoName

public static java.util.Vector getAllCountriesIsoName()
Gets the countries supported by the mobile infrastructure framework in two letter iso code

Returns:
a vector with the languages (two letter iso 3166 names)

getAllCountries

public static java.util.Vector getAllCountries()
Gets the country names and the iso codes supported by the mobile infrastructure framework

Returns:
a sorted vector with the countries (Locales)

getAllCountriesSorted

public static java.util.Vector getAllCountriesSorted()
Gets the country names and the iso codes supported by the mobile infrastructure framework

Returns:
a sorted vector with the countries as String[]array components like: countrycolumn[0] = Locale.getCountry(); countrycolumn[1] = Locale.getDisplayCountry()

getCountry

public static java.lang.String getCountry()
Gets the current country

Returns:
the current country in two letter iso 3166 code

setCountry

public static void setCountry(java.lang.String isoCountry)
sets the current country

Parameters:
isoCountry - The new country value in iso 3166

getFormatedDate

public static java.lang.String getFormatedDate()
Gets the formatedDate attribute of the Localization class

Returns:
The formatedDate value

getFormatedDate

public static java.lang.String getFormatedDate(long l)
Gets the formatedDate attribute of the Localization class

Parameters:
l - date in milliseconds
Returns:
The formatedDate value

getFormatedTime

public static java.lang.String getFormatedTime()
returns the current time (formated)

Returns:
The formatedTime value

getFormatedTime

public static java.lang.String getFormatedTime(long l)
Gets the formatedTime attribute of the Localization class

Parameters:
l - time in milliseconds
Returns:
The formatedTime value


Copyright © 2005 SAP AG. All Rights Reserved.