Package org.omnifaces.config
Class OmniFaces
- java.lang.Object
-
- org.omnifaces.config.OmniFaces
-
public final class OmniFaces extends Object
Collection of constants and utility methods for OmniFaces internals.- Since:
- 2.5
- Author:
- Bauke Scholtz
-
-
Field Summary
Fields Modifier and Type Field Description static StringOMNIFACES_DYNAMIC_FORM_IDReturns the "omnifaces_form" ID of dynamic form.static StringOMNIFACES_EVENT_PARAM_NAMEReturns the "omnifaces.event" request parameter name.static StringOMNIFACES_LIBRARY_NAMEReturns the "omnifaces" resource library name.static StringOMNIFACES_SCRIPT_NAMEReturns the "omnifaces.js" main script name.static StringPARAM_NAME_SKIP_DEPLOYMENT_EXCEPTIONThe boolean context parameter name to skip any OmniFaces deployment exception.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetMessage(String key)Returns resource bundle message associated with given key from application message bundle as identified by<message-bundle>infaces-config.xml, or if it is absent, then return it from OmniFaces internalorg.omnifaces.messagesbundle.static longgetStartupTime()Returns startup time in Epoch milli.static StringgetVersion()Returns OmniFaces version.static booleanisSnapshot()Returns whether current OmniFaces version is a SNAPSHOT or RC version.static booleanskipDeploymentException(ServletContext servletContext)Returns whether the context parameter "org.omnifaces.SKIP_DEPLOYMENT_EXCEPTION" is set totrue.
-
-
-
Field Detail
-
OMNIFACES_LIBRARY_NAME
public static final String OMNIFACES_LIBRARY_NAME
Returns the "omnifaces" resource library name.- See Also:
- Constant Field Values
-
OMNIFACES_SCRIPT_NAME
public static final String OMNIFACES_SCRIPT_NAME
Returns the "omnifaces.js" main script name.- See Also:
- Constant Field Values
-
OMNIFACES_EVENT_PARAM_NAME
public static final String OMNIFACES_EVENT_PARAM_NAME
Returns the "omnifaces.event" request parameter name.- See Also:
- Constant Field Values
-
OMNIFACES_DYNAMIC_FORM_ID
public static final String OMNIFACES_DYNAMIC_FORM_ID
Returns the "omnifaces_form" ID of dynamic form.- See Also:
- Constant Field Values
-
PARAM_NAME_SKIP_DEPLOYMENT_EXCEPTION
public static final String PARAM_NAME_SKIP_DEPLOYMENT_EXCEPTION
The boolean context parameter name to skip any OmniFaces deployment exception. If this is set totrue, then any exception thrown byApplicationInitializer,ApplicationListenerandApplicationProcessorwill be suppressed and won't anymore block the deployment of the web application.- Since:
- 3.14
- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersion
public static String getVersion()
Returns OmniFaces version. This is extracted from Implementation-Version field of /META-INF/MANIFEST.MF file of omnifaces.jar file. Release versions will return version in format3.4.2. Snapshot versions will return version in format3.4.2-SNAPSHOT. Local development versions (because MANIFEST.MF entry is missing) will return version in formatDEV-SNAPSHOT.- Returns:
- OmniFaces version.
-
isSnapshot
public static boolean isSnapshot()
Returns whether current OmniFaces version is a SNAPSHOT or RC version.- Returns:
- Whether current OmniFaces version is a SNAPSHOT or RC version.
-
getStartupTime
public static long getStartupTime()
Returns startup time in Epoch milli.- Returns:
- Startup time in Epoch milli.
-
getMessage
public static String getMessage(String key)
Returns resource bundle message associated with given key from application message bundle as identified by<message-bundle>infaces-config.xml, or if it is absent, then return it from OmniFaces internalorg.omnifaces.messagesbundle.- Parameters:
key- The message bundle key.- Returns:
- Resource bundle message associated with given key.
-
skipDeploymentException
public static boolean skipDeploymentException(ServletContext servletContext)
Returns whether the context parameter "org.omnifaces.SKIP_DEPLOYMENT_EXCEPTION" is set totrue. If this is set totrue, then any exception thrown byApplicationInitializer,ApplicationListenerandApplicationProcessorwill be suppressed and won't anymore block the deployment of the web application.- Parameters:
servletContext- The involved servlet context.- Returns:
- whether the context parameter "org.omnifaces.SKIP_DEPLOYMENT_EXCEPTION" is set to
true. - Since:
- 3.14
-
-