public enum FacesConfigXml extends Enum<FacesConfigXml>
This configuration enum parses the /WEB-INF/faces-config.xml
and all
/META-INF/faces-config.xml
files found in the classpath and offers methods to obtain information from
them which is not available by the standard JSF API.
Some examples:
// Get a mapping of all <resource-bundle> vars and base names. Map<String, String> resourceBundles = FacesConfigXml.INSTANCE.getResourceBundles();
// Get an ordered list of all <supported-locale> values with <default-locale> as first item. List<Locale> supportedLocales = FacesConfigXml.INSTANCE.getSupportedLocales();
Enum Constant and Description |
---|
INSTANCE
Returns the lazily loaded enum singleton instance.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getResourceBundles()
Returns a mapping of all resource bundle base names by var.
|
List<Locale> |
getSupportedLocales()
Returns an ordered list of all supported locales on this application, with the default locale as the first
item, if any.
|
static FacesConfigXml |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FacesConfigXml[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FacesConfigXml INSTANCE
public static FacesConfigXml[] values()
for (FacesConfigXml c : FacesConfigXml.values()) System.out.println(c);
public static FacesConfigXml valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Map<String,String> getResourceBundles()
public List<Locale> getSupportedLocales()
faces-config.xml
.Application.getDefaultLocale()
,
Application.getSupportedLocales()
Copyright © 2012–2017 OmniFaces. All rights reserved.