org.apache.jetspeed.modules.actions.portlets
Class LogfileViewerAction

java.lang.Object
  extended byorg.apache.turbine.modules.Assembler
      extended byorg.apache.turbine.modules.Action
          extended byorg.apache.turbine.modules.ActionEvent
              extended byorg.apache.jetspeed.modules.actions.portlets.PortletActionEvent
                  extended byorg.apache.jetspeed.modules.actions.portlets.PortletAction
                      extended byorg.apache.jetspeed.modules.actions.portlets.GenericMVCAction
                          extended byorg.apache.jetspeed.modules.actions.portlets.LogfileViewerAction

public class LogfileViewerAction
extends GenericMVCAction

This class is the action class for a portlet that lets you view the Log4J logfiles defined in your Jetspeed installation.
the portlet iterates through the Log4J appender defined that are of type FileAppender or its subclasses, and lists the filenames in a listbox.
The portlet puts the following in the context:
appenders - a HashMap with the appenders found
files - a HashMap with the filenames without path
logfile - the content of the file indicated by selectedfile

Version:
$Id: LogfileViewerAction.java,v 1.3 2004/02/23 02:56:58 jford Exp $
Author:
Harald Ommang

Field Summary
 
Fields inherited from class org.apache.turbine.modules.ActionEvent
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Constructor Summary
LogfileViewerAction()
          Creates a new instance of LogFileViewerAction
 
Method Summary
protected  void buildNormalContext(Portlet portlet, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
          Lists the current logfiles
 void doUpdate(org.apache.turbine.util.RunData data, org.apache.velocity.context.Context context)
          If a file is selected, it's contents is put in "logfile"
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.GenericMVCAction
buildConfigureContext, buildMaximizedContext, checkAdministrativeAction, doPerform, getAttribute, getAttribute, getPortletInstance, perform, setAttribute
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletAction
doPerform, getContext, getPortlet, getTemplate, resetTemplate, setTemplate, setTemplate
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletActionEvent
executeEvents, fireEvent
 
Methods inherited from class org.apache.turbine.modules.ActionEvent
executeEvents, formatString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogfileViewerAction

public LogfileViewerAction()
Creates a new instance of LogFileViewerAction

Method Detail

buildNormalContext

protected void buildNormalContext(Portlet portlet,
                                  org.apache.velocity.context.Context context,
                                  org.apache.turbine.util.RunData rundata)
                           throws java.lang.Exception
Lists the current logfiles

Overrides:
buildNormalContext in class GenericMVCAction
Parameters:
portlet - The current portlet
context - the current portlet context
Throws:
java.lang.Exception

doUpdate

public void doUpdate(org.apache.turbine.util.RunData data,
                     org.apache.velocity.context.Context context)
If a file is selected, it's contents is put in "logfile"

Parameters:
context - the current portlet context


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.