public class ApplicationSettingsBean extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
STYLE_SHEET_BUNDLE_VAR_NAME
Resource bundle name (var name in faces-config.xml) of style sheet
bundle.
|
Constructor and Description |
---|
ApplicationSettingsBean() |
Modifier and Type | Method and Description |
---|---|
List<javax.faces.model.SelectItem> |
getSupportedLocales()
Gets the supported locales as configured in faces-config.xml.
|
List<javax.faces.model.SelectItem> |
getSupportedStyleSheets()
Gets the supported style sheets.
|
TimeZone |
getTimeZone()
Gets the time zone of the server where this application is running.
|
String |
getTimeZoneAsGmtOffset()
Gets the time zone of the server where this application is running, as an offset to standard GMT (Greenwich Mean Time).
|
boolean |
isSupportedStyleSheet(String styleSheet)
Determines whether the supplied styleSheet is one of the supported style sheets.
|
public static final String STYLE_SHEET_BUNDLE_VAR_NAME
public List<javax.faces.model.SelectItem> getSupportedLocales()
JsfLocaleUtil.getSupportedLocalesAsListItems()
public List<javax.faces.model.SelectItem> getSupportedStyleSheets()
styleSheet1=blue.css styleSheet2=green.cssA localized label should be added for every style sheet by appending "Label" to the key like this:
styleSheet1=blue.css styleSheet1Label=Ocean styleSheet2=green.css styleSheet2Label=EmeraldThe first style sheet in the list is used as the default style sheet.
public boolean isSupportedStyleSheet(String styleSheet)
styleSheet
- The style sheet to check.NullPointerException
- When the supplied styleSheet is null.IllegalArgumentException
- When the supplied styleSheet is empty.public String getTimeZoneAsGmtOffset()
TimeZoneUtil.getGreenwichMeanTimeOffset()
public TimeZone getTimeZone()
Copyright © 2008–2018. All rights reserved.