com.ibm.wps.pb.wrapper
Class PortletWrapper

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet
              extended by org.apache.jetspeed.portlet.Portlet
                  extended by org.apache.jetspeed.portlet.PortletAdapter
                      extended by com.ibm.wps.pb.wrapper.PortletWrapperBase
                          extended by com.ibm.wps.pb.wrapper.PortletWrapper
All Implemented Interfaces:
com.ibm.websphere.servlet.cache.CacheableServlet, PropertyListener, EventPhaseListener, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.apache.jetspeed.portlet.event.ActionListener, org.apache.jetspeed.portlet.event.MessageListener, org.apache.jetspeed.portlet.event.PortletApplicationSettingsAttributesListener, org.apache.jetspeed.portlet.event.WindowListener, org.apache.jetspeed.portlet.PortletPageListener, org.apache.jetspeed.portlet.PortletSessionListener

Deprecated. since 6.0.2 Support of the IBM portlet API may be removed in a future release of WebSphere Portal. Use of the Java Portlet API (javax.portlet) is recommended instead.

public class PortletWrapper
extends com.ibm.wps.pb.wrapper.PortletWrapperBase

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>

Since:
5.1.0.1
See Also:
PortletWrapperBase, PortletTitleListener, Serialized Form

Nested 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

PortletWrapper

public PortletWrapper()
Deprecated. 
Method Detail

instantiateApplicationPortlet

public final java.lang.Object instantiateApplicationPortlet(java.lang.String _appPortletClassName)
                                                     throws java.lang.Exception
Deprecated. 
This method is marked final as it must not be overridden.

Specified by:
instantiateApplicationPortlet in class com.ibm.wps.pb.wrapper.PortletWrapperBase
Throws:
java.lang.Exception