public class LocalizationImpl
extends Object
implements com.liferay.portal.kernel.util.Localization
Constructor and Description |
---|
LocalizationImpl() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(com.liferay.portal.kernel.json.JSONObject jsonObject) |
String[] |
getAvailableLanguageIds(com.liferay.portal.kernel.xml.Document document) |
String[] |
getAvailableLanguageIds(String xml) |
Locale |
getDefaultImportLocale(String className,
long classPK,
Locale contentDefaultLocale,
Locale[] contentAvailableLocales) |
Locale |
getDefaultImportLocale(String className,
Serializable primaryKey,
Locale contentDefaultLocale,
Locale[] contentAvailableLocales) |
String |
getDefaultLanguageId(com.liferay.portal.kernel.xml.Document document) |
String |
getDefaultLanguageId(com.liferay.portal.kernel.xml.Document document,
Locale defaultLocale) |
String |
getDefaultLanguageId(String xml) |
String |
getDefaultLanguageId(String xml,
Locale defaultLocale) |
String |
getLocalization(Function<String,String> localizationFunction,
String requestedLanguageId,
String defaultLanguageId) |
String |
getLocalization(String xml,
String requestedLanguageId) |
String |
getLocalization(String xml,
String requestedLanguageId,
boolean useDefault) |
String |
getLocalization(String xml,
String requestedLanguageId,
boolean useDefault,
String defaultValue) |
Map<Locale,String> |
getLocalizationMap(Collection<Locale> locales,
Locale defaultLocale,
String key) |
Map<Locale,String> |
getLocalizationMap(javax.servlet.http.HttpServletRequest request,
String parameter) |
Map<Locale,String> |
getLocalizationMap(PortletPreferences preferences,
String preferenceName) |
Map<Locale,String> |
getLocalizationMap(PortletPreferences preferences,
String preferenceName,
String propertyName) |
Map<Locale,String> |
getLocalizationMap(PortletPreferences preferences,
String preferenceName,
String propertyName,
String defaultPropertyValue,
ClassLoader classLoader) |
Map<Locale,String> |
getLocalizationMap(PortletRequest portletRequest,
String parameter) |
Map<Locale,String> |
getLocalizationMap(PortletRequest portletRequest,
String parameter,
Map<Locale,String> defaultValues) |
Map<Locale,String> |
getLocalizationMap(String xml) |
Map<Locale,String> |
getLocalizationMap(String[] languageIds,
String[] values) |
Map<Locale,String> |
getLocalizationMap(String xml,
boolean useDefault) |
Map<Locale,String> |
getLocalizationMap(String bundleName,
ClassLoader classLoader,
String key,
boolean includeBetaLocales) |
String |
getLocalizationXmlFromPreferences(PortletPreferences preferences,
PortletRequest portletRequest,
String parameter) |
String |
getLocalizationXmlFromPreferences(PortletPreferences preferences,
PortletRequest portletRequest,
String parameter,
String defaultValue) |
String |
getLocalizationXmlFromPreferences(PortletPreferences preferences,
PortletRequest portletRequest,
String parameter,
String prefix,
String defaultValue) |
String |
getLocalizedName(String name,
String languageId) |
Map<Locale,String> |
getMap(com.liferay.portal.kernel.settings.LocalizedValuesMap localizedValuesMap) |
String |
getPreferencesKey(String key,
String languageId)
Deprecated.
As of Wilberforce (7.0.x)
|
String |
getPreferencesValue(PortletPreferences preferences,
String key,
String languageId) |
String |
getPreferencesValue(PortletPreferences preferences,
String key,
String languageId,
boolean useDefault) |
String[] |
getPreferencesValues(PortletPreferences preferences,
String key,
String languageId) |
String[] |
getPreferencesValues(PortletPreferences preferences,
String key,
String languageId,
boolean useDefault) |
String |
getSettingsValue(com.liferay.portal.kernel.settings.Settings settings,
String key,
String languageId) |
String |
getSettingsValue(com.liferay.portal.kernel.settings.Settings settings,
String key,
String languageId,
boolean useDefault) |
String[] |
getSettingsValues(com.liferay.portal.kernel.settings.Settings settings,
String key,
String languageId) |
String[] |
getSettingsValues(com.liferay.portal.kernel.settings.Settings settings,
String key,
String languageId,
boolean useDefault) |
String |
getXml(com.liferay.portal.kernel.settings.LocalizedValuesMap localizedValuesMap,
String key) |
String |
getXml(Map<String,String> map,
String defaultLanguageId,
String key) |
String |
removeLocalization(String xml,
String key,
String requestedLanguageId) |
String |
removeLocalization(String xml,
String key,
String requestedLanguageId,
boolean cdata) |
String |
removeLocalization(String xml,
String key,
String requestedLanguageId,
boolean cdata,
boolean localized) |
void |
setLocalizedPreferencesValues(PortletRequest portletRequest,
PortletPreferences preferences,
String parameter) |
void |
setPreferencesValue(PortletPreferences preferences,
String key,
String languageId,
String value) |
void |
setPreferencesValues(PortletPreferences preferences,
String key,
String languageId,
String[] values) |
String |
updateLocalization(Map<Locale,String> localizationMap,
String xml,
String key,
String defaultLanguageId) |
String |
updateLocalization(String xml,
String key,
String value) |
String |
updateLocalization(String xml,
String key,
String value,
String requestedLanguageId) |
String |
updateLocalization(String xml,
String key,
String value,
String requestedLanguageId,
String defaultLanguageId) |
String |
updateLocalization(String xml,
String key,
String value,
String requestedLanguageId,
String defaultLanguageId,
boolean cdata) |
String |
updateLocalization(String xml,
String key,
String value,
String requestedLanguageId,
String defaultLanguageId,
boolean cdata,
boolean localized) |
public Object deserialize(com.liferay.portal.kernel.json.JSONObject jsonObject)
deserialize
in interface com.liferay.portal.kernel.util.Localization
public String[] getAvailableLanguageIds(com.liferay.portal.kernel.xml.Document document)
getAvailableLanguageIds
in interface com.liferay.portal.kernel.util.Localization
public String[] getAvailableLanguageIds(String xml)
getAvailableLanguageIds
in interface com.liferay.portal.kernel.util.Localization
public Locale getDefaultImportLocale(String className, long classPK, Locale contentDefaultLocale, Locale[] contentAvailableLocales)
getDefaultImportLocale
in interface com.liferay.portal.kernel.util.Localization
public Locale getDefaultImportLocale(String className, Serializable primaryKey, Locale contentDefaultLocale, Locale[] contentAvailableLocales)
getDefaultImportLocale
in interface com.liferay.portal.kernel.util.Localization
public String getDefaultLanguageId(com.liferay.portal.kernel.xml.Document document)
getDefaultLanguageId
in interface com.liferay.portal.kernel.util.Localization
public String getDefaultLanguageId(com.liferay.portal.kernel.xml.Document document, Locale defaultLocale)
getDefaultLanguageId
in interface com.liferay.portal.kernel.util.Localization
public String getDefaultLanguageId(String xml)
getDefaultLanguageId
in interface com.liferay.portal.kernel.util.Localization
public String getDefaultLanguageId(String xml, Locale defaultLocale)
getDefaultLanguageId
in interface com.liferay.portal.kernel.util.Localization
public String getLocalization(Function<String,String> localizationFunction, String requestedLanguageId, String defaultLanguageId)
getLocalization
in interface com.liferay.portal.kernel.util.Localization
public String getLocalization(String xml, String requestedLanguageId)
getLocalization
in interface com.liferay.portal.kernel.util.Localization
public String getLocalization(String xml, String requestedLanguageId, boolean useDefault)
getLocalization
in interface com.liferay.portal.kernel.util.Localization
public String getLocalization(String xml, String requestedLanguageId, boolean useDefault, String defaultValue)
getLocalization
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(Collection<Locale> locales, Locale defaultLocale, String key)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(javax.servlet.http.HttpServletRequest request, String parameter)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(PortletPreferences preferences, String preferenceName)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(PortletPreferences preferences, String preferenceName, String propertyName)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(PortletPreferences preferences, String preferenceName, String propertyName, String defaultPropertyValue, ClassLoader classLoader)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(PortletRequest portletRequest, String parameter)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(PortletRequest portletRequest, String parameter, Map<Locale,String> defaultValues)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(String xml)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(String xml, boolean useDefault)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(String bundleName, ClassLoader classLoader, String key, boolean includeBetaLocales)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getLocalizationMap(String[] languageIds, String[] values)
getLocalizationMap
in interface com.liferay.portal.kernel.util.Localization
public String getLocalizationXmlFromPreferences(PortletPreferences preferences, PortletRequest portletRequest, String parameter)
getLocalizationXmlFromPreferences
in interface com.liferay.portal.kernel.util.Localization
public String getLocalizationXmlFromPreferences(PortletPreferences preferences, PortletRequest portletRequest, String parameter, String defaultValue)
getLocalizationXmlFromPreferences
in interface com.liferay.portal.kernel.util.Localization
public String getLocalizationXmlFromPreferences(PortletPreferences preferences, PortletRequest portletRequest, String parameter, String prefix, String defaultValue)
getLocalizationXmlFromPreferences
in interface com.liferay.portal.kernel.util.Localization
public String getLocalizedName(String name, String languageId)
getLocalizedName
in interface com.liferay.portal.kernel.util.Localization
public Map<Locale,String> getMap(com.liferay.portal.kernel.settings.LocalizedValuesMap localizedValuesMap)
getMap
in interface com.liferay.portal.kernel.util.Localization
@Deprecated public String getPreferencesKey(String key, String languageId)
getPreferencesKey
in interface com.liferay.portal.kernel.util.Localization
public String getPreferencesValue(PortletPreferences preferences, String key, String languageId)
getPreferencesValue
in interface com.liferay.portal.kernel.util.Localization
public String getPreferencesValue(PortletPreferences preferences, String key, String languageId, boolean useDefault)
getPreferencesValue
in interface com.liferay.portal.kernel.util.Localization
public String[] getPreferencesValues(PortletPreferences preferences, String key, String languageId)
getPreferencesValues
in interface com.liferay.portal.kernel.util.Localization
public String[] getPreferencesValues(PortletPreferences preferences, String key, String languageId, boolean useDefault)
getPreferencesValues
in interface com.liferay.portal.kernel.util.Localization
public String getSettingsValue(com.liferay.portal.kernel.settings.Settings settings, String key, String languageId)
getSettingsValue
in interface com.liferay.portal.kernel.util.Localization
public String getSettingsValue(com.liferay.portal.kernel.settings.Settings settings, String key, String languageId, boolean useDefault)
getSettingsValue
in interface com.liferay.portal.kernel.util.Localization
public String[] getSettingsValues(com.liferay.portal.kernel.settings.Settings settings, String key, String languageId)
getSettingsValues
in interface com.liferay.portal.kernel.util.Localization
public String[] getSettingsValues(com.liferay.portal.kernel.settings.Settings settings, String key, String languageId, boolean useDefault)
getSettingsValues
in interface com.liferay.portal.kernel.util.Localization
public String getXml(com.liferay.portal.kernel.settings.LocalizedValuesMap localizedValuesMap, String key)
getXml
in interface com.liferay.portal.kernel.util.Localization
public String getXml(Map<String,String> map, String defaultLanguageId, String key)
getXml
in interface com.liferay.portal.kernel.util.Localization
public String removeLocalization(String xml, String key, String requestedLanguageId)
removeLocalization
in interface com.liferay.portal.kernel.util.Localization
public String removeLocalization(String xml, String key, String requestedLanguageId, boolean cdata)
removeLocalization
in interface com.liferay.portal.kernel.util.Localization
public String removeLocalization(String xml, String key, String requestedLanguageId, boolean cdata, boolean localized)
removeLocalization
in interface com.liferay.portal.kernel.util.Localization
public void setLocalizedPreferencesValues(PortletRequest portletRequest, PortletPreferences preferences, String parameter) throws Exception
setLocalizedPreferencesValues
in interface com.liferay.portal.kernel.util.Localization
Exception
public void setPreferencesValue(PortletPreferences preferences, String key, String languageId, String value) throws Exception
setPreferencesValue
in interface com.liferay.portal.kernel.util.Localization
Exception
public void setPreferencesValues(PortletPreferences preferences, String key, String languageId, String[] values) throws Exception
setPreferencesValues
in interface com.liferay.portal.kernel.util.Localization
Exception
public String updateLocalization(Map<Locale,String> localizationMap, String xml, String key, String defaultLanguageId)
updateLocalization
in interface com.liferay.portal.kernel.util.Localization
public String updateLocalization(String xml, String key, String value)
updateLocalization
in interface com.liferay.portal.kernel.util.Localization
public String updateLocalization(String xml, String key, String value, String requestedLanguageId)
updateLocalization
in interface com.liferay.portal.kernel.util.Localization
public String updateLocalization(String xml, String key, String value, String requestedLanguageId, String defaultLanguageId)
updateLocalization
in interface com.liferay.portal.kernel.util.Localization
public String updateLocalization(String xml, String key, String value, String requestedLanguageId, String defaultLanguageId, boolean cdata)
updateLocalization
in interface com.liferay.portal.kernel.util.Localization
public String updateLocalization(String xml, String key, String value, String requestedLanguageId, String defaultLanguageId, boolean cdata, boolean localized)
updateLocalization
in interface com.liferay.portal.kernel.util.Localization