Package org.joinfaces
Class FacesContextUtils
java.lang.Object
org.springframework.web.jsf.FacesContextUtils
org.joinfaces.FacesContextUtils
Extension of Springs own
FacesContextUtils
.-
Method Summary
Modifier and TypeMethodDescriptionstatic WebApplicationContext
getRequiredWebApplicationContext
(ExternalContext externalContext) Find the rootWebApplicationContext
for this web app.static ServletContext
getServletContext
(ExternalContext externalContext) Returns theServletContext
for the givenExternalContext
.static WebApplicationContext
getWebApplicationContext
(ExternalContext externalContext) Find the rootWebApplicationContext
for this web app.Methods inherited from class org.springframework.web.jsf.FacesContextUtils
getRequiredWebApplicationContext, getSessionMutex, getWebApplicationContext
-
Method Details
-
getServletContext
Returns theServletContext
for the givenExternalContext
.- Parameters:
externalContext
- theExternalContext
to find theServletContext
for.- Returns:
- the ServletContext for the given ExternalContext
-
getWebApplicationContext
@Nullable public static WebApplicationContext getWebApplicationContext(ExternalContext externalContext) Find the rootWebApplicationContext
for this web app.- Parameters:
externalContext
- The ExternalContext to find the web application context for- Returns:
- the root WebApplicationContext for this web app, or
null
if none - See Also:
-
getRequiredWebApplicationContext
@NonNull public static WebApplicationContext getRequiredWebApplicationContext(ExternalContext externalContext) Find the rootWebApplicationContext
for this web app.- Parameters:
externalContext
- The ExternalContext to find the web application context for- Returns:
- the root WebApplicationContext for this web app
- See Also:
-