jakarta-commons  

cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka Latka.java LatkaException.java LatkaProperties.java SimpleReporter.java Suite.java ValidationException.java Validator.java XMLReporter.java

morgand
Mon, 03 Sep 2001 22:12:04 -0700

morgand     01/09/03 22:37:13

  Modified:    latka/src/java/org/apache/commons/latka Latka.java
                        LatkaException.java LatkaProperties.java
                        SimpleReporter.java Suite.java
                        ValidationException.java Validator.java
                        XMLReporter.java
  Log:
  Javadocs
  
  Revision  Changes    Path
  1.16      +1 -1      
jakarta-commons/latka/src/java/org/apache/commons/latka/Latka.java
  
  Index: Latka.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/Latka.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Latka.java        2001/09/03 07:02:04     1.15
  +++ Latka.java        2001/09/04 05:37:13     1.16
  @@ -130,7 +130,7 @@
     /**
      * Execute a single Latka test suite.  The Latka event listner
      * will receive all the events generated during the test.
  -   * The Latka packages contain an implmentation of LatkaEventListener
  +   * The Latka packages contain an implmentation of LatkaEventInfo
      * which can generate an XML report according to a standard
      * DTD (see documentation).
      *
  
  
  
  1.5       +26 -2     
jakarta-commons/latka/src/java/org/apache/commons/latka/LatkaException.java
  
  Index: LatkaException.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/LatkaException.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LatkaException.java       2001/09/03 07:02:04     1.4
  +++ LatkaException.java       2001/09/04 05:37:13     1.5
  @@ -61,17 +61,27 @@
   
   import org.xml.sax.SAXException;
   
  +/**
  + * Latka throws this exception to the client whenever a problem
  + * occurs that is not covered by one of the standard JDK exceptions
  + * (validation errors, SAX problems, etc.)
  + *
  + * @author Morgan Delagrange
  + */
   public class LatkaException extends Exception {
     
     protected Exception _wrappedException = null;
   
  +  /**
  +   * Standard exception
  +   */
     public LatkaException(String message) {
       super(message);
     }
   
     /**
  -   * wrapped exception
  -   * 
  +   * Wrapped exception.
  +   *
      * @param e exception to wrap
      */
     public LatkaException(Exception e) {
  @@ -79,10 +89,24 @@
       _wrappedException = e;
     }
   
  +  /**
  +   * Get a wrapped exception
  +   *
  +   * @return a wrapped exception, or null if no wrapped
  +   *         exception exists.
  +   */
     public Exception getException() {
       return _wrappedException;
     }
   
  +  /**
  +   * Print a wrapped exception to stdout and, in the case
  +   * of SAXExceptions, an additional wrapped exception.
  +   * This method does _not_ print the exception's message
  +   * itself.
  +   *
  +   * @param e LatkaException with wrapped messages.
  +   */
     public static void printWrappedExceptions(LatkaException e) {
       Exception wrappedException = e.getException();
   
  
  
  
  1.7       +2 -1      
jakarta-commons/latka/src/java/org/apache/commons/latka/LatkaProperties.java
  
  Index: LatkaProperties.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/LatkaProperties.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LatkaProperties.java      2001/08/29 23:14:53     1.6
  +++ LatkaProperties.java      2001/09/04 05:37:13     1.7
  @@ -88,7 +88,8 @@
   
     /**
      * Returns the unique Properties object for the current
  -   * Thread.
  +   * Thread.  The Properties object is initialized with
  +   * the default Latka Properties.
      * 
      * @return Latka Properties object 
      */
  
  
  
  1.5       +5 -0      
jakarta-commons/latka/src/java/org/apache/commons/latka/SimpleReporter.java
  
  Index: SimpleReporter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/SimpleReporter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SimpleReporter.java       2001/08/23 16:24:25     1.4
  +++ SimpleReporter.java       2001/09/04 05:37:13     1.5
  @@ -63,6 +63,11 @@
   
   import java.util.*;
   
  +/**
  + * Needs docs.
  + *
  + * @author Rodney Waldhoff
  + */
   public class SimpleReporter extends AbstractReporter {
      int _pass = 0;
      int _fail = 0;
  
  
  
  1.5       +21 -2     
jakarta-commons/latka/src/java/org/apache/commons/latka/Suite.java
  
  Index: Suite.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/Suite.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Suite.java        2001/08/23 16:24:25     1.4
  +++ Suite.java        2001/09/04 05:37:13     1.5
  @@ -55,22 +55,41 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */   
  + */
   
   package org.apache.commons.latka;
   
   import java.io.Reader;
   
  +/**
  + * References a Latka XML suite, stored either inside a Reader
  + * or at a file URI.
  + *
  + * @see Latka#runTests(Suite, org.apache.commons.latka.event.LatkaEventInfo)
  + *
  + * @author Morgan Delagrange
  + */
   public class Suite {
   
     protected Reader _reader = null;
     protected String _uri = null;
   
  -  // create a test suite from an XML document
  +  /**
  +   * Create a test suite from an XML document located in the
  +   * designated Stream.
  +   *
  +   * @param reader stream containing a Latka XML suite
  +   */
     public Suite(Reader reader) {
       _reader = reader;
     }
   
  +  /**
  +   * Create a test suite from an XML document located at the
  +   * designated File URI.
  +   *
  +   * @param file URI of a Latka XML suite
  +   */
     public Suite(String uri) {
       _uri = uri;
     }
  
  
  
  1.5       +5 -0      
jakarta-commons/latka/src/java/org/apache/commons/latka/ValidationException.java
  
  Index: ValidationException.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/ValidationException.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ValidationException.java  2001/08/23 16:24:25     1.4
  +++ ValidationException.java  2001/09/04 05:37:13     1.5
  @@ -59,6 +59,11 @@
   
   package org.apache.commons.latka;
   
  +/**
  + * Needs docs
  + *
  + * @author Doug Sale
  + */
   public class ValidationException extends Exception {
       public ValidationException() {
           this(null,null);
  
  
  
  1.5       +20 -0     
jakarta-commons/latka/src/java/org/apache/commons/latka/Validator.java
  
  Index: Validator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/Validator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Validator.java    2001/08/23 16:24:25     1.4
  +++ Validator.java    2001/09/04 05:37:13     1.5
  @@ -62,7 +62,27 @@
   import org.apache.commons.latka.http.Request;
   import org.apache.commons.latka.http.Response;
   
  +/**
  + * This is the standard interface for custom validation of an HTTP
  + * Response in Latka.  All custom validators need to implement
  + * a Validator class and a ValidationHandler class.
  + *
  + * @see org.apache.commons.latka.http.Response
  + * @see org.apache.commons.latka.xml.ValidationHandler
  + *
  + * @author Doug Sale
  + */
   public interface Validator {
  +  /**
  +   * Run custom validation.  Latka will
  +   * provide the HTTP response to this method.  The implementer
  +   * should throw a ValidationException if the Response fails
  +   * to meet the validation criteria.
  +   *
  +   * @param response the HTTP response
  +   * @throws ValidationException
  +   *    if the Response fails to be valid
  +   */
     public abstract void validate(Response response)
       throws ValidationException;
   }
  
  
  
  1.9       +11 -0     
jakarta-commons/latka/src/java/org/apache/commons/latka/XMLReporter.java
  
  Index: XMLReporter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/XMLReporter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XMLReporter.java  2001/08/24 20:13:50     1.8
  +++ XMLReporter.java  2001/09/04 05:37:13     1.9
  @@ -75,6 +75,17 @@
   import org.jdom.Element;
   import org.jdom.output.XMLOutputter;
   
  +/**
  + * This LatkaEventListener will generate an XML report
  + * of all tests run during an Latka XML suite.  XMLReporter
  + * instances are NOT reusable for multiple invocations
  + * of the {@link 
  + * org.apache.commons.latka.Latka#runTests(org.apache.commons.latka.Suite,
  + * org.apache.commons.latka.event.LatkaEventInfo) 
  + * Latka#runTests(Suite, LatkaEventInfo)} method.
  + *
  + * @author Morgan Delagrange
  + */
   public class XMLReporter extends AbstractReporter {
   
     protected Document _doc         = null;
  
  
  
  • cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka Latka.java LatkaException.java LatkaProperties.java SimpleReporter.java Suite.java ValidationException.java Validator.java XMLReporter.java morgand