Package org.silverpeas.core.util
Class MultiSilverpeasBundle
- java.lang.Object
-
- org.silverpeas.core.util.MultiSilverpeasBundle
-
public class MultiSilverpeasBundle extends Object
A bundle that is a wrapper of several kinds of resource bundles.
-
-
Constructor Summary
Constructors Constructor Description MultiSilverpeasBundle(org.silverpeas.kernel.bundle.LocalizationBundle specificMultilang, String language)
Constructs a new multiple bundle.MultiSilverpeasBundle(org.silverpeas.kernel.bundle.LocalizationBundle specificMultilang, org.silverpeas.kernel.bundle.SettingBundle specificIcons, String language)
Constructs a new multiple bundle.MultiSilverpeasBundle(org.silverpeas.kernel.bundle.LocalizationBundle specificMultilang, org.silverpeas.kernel.bundle.SettingBundle specificIcons, org.silverpeas.kernel.bundle.SettingBundle specificSettings, String language)
Constructs a new multiple bundle.
-
Method Summary
-
-
-
Constructor Detail
-
MultiSilverpeasBundle
public MultiSilverpeasBundle(org.silverpeas.kernel.bundle.LocalizationBundle specificMultilang, org.silverpeas.kernel.bundle.SettingBundle specificIcons, String language)
Constructs a new multiple bundle.- Parameters:
specificMultilang
- the localized messagesspecificIcons
- the iconslanguage
- the language of the localized resources.
-
MultiSilverpeasBundle
public MultiSilverpeasBundle(org.silverpeas.kernel.bundle.LocalizationBundle specificMultilang, org.silverpeas.kernel.bundle.SettingBundle specificIcons, org.silverpeas.kernel.bundle.SettingBundle specificSettings, String language)
Constructs a new multiple bundle.- Parameters:
specificMultilang
- the localized messagesspecificIcons
- the iconsspecificSettings
- the settingslanguage
- the language of the localized resources.
-
MultiSilverpeasBundle
public MultiSilverpeasBundle(org.silverpeas.kernel.bundle.LocalizationBundle specificMultilang, String language)
Constructs a new multiple bundle.- Parameters:
specificMultilang
- the localized messageslanguage
- the language of the localized resources.
-
-
Method Detail
-
getMultilangBundle
public ResourceBundle getMultilangBundle()
Return the ResourceBundle for usage in JSTL.- Returns:
- the ResourceBundle.
-
getIconsBundle
public org.silverpeas.kernel.bundle.SettingBundle getIconsBundle()
Return the icons settings.- Returns:
- the SettingBundle.
-
getString
public String getString(String key)
- Parameters:
key
- - key in the multilang file- Returns:
- the value of the key according to the key. If key starts with "GML.", we look at in the general multilang. Else, we look at in the component multilang
-
getLanguage
public String getLanguage()
-
getSetting
public String getSetting(String key)
We look at the key in the specific settings file.- Parameters:
key
- - key in the settings file- Returns:
- the value of the key if the key exists and if a value is specified. null otherwise.
-
getSetting
public boolean getSetting(String key, boolean defaultValue)
-
getSetting
public int getSetting(String key, int defaultValue)
-
getOutputDate
public String getOutputDate(String dateDB) throws ParseException
- Throws:
ParseException
-
getOutputDateAndHour
public String getOutputDateAndHour(Date date, Date defaultDate)
Display first not null date- Parameters:
date
- date to displaydefaultDate
- extra date to display if date1 is empty (or null)- Returns:
- the formatted date
-
getInputDate
public String getInputDate(String dateDB) throws ParseException
- Throws:
ParseException
-
getDBDate
public String getDBDate(String date) throws ParseException
- Throws:
ParseException
-
getDate
public Date getDate(String date) throws ParseException
- Throws:
ParseException
-
-