com.ibm.wps.pb.wrapper
Class PortletWrapper

java.lang.Object
  extended by PortletWrapperBase
      extended by com.ibm.wps.pb.wrapper.PortletWrapper

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 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:
com.ibm.wps.pb.wrapper.PortletWrapperBase, org.apache.jetspeed.portlet.PortletTitleListener

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 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.

Throws:
java.lang.Exception