public abstract class PortletApplicationContextUtils extends Object
ContextLoader,
WebApplicationContextUtils,
FrameworkPortlet,
DispatcherPortlet| Constructor and Description |
|---|
PortletApplicationContextUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ApplicationContext |
getRequiredWebApplicationContext(javax.portlet.PortletContext pc)
Find the root WebApplicationContext for this portlet application, which is
typically loaded via ContextLoaderListener or ContextLoaderServlet.
|
static ApplicationContext |
getWebApplicationContext(javax.portlet.PortletContext pc)
Find the root WebApplicationContext for this portlet application, which is
typically loaded via ContextLoaderListener or ContextLoaderServlet.
|
static void |
initPortletPropertySources(MutablePropertySources propertySources,
javax.servlet.ServletContext servletContext,
javax.portlet.PortletContext portletContext,
javax.portlet.PortletConfig portletConfig)
Replace
Servlet- and Portlet-based stub property sources
with actual instances populated with the given context and config objects. |
public static ApplicationContext getWebApplicationContext(javax.portlet.PortletContext pc)
Will rethrow an exception that happened on root context startup, to differentiate between a failed context startup and no context at all.
pc - PortletContext to find the web application context fornull if none
(typed to ApplicationContext to avoid a Servlet API dependency; can usually
be casted to WebApplicationContext, but there shouldn't be a need to)WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTEpublic static ApplicationContext getRequiredWebApplicationContext(javax.portlet.PortletContext pc) throws IllegalStateException
Will rethrow an exception that happened on root context startup, to differentiate between a failed context startup and no context at all.
pc - PortletContext to find the web application context forIllegalStateException - if the root WebApplicationContext could not be foundWebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTEpublic static void initPortletPropertySources(MutablePropertySources propertySources, javax.servlet.ServletContext servletContext, javax.portlet.PortletContext portletContext, javax.portlet.PortletConfig portletConfig)
Servlet- and Portlet-based stub property sources
with actual instances populated with the given context and config objects.Copyright © 2013. All Rights Reserved.