|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet org.apache.jetspeed.portlet.Portlet org.apache.jetspeed.portlet.PortletAdapter com.ibm.wps.pb.wrapper.PortletWrapperBase com.ibm.wps.pb.wrapper.PortletWrapper
public class PortletWrapper
The actual wrapper code for the application portlet is contained in the base class
PortletWrapperBase
. This class only implements the abstract method instantiateApplicationPortlet
to instantiate and return the application portlet class.
Sometimes, the application programmer may need to extend this class and use the extended
class in place of this class. An example of this is when the application portlet implements
PortletTitleListener
. The wrapper code provided as part of the runtime does not
implement this interface, so the extended wrapper must implement the interface in this case.
The application portlet must extend this class, implement PortletTitleListener
and the doTitle()
method in the extension, and use this as the wrapper class in web.xml.
An example code snippet is shown below:
package com.myco.mywrapper;
import org.apache.jetspeed.portlet.*;
public class MyPortletWrapper extends com.ibm.wps.pb.wrapper.PortletWrapper
implements PortletTitleListener
{
Portlet appPortlet_ = null;
public void doTitle(PortletRequest request, PortletResponse response)
throws PortletException, IOException
{
Portlet appPortlet_ = getApplicationPortlet();
((PortletTitleListener)appPortlet_).doTitle(request, response);
}
}
To specify the new wrapper portlet in the web.xml, change the standard wrapper for cooperative portlets:
<servlet-class>com.ibm.wps.pb.wrapper.PortletWrapper</servlet-class>
to the new wrapper class:
<servlet-class>com.myco.mywrapper.MyPortletWrapper</servlet-class>
PortletWrapperBase
,
PortletTitleListener
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.jetspeed.portlet.Portlet |
---|
org.apache.jetspeed.portlet.Portlet.Mode, org.apache.jetspeed.portlet.Portlet.ModeModifier |
Constructor Summary | |
---|---|
PortletWrapper()
Deprecated. |
Method Summary | |
---|---|
java.lang.Object |
instantiateApplicationPortlet(java.lang.String _appPortletClassName)
Deprecated. This method is marked final as it must not be overridden. |
Methods inherited from class com.ibm.wps.pb.wrapper.PortletWrapperBase |
---|
actionPerformed, attributeAdded, attributeAdded, attributeRemoved, attributeRemoved, attributeReplaced, attributeReplaced, beginEventPhase, beginPage, destroyConcrete, endEventPhase, endPage, getApplicationPortlet, getLastModified, init, initConcrete, login, logout, messageReceived, service, setProperties, windowClosed, windowClosing, windowDetached, windowMaximized, windowMinimized, windowRestored |
Methods inherited from class org.apache.jetspeed.portlet.PortletAdapter |
---|
destroy, doConfigure, doEdit, doHelp, doView, getPortletConfig, getPortletLog, getVariable, removeVariable, setVariable |
Methods inherited from class org.apache.jetspeed.portlet.Portlet |
---|
destroy, doGet, doPost, doPut, getId, getInitParameter, getInitParameterNames, getLastModified, getPortletSettings, getServletContext, getServletInfo, init, service |
Methods inherited from class com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet |
---|
getSharingPolicy, service |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doTrace |
Methods inherited from class javax.servlet.GenericServlet |
---|
getServletConfig, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PortletWrapper()
Method Detail |
---|
public final java.lang.Object instantiateApplicationPortlet(java.lang.String _appPortletClassName) throws java.lang.Exception
instantiateApplicationPortlet
in class com.ibm.wps.pb.wrapper.PortletWrapperBase
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |