junit.extensions.xml.elements
Class DumpTagHandler

java.lang.Object
  extended byjunit.extensions.xml.elements.AbstractTagHandler
      extended byjunit.extensions.xml.elements.DumpTagHandler
All Implemented Interfaces:
XMLConstants

public class DumpTagHandler
extends AbstractTagHandler

This class will handle the processing of <dump> tags.

Required Attributes

refid

Optional attributes

recursive - Default vaue true

Author:
Bruce Aylward : Nexagent Ltd.

Field Summary
 
Fields inherited from class junit.extensions.xml.elements.AbstractTagHandler
 
Fields inherited from interface junit.extensions.xml.XMLConstants
ACTION, ACTUALOBJ, ACTUALREFID, ADD, ASSERTENABLED, ASSERTEQUALS, ASSERTNOTEQUALS, ASSERTNOTNULL, ASSERTNOTSAME, ASSERTNULL, ASSERTSAME, CALL, CASE, CHOOSE, CLASSNAME, COLUMN, CONFIRM, DEBUG, DEFAULT, DELIMITER, DIALOG, DUMP, ECHO, ENABLED, ENCODING, EVALUATE, EXPECTEDOBJ, EXPECTEDREFID, FAIL, FILE, FOCUS, FOREACH, ID, INDEX, JFCFILELOC, LESSTHAN, LISTITEM, LOG, MARK, MESSAGE, METHOD, MODE, NAME, OTHERWISE, PATHREFID, PROCEDURE, PROPERTY, RECURSIVE, REFID, RELATIVE, REMOVE, ROW, SAVE, STDERR, STDOUT, STOPWATCH, SUITE, SWITCH, TABLECELL, TAGHANDLERS, TAGNAME, TEST, TYPE, USERE, VALUE, WHEN, WHILE
 
Constructor Summary
DumpTagHandler(org.w3c.dom.Element element, IXMLTestCase testCase)
          Constructor for DumpTagHandler.
 
Method Summary
private static void dumpComponents(java.awt.Component parent, int level, boolean recursive)
          Dumps the component and all its children to standard out.
private  boolean getRecursive()
          Returns the value of the RECURSIVE attribute for this element.
private  java.lang.String getRefId()
          Returns the value of the REFID attribute for this element.
 void processElement()
          Dump the object specified by the refid.
 void validateElement()
          Validate that the refid is specified.
 
Methods inherited from class junit.extensions.xml.elements.AbstractTagHandler
checkAtLeastOneRequiredAttribute, checkAtLeastOneRequiredAttribute, checkElementTagName, checkOneRequiredAttribute, checkOneRequiredAttribute, checkRequiredAttribute, checkRequiredAttribute, getBoolean, getBoolean, getBoolean, getBoolean, getElement, getInt, getInt, getLong, getLong, getPoint, getPoint, getString, getString, getString, getString, getTagName, getTest, getTestCase, getXMLTestCase, getXMLTestSuite, resolveVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumpTagHandler

public DumpTagHandler(org.w3c.dom.Element element,
                      IXMLTestCase testCase)
Constructor for DumpTagHandler.

Parameters:
element - The element to be processed.
testCase - The IXMLTestCase that uses this element.
Method Detail

processElement

public void processElement()
                    throws XMLException
Dump the object specified by the refid.

Specified by:
processElement in class AbstractTagHandler
Throws:
XMLException - may be thrown.

validateElement

public void validateElement()
                     throws XMLException
Validate that the refid is specified.

Overrides:
validateElement in class AbstractTagHandler
Throws:
XMLException - if the refid is not specified.

dumpComponents

private static void dumpComponents(java.awt.Component parent,
                                   int level,
                                   boolean recursive)
Dumps the component and all its children to standard out.

Parameters:
parent - The component to dump.
level - The indentation level.
recursive - True if the dump should be recursive.

getRecursive

private boolean getRecursive()
Returns the value of the RECURSIVE attribute for this element.

Returns:
String The value of the RECURSIVE attribute.

getRefId

private java.lang.String getRefId()
Returns the value of the REFID attribute for this element.

Returns:
String The value of the REFID attribute.


Licensed under: GNU Lesser General Public License, Ver 2.1, February 1999