org.apache.cactus.internal.client
Class WebTestResultParser

java.lang.Object
  extended by org.apache.cactus.internal.client.WebTestResultParser

public class WebTestResultParser
extends java.lang.Object

Parse a string representing a Test result and transform it into a WebTestResult object.

Version:
$Id: WebTestResultParser.java 238991 2004-05-22 11:34:50Z vmassol $
See Also:
WebTestResult

Field Summary
protected  java.lang.String exceptionClassname
          Parsed exception class name.
protected  java.lang.String exceptionMessage
          Parsed exception message.
protected  java.lang.String exceptionStacktrace
          Parsed exception stack trace.
 
Constructor Summary
WebTestResultParser()
           
 
Method Summary
 WebTestResult parse(java.lang.String theData)
          Parse a string and transform it into a WebTestResult object.
protected  java.lang.String readExceptionClassname(java.lang.String theData)
          Read the WebTestResult.XML_EXCEPTION_CLASSNAME_ATTRIBUTE portion and extract the exception classname.
protected  java.lang.String readExceptionMessage(java.lang.String theData)
          Read the WebTestResult.XML_EXCEPTION_MESSAGE_ELEMENT portion and extract the exception message.
protected  java.lang.String readExceptionStacktrace(java.lang.String theData)
          Read the WebTestResult.XML_EXCEPTION_STACKTRACE_ELEMENT portion and extract the exception stacktrace.
protected  java.lang.String readRootElement(java.lang.String theData)
          Read the WebTestResult.XML_ROOT_ELEMENT portion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exceptionClassname

protected java.lang.String exceptionClassname
Parsed exception class name.


exceptionMessage

protected java.lang.String exceptionMessage
Parsed exception message.


exceptionStacktrace

protected java.lang.String exceptionStacktrace
Parsed exception stack trace.

Constructor Detail

WebTestResultParser

public WebTestResultParser()
Method Detail

parse

public WebTestResult parse(java.lang.String theData)
                    throws ParsingException
Parse a string and transform it into a WebTestResult object.

Parameters:
theData - the string to parse
Returns:
the WebTestResult object corresponding to the data string
Throws:
ParsingException - if an error happens during parsing

readRootElement

protected java.lang.String readRootElement(java.lang.String theData)
                                    throws ParsingException
Read the WebTestResult.XML_ROOT_ELEMENT portion.

Parameters:
theData - the string buffer to parse
Returns:
the string buffer minus what has been read
Throws:
ParsingException - if an error happens during parsing

readExceptionClassname

protected java.lang.String readExceptionClassname(java.lang.String theData)
                                           throws ParsingException
Read the WebTestResult.XML_EXCEPTION_CLASSNAME_ATTRIBUTE portion and extract the exception classname.

Parameters:
theData - the string buffer to parse
Returns:
the string buffer minus what has been read
Throws:
ParsingException - if an error happens during parsing

readExceptionMessage

protected java.lang.String readExceptionMessage(java.lang.String theData)
                                         throws ParsingException
Read the WebTestResult.XML_EXCEPTION_MESSAGE_ELEMENT portion and extract the exception message.

Parameters:
theData - the string buffer to parse
Returns:
the string buffer minus what has been read
Throws:
ParsingException - if an error happens during parsing

readExceptionStacktrace

protected java.lang.String readExceptionStacktrace(java.lang.String theData)
                                            throws ParsingException
Read the WebTestResult.XML_EXCEPTION_STACKTRACE_ELEMENT portion and extract the exception stacktrace.

Parameters:
theData - the string buffer to parse
Returns:
the string buffer minus what has been read
Throws:
ParsingException - if an error happens during parsing


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.