|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.portlet.GenericPortlet
org.springframework.web.portlet.GenericPortletBean
public abstract class GenericPortletBean
Simple extension of javax.portlet.GenericPortlet that treats
its config parameters as bean properties.
A very handy superclass for any type of portlet. Type conversion is automatic. It is also possible for subclasses to specify required properties.
This portlet leaves request handling to subclasses, inheriting the default
behaviour of GenericPortlet (doDispatch, processAction, etc).
This portlet superclass has no dependency on a Spring application context, in contrast to the FrameworkPortlet class which loads its own context.
addRequiredProperty(java.lang.String),
initPortletBean(),
GenericPortlet.doDispatch(javax.portlet.RenderRequest, javax.portlet.RenderResponse),
GenericPortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse),
FrameworkPortlet| Field Summary | |
|---|---|
protected Log |
logger
Logger available to subclasses |
| Constructor Summary | |
|---|---|
GenericPortletBean()
|
|
| Method Summary | |
|---|---|
protected void |
addRequiredProperty(String property)
Subclasses can invoke this method to specify that this property (which must match a JavaBean property they expose) is mandatory, and must be supplied as a config parameter. |
javax.portlet.PortletContext |
getPortletContext()
Overridden method that simply returns null when no
PortletConfig set yet. |
String |
getPortletName()
Overridden method that simply returns null when no
PortletConfig set yet. |
void |
init()
Map config parameters onto bean properties of this portlet, and invoke subclass initialization. |
protected void |
initBeanWrapper(BeanWrapper bw)
Initialize the BeanWrapper for this GenericPortletBean, possibly with custom editors. |
protected void |
initPortletBean()
Subclasses may override this to perform custom initialization. |
| Methods inherited from class javax.portlet.GenericPortlet |
|---|
destroy, doDispatch, doEdit, doHelp, doView, getInitParameter, getInitParameterNames, getPortletConfig, getResourceBundle, getTitle, init, processAction, render |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Log logger
| Constructor Detail |
|---|
public GenericPortletBean()
| Method Detail |
|---|
protected final void addRequiredProperty(String property)
property - name of the required property
public final void init()
throws javax.portlet.PortletException
init in class javax.portlet.GenericPortletjavax.portlet.PortletException - if bean properties are invalid (or required
properties are missing), or if subclass initialization fails.
protected void initBeanWrapper(BeanWrapper bw)
throws BeansException
bw - the BeanWrapper to initialize
BeansException - if thrown by BeanWrapper methodsPropertyEditorRegistry.registerCustomEditor(java.lang.Class, java.beans.PropertyEditor)public final String getPortletName()
null when no
PortletConfig set yet.
getPortletName in interface javax.portlet.PortletConfiggetPortletName in class javax.portlet.GenericPortletGenericPortlet.getPortletConfig()public final javax.portlet.PortletContext getPortletContext()
null when no
PortletConfig set yet.
getPortletContext in interface javax.portlet.PortletConfiggetPortletContext in class javax.portlet.GenericPortletGenericPortlet.getPortletConfig()
protected void initPortletBean()
throws javax.portlet.PortletException
javax.portlet.PortletException - if subclass initialization fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||