org.apache.portals.bridges.perl
Class PerlPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.apache.portals.bridges.perl.PerlPortlet
All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig

public class PerlPortlet
extends javax.portlet.GenericPortlet

This portlet is executes a Perl/cgi files in a portlet. Note: The Perl Portlet uses the rewriter component that requires config xml files. Make sre that the portlet application using the Perl Portlet has the following files included in WEB-INF/conf: rewriter-rules-mapping.xml and default-rewriter-rules.xml

Version:
$Id: PerlPortlet.java 517068 2007-03-12 01:44:37Z ate $
Author:
Roger Ruttimann

Field Summary
 String defaultEncoding
          Default encoding
static String PARAM_APPLICATION
          PARAM_APPLICATION ApplicationName identifies the caller so that the portlet only refreshes content that was supposed for the portlet.
static String PARAM_DEMO_MODE
          DemoMode on or off
static String PARAM_PERL_SCRIPT
          INIT parameters required by the Perl Portlet:PerlScript, ScriptPath, DemoMode Name of the scrip to to execute
static String PARAM_SCRIPT_PATH
          Name of the Script Path where the perl scripts (among others) are located
 
Constructor Summary
PerlPortlet()
           
 
Method Summary
 void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          doView Executes the perl script that is defined by the property PerlScript.
protected  byte[] doWebContent(StringBuffer perlRenderedPage, javax.portlet.PortletURL actionURL, String actionParameterName)
           
 void init(javax.portlet.PortletConfig config)
           
 void processAction(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
          processAction() Checks action initiated by the perl portlet (invoking other perl scripts)
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doDispatch, doEdit, doHelp, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_PERL_SCRIPT

public static final String PARAM_PERL_SCRIPT
INIT parameters required by the Perl Portlet:PerlScript, ScriptPath, DemoMode Name of the scrip to to execute

See Also:
Constant Field Values

PARAM_SCRIPT_PATH

public static final String PARAM_SCRIPT_PATH
Name of the Script Path where the perl scripts (among others) are located

See Also:
Constant Field Values

PARAM_DEMO_MODE

public static final String PARAM_DEMO_MODE
DemoMode on or off

See Also:
Constant Field Values

PARAM_APPLICATION

public static final String PARAM_APPLICATION
PARAM_APPLICATION ApplicationName identifies the caller so that the portlet only refreshes content that was supposed for the portlet. If the application name is undefined the portlet will process the request. If you have more than one perl-portlet for the same user/session all the portlets will be refreshed with the same content.

See Also:
Constant Field Values

defaultEncoding

public String defaultEncoding
Default encoding

Constructor Detail

PerlPortlet

public PerlPortlet()
Method Detail

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException

processAction

public void processAction(javax.portlet.ActionRequest actionRequest,
                          javax.portlet.ActionResponse actionResponse)
                   throws javax.portlet.PortletException,
                          IOException
processAction() Checks action initiated by the perl portlet (invoking other perl scripts)

Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class javax.portlet.GenericPortlet
Parameters:
actionRequest -
actionResponse -
Throws:
javax.portlet.PortletException
IOException

doView

public void doView(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
doView Executes the perl script that is defined by the property PerlScript. If the incoming request has the query perl-script= defined this script will be executed.

Overrides:
doView in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
IOException

doWebContent

protected byte[] doWebContent(StringBuffer perlRenderedPage,
                              javax.portlet.PortletURL actionURL,
                              String actionParameterName)
                       throws javax.portlet.PortletException
Throws:
javax.portlet.PortletException


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.