java.lang.Object | |||||
↳ | org.springframework.context.support.ApplicationObjectSupport | ||||
↳ | org.springframework.web.portlet.context.PortletApplicationObjectSupport | ||||
↳ | org.springframework.web.portlet.handler.PortletContentGenerator | ||||
↳ | org.springframework.web.portlet.mvc.AbstractController | ||||
↳ | org.springframework.web.portlet.mvc.PortletWrappingController |
Controller
implementation that wraps a portlet instance which it manages
internally. Such a wrapped portlet is not known outside of this controller;
its entire lifecycle is covered here.
Useful to invoke an existing portlet via Spring's dispatching infrastructure,
for example to apply Spring
HandlerInterceptors
to its requests.
Example:
<bean id="wrappingController" class="org.springframework.web.portlet.mvc.PortletWrappingController"> <property name="portletClass"> <value>org.springframework.web.portlet.sample.HelloWorldPortlet</value> </property> <property name="portletName"> <value>hello-world</value> </property> <property name="initParameters"> <props> <prop key="config">/WEB-INF/hello-world-portlet-config.xml</prop> </props> </property> </bean>
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.context.support.ApplicationObjectSupport
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
| |||||||||||
Invoked by a BeanFactory on destruction of a singleton.
| |||||||||||
Process the event request.
| |||||||||||
Process the resource request and return a ModelAndView object which the DispatcherPortlet
will render.
| |||||||||||
Set the name of the bean in the bean factory that created this bean.
| |||||||||||
Specify init parameters for the portlet to wrap,
as name-value pairs.
| |||||||||||
Set the class of the Portlet to wrap.
| |||||||||||
Set the PortletConfigthat this object runs in.
| |||||||||||
Set the PortletContext that this object runs in.
| |||||||||||
Set the name of the Portlet to wrap.
| |||||||||||
Set whether to use the shared PortletConfig object passed in
through
setPortletConfig , if available. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Subclasses are meant to override this method if the controller
is expected to handle action requests.
| |||||||||||
Subclasses are meant to override this method if the controller
is expected to handle render requests.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.portlet.mvc.AbstractController
| |||||||||||
From class
org.springframework.web.portlet.handler.PortletContentGenerator
| |||||||||||
From class
org.springframework.web.portlet.context.PortletApplicationObjectSupport
| |||||||||||
From class
org.springframework.context.support.ApplicationObjectSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.BeanNameAware
| |||||||||||
From interface
org.springframework.beans.factory.DisposableBean
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.context.ApplicationContextAware
| |||||||||||
From interface
org.springframework.web.portlet.context.PortletConfigAware
| |||||||||||
From interface
org.springframework.web.portlet.context.PortletContextAware
| |||||||||||
From interface
org.springframework.web.portlet.mvc.Controller
| |||||||||||
From interface
org.springframework.web.portlet.mvc.EventAwareController
| |||||||||||
From interface
org.springframework.web.portlet.mvc.ResourceAwareController
|
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
Exception |
---|
Invoked by a BeanFactory on destruction of a singleton.
Process the event request. There is nothing to return.
request | current portlet event request |
---|---|
response | current portlet event response |
Exception |
---|
Process the resource request and return a ModelAndView object which the DispatcherPortlet
will render. A null
return value is not an error: It indicates that this
object completed request processing itself, thus there is no ModelAndView to render.
request | current portlet resource request |
---|---|
response | current portlet resource response |
Exception |
---|
Set the name of the bean in the bean factory that created this bean.
Invoked after population of normal bean properties but before an
init callback such as afterPropertiesSet()
or a custom init-method.
name | the name of the bean in the factory. Note that this name is the actual bean name used in the factory, which may differ from the originally specified name: in particular for inner bean names, the actual bean name might have been made unique through appending "#..." suffixes. Use the BeanFactoryUtils#originalBeanName(String) method to extract the original bean name (without suffix), if desired. |
---|
Specify init parameters for the portlet to wrap, as name-value pairs.
Set the class of the Portlet to wrap.
Needs to implement javax.portlet.Portlet
.
Set the PortletConfigthat this object runs in.
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked after ApplicationContextAware's setApplicationContext.
portletConfig | PortletConfig object to be used by this object |
---|
Set the PortletContext that this object runs in.
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked after ApplicationContextAware's setApplicationContext.
portletContext | PortletContext object to be used by this object |
---|
Set the name of the Portlet to wrap. Default is the bean name of this controller.
Set whether to use the shared PortletConfig object passed in
through setPortletConfig
, if available.
Default is "true". Turn this setting to "false" to pass in a mock PortletConfig object with the bean name as portlet name, holding the current PortletContext.
Subclasses are meant to override this method if the controller
is expected to handle action requests. The contract is the same as
for handleActionRequest
.
The default implementation throws a PortletException.
Exception |
---|
Subclasses are meant to override this method if the controller
is expected to handle render requests. The contract is the same as
for handleRenderRequest
.
The default implementation throws a PortletException.
Exception |
---|