java.lang.Object | |||||
↳ | org.springframework.core.io.DefaultResourceLoader | ||||
↳ | org.springframework.context.support.AbstractApplicationContext | ||||
↳ | org.springframework.context.support.AbstractRefreshableApplicationContext | ||||
↳ | org.springframework.context.support.AbstractRefreshableConfigApplicationContext | ||||
↳ | org.springframework.web.portlet.context.AbstractRefreshablePortletApplicationContext |
Known Direct Subclasses |
AbstractRefreshableApplicationContext
subclass which implements the ConfigurablePortletApplicationContext
interface for portlet environments. Provides a "configLocations" property,
to be populated through the ConfigurablePortletApplicationContext interface
on portlet application startup.
This class is as easy to subclass as AbstractRefreshableApplicationContext:
All you need to implements is the loadBeanDefinitions(DefaultListableBeanFactory)
method;
see the superclass javadoc for details. Note that implementations are supposed
to load bean definitions from the files specified by the locations returned
by the getConfigLocations()
method.
Interprets resource paths as servlet context resources, i.e. as paths beneath
the web application root. Absolute paths, e.g. for files outside the web app root,
can be accessed via "file:" URLs, as implemented by
DefaultResourceLoader
.
This is the portlet context to be subclassed for a different bean definition format.
Such a context implementation can be specified as "contextClass" init-param
for FrameworkPortlet, replacing the default XmlPortletApplicationContext
.
It will then automatically receive the "contextConfigLocation" init-param.
Note that Portlet-based context implementations are generally supposed
to configure themselves based on the configuration received through the
ConfigurablePortletApplicationContext
interface. In contrast, a standalone
application context might allow for configuration in custom startup code
(for example, GenericApplicationContext
).
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.context.support.AbstractApplicationContext
| |||||||||||
From interface
org.springframework.beans.factory.BeanFactory
| |||||||||||
From interface
org.springframework.context.ConfigurableApplicationContext
| |||||||||||
From interface
org.springframework.core.io.ResourceLoader
| |||||||||||
From interface
org.springframework.core.io.support.ResourcePatternResolver
| |||||||||||
From interface
org.springframework.web.context.WebApplicationContext
| |||||||||||
From interface
org.springframework.web.portlet.context.ConfigurablePortletApplicationContext
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.context.support.AbstractApplicationContext
| |||||||||||
From interface
org.springframework.web.context.WebApplicationContext
| |||||||||||
From interface
org.springframework.web.portlet.context.ConfigurablePortletApplicationContext
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return an array of resource locations, referring to the XML bean definition
files that this context should be built with.
| |||||||||||
Return the namespace for this web application context, if any.
| |||||||||||
Return the PortletConfig for this portlet application context, if any.
| |||||||||||
Return the standard Portlet API PortletContext for this application.
| |||||||||||
Return the standard Servlet API ServletContext for this application.
| |||||||||||
Set the namespace for this portlet application context,
to be used for building a default context config location.
| |||||||||||
Set the parent of this application context.
| |||||||||||
Set the PortletConfig for this portlet application context.
| |||||||||||
Set the PortletContext for this portlet application context.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create and return a new
DefaultPortletEnvironment . | |||||||||||
Customize the internal bean factory used by this context.
| |||||||||||
This implementation supports file paths beneath the root of the PortletContext.
| |||||||||||
This implementation supports pattern matching in unexpanded WARs too.
| |||||||||||
Register request/session scopes, a
PortletContextAwareProcessor , etc. |
Return an array of resource locations, referring to the XML bean definition files that this context should be built with. Can also include location patterns, which will get resolved via a ResourcePatternResolver.
The default implementation returns null
. Subclasses can override
this to provide a set of resource locations to load bean definitions from.
null
if noneReturn the PortletConfig for this portlet application context, if any.
Return the standard Portlet API PortletContext for this application.
Return the standard Servlet API ServletContext for this application.
Also available for a Portlet application, in addition to the PortletContext.
Set the namespace for this portlet application context, to be used for building a default context config location.
Set the parent of this application context.
Note that the parent shouldn't be changed: It should only be set outside a constructor if it isn't available when an object of this class is created, for example in case of WebApplicationContext setup.
parent | the parent context |
---|
Set the PortletConfig for this portlet application context.
Set the PortletContext for this portlet application context.
Does not cause an initialization of the context: refresh needs to be called after the setting of all configuration properties.
Create and return a new DefaultPortletEnvironment
.
Customize the internal bean factory used by this context.
Called for each refresh()
attempt.
The default implementation applies this context's
"allowBeanDefinitionOverriding"
and "allowCircularReferences"
settings,
if specified. Can be overridden in subclasses to customize any of
DefaultListableBeanFactory
's settings.
beanFactory | the newly created bean factory for this context |
---|
This implementation supports file paths beneath the root of the PortletContext.
path | the path to the resource |
---|
This implementation supports pattern matching in unexpanded WARs too.
Register request/session scopes, a PortletContextAwareProcessor
, etc.
beanFactory | the bean factory used by the application context |
---|