Skip navigation links


com.openmarket.Satellite.portlet
Class BasePortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by com.openmarket.Satellite.portlet.BasePortlet

All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig
Direct Known Subclasses:
Satellite

public abstract class BasePortlet
extends javax.portlet.GenericPortlet

Abstract implementation of a portlet class that invokes Satellite Server functionality. Application lifecycle is managed by this portlet's init and destroy methods.

Since:
16-May-2005 11:32:12 AM

Constructor Summary
BasePortlet()
           

 

Method Summary
protected abstract  com.openmarket.Satellite.Application constructApp(java.lang.String tempFolder)
          Return a concrete implementation of a Satellite Server application.
 void destroy()
          Destroys the portlet.
protected abstract  java.lang.String getContentType()
          Return the content type to be used for the response if available.
protected  com.openmarket.Satellite.portlet.SSRenderParams getSSRenderParams(javax.portlet.RenderRequest req)
          Get the SSRenderParams object that holds all request parameters that are sent by Satellite Server to Content Server.
 void init(javax.portlet.PortletConfig config)
          Initializes the portlet.
 void processAction(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res)
          It's not possible to override ProcessAction in the satellite portlet.
 void render(javax.portlet.RenderRequest req, javax.portlet.RenderResponse res)
          Render method is called to render the portlet.
protected  void ssProcessAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          This method is called by BasePortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse) and allows for custom logic to occur at the portlet level prior to the execution of the Satellite Server logic.

 

Methods inherited from class javax.portlet.GenericPortlet
doDispatch, doEdit, doHelp, doView, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BasePortlet

public BasePortlet()

Method Detail

constructApp

protected abstract com.openmarket.Satellite.Application constructApp(java.lang.String tempFolder)
                                                              throws com.openmarket.Satellite.ConfigurationException
Return a concrete implementation of a Satellite Server application. This portlet will hold on to the application for its lifecycle.
Parameters:
tempFolder - The temporary folder accessible to this application
Returns:
application instance
Throws:
com.openmarket.Satellite.ConfigurationException - if application construction fails

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Initializes the portlet. Overriding classes must call this method for proper operation with Satellite Server.
Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class javax.portlet.GenericPortlet
Parameters:
config - input Portlet Config object.
Throws:
javax.portlet.PortletException

destroy

public void destroy()
Destroys the portlet. Overriding classes must call this method for proper operation of Satellite Server.
Specified by:
destroy in interface javax.portlet.Portlet
Overrides:
destroy in class javax.portlet.GenericPortlet

processAction

public final void processAction(javax.portlet.ActionRequest req,
                                javax.portlet.ActionResponse res)
It's not possible to override ProcessAction in the satellite portlet. However, this portlet provides default processing for preference setting. Parameters named according to com.fatwire.satellite.param.preference.NAME with the value VALUE will set a portlet preference of name NAME to the value VALUE.
Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class javax.portlet.GenericPortlet
Parameters:
req - the portlet ActionRequest
res - the portlet ActionResponse
See Also:
BasePortlet.ssProcessAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)

ssProcessAction

protected void ssProcessAction(javax.portlet.ActionRequest request,
                               javax.portlet.ActionResponse response)
This method is called by BasePortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse) and allows for custom logic to occur at the portlet level prior to the execution of the Satellite Server logic.
Parameters:
request - ActionRequest
response - ActionResponse

getSSRenderParams

protected final com.openmarket.Satellite.portlet.SSRenderParams getSSRenderParams(javax.portlet.RenderRequest req)
Get the SSRenderParams object that holds all request parameters that are sent by Satellite Server to Content Server. This method can be used, in conjunction with the SSRenderParams.addParameter(java.lang.String, java.lang.String) method in order to set arbitrary parameters such as context parameters, portal user information and other server-specific information into the request object for the use of Content Server when the portlet is rendered.
Parameters:
req - RenderRequest object
Returns:
SSRenderParams object

render

public final void render(javax.portlet.RenderRequest req,
                         javax.portlet.RenderResponse res)
                  throws javax.portlet.PortletException,
                         java.io.IOException
Render method is called to render the portlet. This implementation sets up the Satellite Server application and dispatches control to super#render for regular operation of the portlet. Overriding classes may not override this specific method, but may override #doView, #doHelp, etc. instead.
Specified by:
render in interface javax.portlet.Portlet
Overrides:
render in class javax.portlet.GenericPortlet
Parameters:
req - render request
res - render response
Throws:
javax.portlet.PortletException
java.io.IOException

getContentType

protected abstract java.lang.String getContentType()
Return the content type to be used for the response if available. Some portlets always know their content type in advance, while others only find out part-way through the execution.
Returns:
content type or null

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.