com.xerox.adoc.dexss
Class Test

java.lang.Object
  extended by com.xerox.adoc.dexss.Test
All Implemented Interfaces:
DeXSSChangeListener

public class Test
extends java.lang.Object
implements DeXSSChangeListener

This class satisfies the @link DeXSSChangeListener interface and offers a command-line utility for applying DeXSS to files. It reports a possible failure for any files that don't change. TODO: Do a better job of testing or expected removal and non-removal of XSS code.


Constructor Summary
Test()
           
 
Method Summary
 void logXSSChange(java.lang.String message)
          Called when a change happens but there is no other information.
 void logXSSChange(java.lang.String message, java.lang.String item1)
          Called when a change happens and there is one other informational item.
 void logXSSChange(java.lang.String message, java.lang.String item1, java.lang.String item2)
          Called when a change happens and there are two informational items.
static void main(java.lang.String[] argv)
          This command-line test program processes the specified files or literals, and for each one prints to System.out the following: the file name (if any) Any change messages from DeXSSChangeListener Serialized XML result A summary indicating whether the input changed or not (based on whether there were any XSSChangeListener messages) TODO: A better test and regression harness.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Test

public Test()
Method Detail

logXSSChange

public void logXSSChange(java.lang.String message)
Description copied from interface: DeXSSChangeListener
Called when a change happens but there is no other information.

Specified by:
logXSSChange in interface DeXSSChangeListener
Parameters:
message - Main message

logXSSChange

public void logXSSChange(java.lang.String message,
                         java.lang.String item1)
Description copied from interface: DeXSSChangeListener
Called when a change happens and there is one other informational item.

Specified by:
logXSSChange in interface DeXSSChangeListener
Parameters:
message - Main message
item1 - Information item

logXSSChange

public void logXSSChange(java.lang.String message,
                         java.lang.String item1,
                         java.lang.String item2)
Description copied from interface: DeXSSChangeListener
Called when a change happens and there are two informational items.

Specified by:
logXSSChange in interface DeXSSChangeListener
Parameters:
message - Main message
item1 - Information item 1
item2 - Information item 2

main

public static void main(java.lang.String[] argv)
                 throws java.io.IOException,
                        org.xml.sax.SAXException
This command-line test program processes the specified files or literals, and for each one prints to System.out the following: TODO: A better test and regression harness. More Test cases.

Parameters:
argv - Command-line args are files to process, or if first arg is hypen, strings to process.
Throws:
java.io.IOException
org.xml.sax.SAXException