com.plumtree.uiinfrastructure.diagnostic.reporter
Class Reporter

java.lang.Object
  extended by com.plumtree.uiinfrastructure.diagnostic.reporter.Reporter

public class Reporter
extends java.lang.Object

Manages error reporting. Handles line wrapping for command consoles, and manages event logs for UI reporting.

Author:
DavidP

Field Summary
static int INDENT1
           
static int LINEWIDTH
           
 
Constructor Summary
Reporter()
           
 
Method Summary
static EventLog[] getEventLogReport()
          Returns current report as an array list of event objects
static java.lang.String[] getReport()
          Returns current report as a string array
static void linewrap(boolean bSystemOut, java.lang.String line, int width, int indent)
          Formats strings into N-char chunks with indent; breaks on word boundary
static void log(boolean bSystemOut, java.lang.String line)
          Simply logs the string to the output.
static void LogAndWrite(java.lang.String msg)
          Both write to system out and log to spy.
static void LogAndWriteError(java.lang.String msg)
          Both write to system out and log to spy (error version).
static void LogAndWriteError(java.lang.String msg, XPException e)
          Both write to system out and log to spy (error version).
static void LogAndWriteFatal(java.lang.String msg)
          Both write to system out and log to spy (error version).
static void logEvent(int taskID, int stepID, java.lang.String taskName, java.lang.String platformName, java.lang.String errorMessage, java.lang.String errorDescription, java.lang.String exceptionRecommendation, ReturnValue retVal)
          Event logger.
static void logNoIndent(boolean bSystemOut, java.lang.String line)
          Simply logs the string to the output.
static void report(boolean bSystemOut, int taskID, int stepID, java.lang.String taskName, Platform platform, ReturnValue retval, IMessage msgClass)
          Outputs recommendations with descriptions to the console.
static void setEventLogReport(EventLog[] eventVector, XPArrayList reportLog)
          Overrides existing event and report logs and replaces them with new ones.
static void SystemReport(java.lang.String line, int width, int indent, java.lang.String frontMsg)
          Formats strings into N-char chunks with indent; breaks on word boundary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINEWIDTH

public static final int LINEWIDTH
See Also:
Constant Field Values

INDENT1

public static final int INDENT1
See Also:
Constant Field Values
Constructor Detail

Reporter

public Reporter()
Method Detail

report

public static void report(boolean bSystemOut,
                          int taskID,
                          int stepID,
                          java.lang.String taskName,
                          Platform platform,
                          ReturnValue retval,
                          IMessage msgClass)
Outputs recommendations with descriptions to the console.

Parameters:
bSystemOut: - if true, logs more verbosely

logNoIndent

public static void logNoIndent(boolean bSystemOut,
                               java.lang.String line)
Simply logs the string to the output.

Parameters:
bSystemOut: - if true, logs to stdout as well
line -

log

public static void log(boolean bSystemOut,
                       java.lang.String line)
Simply logs the string to the output.

Parameters:
bSystemOut: - if true, logs to stdout as well
line -

logEvent

public static void logEvent(int taskID,
                            int stepID,
                            java.lang.String taskName,
                            java.lang.String platformName,
                            java.lang.String errorMessage,
                            java.lang.String errorDescription,
                            java.lang.String exceptionRecommendation,
                            ReturnValue retVal)
Event logger. Tracks errors for later display.


linewrap

public static void linewrap(boolean bSystemOut,
                            java.lang.String line,
                            int width,
                            int indent)
Formats strings into N-char chunks with indent; breaks on word boundary

Parameters:
line -

SystemReport

public static void SystemReport(java.lang.String line,
                                int width,
                                int indent,
                                java.lang.String frontMsg)
Formats strings into N-char chunks with indent; breaks on word boundary

Parameters:
line -

getReport

public static java.lang.String[] getReport()
Returns current report as a string array

Returns:
String[] lines of report

getEventLogReport

public static EventLog[] getEventLogReport()
Returns current report as an array list of event objects

Returns:
EventLog[] lines of report

LogAndWrite

public static void LogAndWrite(java.lang.String msg)
Both write to system out and log to spy.

Parameters:
msg -

LogAndWriteError

public static void LogAndWriteError(java.lang.String msg)
Both write to system out and log to spy (error version).

Parameters:
msg -

LogAndWriteError

public static void LogAndWriteError(java.lang.String msg,
                                    XPException e)
Both write to system out and log to spy (error version).

Parameters:
msg -

LogAndWriteFatal

public static void LogAndWriteFatal(java.lang.String msg)
Both write to system out and log to spy (error version).

Parameters:
msg -

setEventLogReport

public static void setEventLogReport(EventLog[] eventVector,
                                     XPArrayList reportLog)
Overrides existing event and report logs and replaces them with new ones.

Parameters:
eventVector -



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.