org.openmdx.application.servlet.log.render
Class HttpConsoleRenderer

java.lang.Object
  extended by org.openmdx.application.servlet.log.render.HttpConsoleRenderer

public class HttpConsoleRenderer
extends Object

Provides the HTML page renderers for the HTTP Console


Field Summary
protected static String ENCODING
          The encoding scheme to be used
 
Constructor Summary
HttpConsoleRenderer()
           
 
Method Summary
static HtmlPageTemplate createHtmlPageTemplate(String contextPath, String servletPath, String htmlTitle)
           
static boolean handleConfigUpdateAction(String appName, String logName, String logLevel, String perfLog, String statLog)
           
static boolean handleLogDownloadAction(String appName, String logName, String entityName, String entityMech, OutputStream outStream)
           
static boolean handleLogMonitorAction(ConsoleContext consoleCtx, String appName, String logName, String entityName, String entityMech)
           
static boolean handleLogMonitorUpdateAction(ConsoleContext consoleCtx, String refresh)
           
static void handleLogRemoteAction(String appid, String cfgname, String logname, String timestamp, String loglevel, String logsource, String hostname, String processid, String threadname, String classname, String methodname, String line, String summary, String detail)
           
static boolean handleLogRemoveAction(String appName, String logName, String entityName, String entityMech)
           
static void handleLogViewAction(PrintWriter writer, ConsoleContext consoleCtx, String contextPath, String servletPath, SimpleDateFormat dateFormatter, String appName, String logName, String entityName, String entityMech, String mode)
           
static void handleLogViewConfigAction(ConsoleContext consoleCtx, String contextPath, String servletPath, String appName, String logName, String entityName, String entityMech, String pageSize, String startPos, String renderer, String logLevel, String performance, String statistics, String notifications)
           
static Config lookupConfig(String cfgName, String logName)
          Looksup for a log Config object given by app name and log name
static String makeHRef(String path, String refName, String appName, String logName, String entityName, String entityMech, String mode)
          Create a HLink reference
static String makeQueryString(String appName, String logName, String entityName, String entityMech, String mode)
          Create a URL query string
static void renderConfigPage(PrintWriter writer, String contextPath, String servletPath)
           
static void renderLogDownloadPage(PrintWriter writer, ConsoleContext consoleCtx, String contextPath, String servletPath)
           
static void renderLoginPage(PrintWriter writer, String contextPath, String servletPath, boolean loginRejected)
           
static void renderLogMonitorPage(PrintWriter writer, ConsoleContext consoleCtx, String contextPath, String servletPath)
           
static void renderLogRemovePage(PrintWriter writer, ConsoleContext consoleCtx, String contextPath, String servletPath)
           
static void renderLogViewConfigPage(PrintWriter writer, ConsoleContext consoleCtx, String contextPath, String servletPath, String appName, String logName, String entityName, String entityMech)
           
static void renderLogViewPage(PrintWriter writer, ConsoleContext consoleCtx, String contextPath, String servletPath)
           
static void renderMainPage(PrintWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING

protected static final String ENCODING
The encoding scheme to be used

See Also:
Constant Field Values
Constructor Detail

HttpConsoleRenderer

public HttpConsoleRenderer()
Method Detail

renderMainPage

public static void renderMainPage(PrintWriter writer)

renderLoginPage

public static void renderLoginPage(PrintWriter writer,
                                   String contextPath,
                                   String servletPath,
                                   boolean loginRejected)

renderConfigPage

public static void renderConfigPage(PrintWriter writer,
                                    String contextPath,
                                    String servletPath)

renderLogViewPage

public static void renderLogViewPage(PrintWriter writer,
                                     ConsoleContext consoleCtx,
                                     String contextPath,
                                     String servletPath)

renderLogRemovePage

public static void renderLogRemovePage(PrintWriter writer,
                                       ConsoleContext consoleCtx,
                                       String contextPath,
                                       String servletPath)

renderLogDownloadPage

public static void renderLogDownloadPage(PrintWriter writer,
                                         ConsoleContext consoleCtx,
                                         String contextPath,
                                         String servletPath)

renderLogMonitorPage

public static void renderLogMonitorPage(PrintWriter writer,
                                        ConsoleContext consoleCtx,
                                        String contextPath,
                                        String servletPath)

handleLogViewAction

public static void handleLogViewAction(PrintWriter writer,
                                       ConsoleContext consoleCtx,
                                       String contextPath,
                                       String servletPath,
                                       SimpleDateFormat dateFormatter,
                                       String appName,
                                       String logName,
                                       String entityName,
                                       String entityMech,
                                       String mode)

handleLogDownloadAction

public static boolean handleLogDownloadAction(String appName,
                                              String logName,
                                              String entityName,
                                              String entityMech,
                                              OutputStream outStream)
                                       throws IOException
Throws:
IOException

handleLogRemoveAction

public static boolean handleLogRemoveAction(String appName,
                                            String logName,
                                            String entityName,
                                            String entityMech)

handleLogMonitorAction

public static boolean handleLogMonitorAction(ConsoleContext consoleCtx,
                                             String appName,
                                             String logName,
                                             String entityName,
                                             String entityMech)

handleLogMonitorUpdateAction

public static boolean handleLogMonitorUpdateAction(ConsoleContext consoleCtx,
                                                   String refresh)

handleConfigUpdateAction

public static boolean handleConfigUpdateAction(String appName,
                                               String logName,
                                               String logLevel,
                                               String perfLog,
                                               String statLog)

handleLogRemoteAction

public static void handleLogRemoteAction(String appid,
                                         String cfgname,
                                         String logname,
                                         String timestamp,
                                         String loglevel,
                                         String logsource,
                                         String hostname,
                                         String processid,
                                         String threadname,
                                         String classname,
                                         String methodname,
                                         String line,
                                         String summary,
                                         String detail)

renderLogViewConfigPage

public static void renderLogViewConfigPage(PrintWriter writer,
                                           ConsoleContext consoleCtx,
                                           String contextPath,
                                           String servletPath,
                                           String appName,
                                           String logName,
                                           String entityName,
                                           String entityMech)

handleLogViewConfigAction

public static void handleLogViewConfigAction(ConsoleContext consoleCtx,
                                             String contextPath,
                                             String servletPath,
                                             String appName,
                                             String logName,
                                             String entityName,
                                             String entityMech,
                                             String pageSize,
                                             String startPos,
                                             String renderer,
                                             String logLevel,
                                             String performance,
                                             String statistics,
                                             String notifications)

createHtmlPageTemplate

public static HtmlPageTemplate createHtmlPageTemplate(String contextPath,
                                                      String servletPath,
                                                      String htmlTitle)

makeHRef

public static String makeHRef(String path,
                              String refName,
                              String appName,
                              String logName,
                              String entityName,
                              String entityMech,
                              String mode)
Create a HLink reference

Parameters:
path - The HLink URL path element
refName - The HLink ref name
appName - The HLink URL query string app name element
logName - The HLink URL query string log name element
entityName - The HLink URL query string entity name element
entityMech - The HLink URL query string entity mech element
mode - The HLink URL query string mode element (may be null)
Returns:
The HLink reference

makeQueryString

public static String makeQueryString(String appName,
                                     String logName,
                                     String entityName,
                                     String entityMech,
                                     String mode)
Create a URL query string

Parameters:
appName - The query string app name element
logName - The query string log name element
entityName - The query string entity name element
entityMech - The query string entity mech element
mode - The query string mode element (may be null)
Returns:
The query string

lookupConfig

public static Config lookupConfig(String cfgName,
                                  String logName)
Looksup for a log Config object given by app name and log name

Parameters:
cfgName - The config name
logName - The log name
Returns:
The associated Config object or null if not found


This software is published under the BSD license. Copyright © 2003-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.