com.ibm.wps.pb.wrapper
Class PortletWrapper

java.lang.Object
  extended by 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:
PropertyListener, EventPhaseListener, ActionListener, MessageListener, PortletApplicationSettingsAttributesListener, WindowListener, PortletPageListener, 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 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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jetspeed.portlet.Portlet
Portlet.Mode, 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, getPortletSettings, getServletContext, getServletInfo
 
Methods inherited from class com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet
getSharingPolicy
 
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 PortletWrapperBase
Parameters:
_appPortletClassName - the name of the class to be instantiated
Returns:
an instance of the class
Throws:
java.lang.Exception - if the class cannot be instantiated