Class LocalizedWarning
- java.lang.Object
-
- org.silverpeas.core.admin.component.model.LocalizedWarning
-
public class LocalizedWarning extends Object
This localized warning allows to provide data ofWarning
instances on the Silverpeas's user interfaces without having to manage the user language, which is carried by the localized warning itself..As a
Warning
instance is part of aParameter
,LocalizedWarning
is part ofLocalizedParameter
.- Author:
- silveryocha
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComponentName()
String
getLanguage()
protected String
getLocalized(String bundleKey, Map<String,String> messages)
Gets the localized data first into bundle property files if any, then into map of translations.String
getValue()
Gets the localized value of aWarning
according to the language specified onLocalizedWarning
instantiation.boolean
isAlways()
-
-
-
Method Detail
-
isAlways
public boolean isAlways()
- See Also:
Warning.isAlways()
-
getValue
public String getValue()
Gets the localized value of aWarning
according to the language specified onLocalizedWarning
instantiation.- Returns:
- a localized value as string.
- See Also:
Warning.getMessages()
-
getComponentName
public String getComponentName()
-
getLanguage
public String getLanguage()
-
getLocalized
protected String getLocalized(String bundleKey, Map<String,String> messages)
Gets the localized data first into bundle property files if any, then into map of translations.- Parameters:
bundleKey
- the bundle key.messages
- the map of translations extracted from XML component descriptors.- Returns:
- the localized data as string.
- Throws:
MissingResourceException
- if no translation can be found from the different resource locations.
-
-