org.owasp.validator.html
Class CleanResults

java.lang.Object
  extended by org.owasp.validator.html.CleanResults

public class CleanResults
extends java.lang.Object

This class contains the results of a scan. The list of error messages (errorMessages) will let the user know what, if any HTML errors existed, and what, if any, security or validation-related errors existed, and what was done about them.

Author:
Arshan Dabirsiaghi

Constructor Summary
CleanResults()
           
CleanResults(java.util.Date date)
          This is called at the beginning of the scan to initialize the start time and create a new CleanResults object.
CleanResults(java.util.Date startOfScan, java.util.Date endOfScan, java.lang.String cleanHTML, org.w3c.dom.DocumentFragment XMLDocumentFragment, java.util.ArrayList errorMessages)
           
 
Method Summary
 void addErrorMessage(java.lang.String msg)
          Add an error message to the aggregate list of error messages during filtering.
 java.lang.String getCleanHTML()
          Return the filtered HTML as a String.
 org.w3c.dom.DocumentFragment getCleanXMLDocumentFragment()
           
 java.util.Date getEndOfScan()
          Return the time when scan finished.
 java.util.ArrayList getErrorMessages()
          Return a list of error messages.
 int getNumberOfErrors()
          Return the number of errors encountered during filtering.
 double getScanTime()
          Return the time elapsed during the scan.
 java.util.Date getStartOfScan()
          Return the time when scan started.
 void setCleanHTML(java.lang.String cleanHTML)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CleanResults

public CleanResults()

CleanResults

public CleanResults(java.util.Date startOfScan,
                    java.util.Date endOfScan,
                    java.lang.String cleanHTML,
                    org.w3c.dom.DocumentFragment XMLDocumentFragment,
                    java.util.ArrayList errorMessages)

CleanResults

public CleanResults(java.util.Date date)
This is called at the beginning of the scan to initialize the start time and create a new CleanResults object.

Parameters:
date - The begin time of the scan.
Method Detail

getCleanXMLDocumentFragment

public org.w3c.dom.DocumentFragment getCleanXMLDocumentFragment()

setCleanHTML

public void setCleanHTML(java.lang.String cleanHTML)

getCleanHTML

public java.lang.String getCleanHTML()
Return the filtered HTML as a String.

Returns:
A String object which contains the serialized, safe HTML.

getErrorMessages

public java.util.ArrayList getErrorMessages()
Return a list of error messages.

Returns:
An ArrayList object which contain the error messages after a scan.

getEndOfScan

public java.util.Date getEndOfScan()
Return the time when scan finished.

Returns:
A Date object indicating the moment the scan finished.

getStartOfScan

public java.util.Date getStartOfScan()
Return the time when scan started.

Returns:
A Date object indicating the moment the scan started.

getScanTime

public double getScanTime()
Return the time elapsed during the scan.

Returns:
A double primitive indicating the amount of time elapsed between the beginning and end of the scan in seconds.

addErrorMessage

public void addErrorMessage(java.lang.String msg)
Add an error message to the aggregate list of error messages during filtering.

Parameters:
msg - An error message to append to the list of aggregate error messages during filtering.

getNumberOfErrors

public int getNumberOfErrors()
Return the number of errors encountered during filtering.



Copyright © 2010 The Open Web Application Security Project (OWASP). All Rights Reserved.