com.ibm.ccd.ui.portlets
Class BasePortlet

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.ccd.ui.portlets.BasePortlet
All Implemented Interfaces:
com.ibm.websphere.servlet.cache.CacheableServlet, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.apache.jetspeed.portlet.PortletSessionListener
Direct Known Subclasses:
AdminPortlet, AlertPortlet, BaseSearchPortlet, BusinessProcessPortlet, DownloadPortlet, FileUploadPortlet, ItemCatalogPortlet, MassUpdatePortlet, QuickSearchPortlet, TransactionDisplayPortlet, UserApprovalPortlet, UserContextPortlet, UserRegistrationPortlet, VersionInfoPortlet, WorkwithItemPortlet

public abstract class BasePortlet
extends org.apache.jetspeed.portlet.PortletAdapter

BasePortlet is abstract Class of all Portlets. All common methods should reside here.

See Also:
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
 
Field Summary
protected static IAlertsDataSource alertDataSource
           
protected static org.apache.jetspeed.portlet.PortletLog log
           
 
Constructor Summary
BasePortlet()
           
 
Method Summary
protected  void addTransaction(java.lang.String transactionId, java.lang.String description, WPSContext context)
          For adding transaction
protected  void addTransaction(java.lang.String transactionId, WPSContext context)
           
static java.lang.String createCommand(org.apache.jetspeed.portlet.PortletURI portletURI, java.lang.String actionString)
           
static java.lang.String createCommand(org.apache.jetspeed.portlet.PortletURI portletURI, java.lang.String actionString, java.lang.String paramkey, java.lang.String paramValue)
           
protected  WPSContext createContext(org.apache.jetspeed.portlet.PortletRequest request)
           
 void doHelp(org.apache.jetspeed.portlet.PortletRequest portletRequest, org.apache.jetspeed.portlet.PortletResponse portletResponse)
           
 MessageMap getMessageMap(org.apache.jetspeed.portlet.PortletRequest portletRequest)
          getMessageMap:Method returns MessageMap after setting it in Request object
protected  java.lang.String[] getReqParamArray(org.apache.jetspeed.portlet.PortletRequest request, java.lang.String strKey)
          Always returns ItemArray with one or multiple item ids.
 java.lang.String getTextLabel(org.apache.jetspeed.portlet.PortletRequest portletRequest, java.lang.String key)
           
 java.lang.String getTextMessages(org.apache.jetspeed.portlet.PortletRequest portletRequest, java.lang.String key)
           
protected  WPSContext getWPSContext(org.apache.jetspeed.portlet.PortletRequest request)
          This method retrives WPCUser from PortletSession
protected  void handleException(WPCMediatorException mediatorException, org.apache.jetspeed.portlet.PortletRequest request)
           
 void init(org.apache.jetspeed.portlet.PortletConfig portletConfig)
           
protected abstract  void setBusinessFunction(org.apache.jetspeed.portlet.PortletRequest portletRequest)
          setBusinessFunction: All Portlets should override this method to set the business function in session variable() (SESSION_BUS_FUNCT)
 
Methods inherited from class org.apache.jetspeed.portlet.PortletAdapter
destroy, destroyConcrete, doConfigure, doEdit, doView, getLastModified, getPortletConfig, getPortletLog, getVariable, initConcrete, login, logout, removeVariable, service, 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
 

Field Detail

log

protected static org.apache.jetspeed.portlet.PortletLog log

alertDataSource

protected static IAlertsDataSource alertDataSource
Constructor Detail

BasePortlet

public BasePortlet()
Method Detail

init

public void init(org.apache.jetspeed.portlet.PortletConfig portletConfig)
          throws org.apache.jetspeed.portlet.UnavailableException
Overrides:
init in class org.apache.jetspeed.portlet.PortletAdapter
Throws:
org.apache.jetspeed.portlet.UnavailableException
See Also:
Portlet.init(PortletConfig)

getMessageMap

public MessageMap getMessageMap(org.apache.jetspeed.portlet.PortletRequest portletRequest)
getMessageMap:Method returns MessageMap after setting it in Request object

Parameters:
portletRequest - PortletRequest

setBusinessFunction

protected abstract void setBusinessFunction(org.apache.jetspeed.portlet.PortletRequest portletRequest)
setBusinessFunction: All Portlets should override this method to set the business function in session variable() (SESSION_BUS_FUNCT)

Parameters:
portletRequest -

getTextLabel

public java.lang.String getTextLabel(org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                     java.lang.String key)
Parameters:
portletRequest -
key -
Returns:
string

getTextMessages

public java.lang.String getTextMessages(org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                        java.lang.String key)
Parameters:
portletRequest -
key -
Returns:
string

addTransaction

protected void addTransaction(java.lang.String transactionId,
                              WPSContext context)
Parameters:
transactionId -
context -

addTransaction

protected void addTransaction(java.lang.String transactionId,
                              java.lang.String description,
                              WPSContext context)
For adding transaction

Parameters:
transactionId -
description -
context -

createCommand

public static java.lang.String createCommand(org.apache.jetspeed.portlet.PortletURI portletURI,
                                             java.lang.String actionString)

handleException

protected void handleException(WPCMediatorException mediatorException,
                               org.apache.jetspeed.portlet.PortletRequest request)

getWPSContext

protected WPSContext getWPSContext(org.apache.jetspeed.portlet.PortletRequest request)
This method retrives WPCUser from PortletSession

Returns:
WPCUser contains wpc login info

createContext

protected WPSContext createContext(org.apache.jetspeed.portlet.PortletRequest request)

createCommand

public static java.lang.String createCommand(org.apache.jetspeed.portlet.PortletURI portletURI,
                                             java.lang.String actionString,
                                             java.lang.String paramkey,
                                             java.lang.String paramValue)

getReqParamArray

protected java.lang.String[] getReqParamArray(org.apache.jetspeed.portlet.PortletRequest request,
                                              java.lang.String strKey)
Always returns ItemArray with one or multiple item ids.

Parameters:
request -
strKey -
Returns:
strings

doHelp

public void doHelp(org.apache.jetspeed.portlet.PortletRequest portletRequest,
                   org.apache.jetspeed.portlet.PortletResponse portletResponse)
            throws org.apache.jetspeed.portlet.PortletException,
                   java.io.IOException
Overrides:
doHelp in class org.apache.jetspeed.portlet.PortletAdapter
Throws:
org.apache.jetspeed.portlet.PortletException
java.io.IOException