commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/docs/latka/xref/java/org/apache/commons index.html
Date Mon, 01 Apr 2002 05:47:09 GMT
dion        02/03/31 21:47:09

  Added:       docs/latka/xref/java/org/apache index.html
               docs/latka/xref/java/org/apache/commons/latka
                        XMLReporter.html Validator.html
                        ValidationException.html Suite.html
                        SimpleReporter.html LatkaProperties.html
                        LatkaException.html Latka.html index.html
                        HtmlPrettyPrintWriter.html AbstractReporter.html
               docs/latka/xref/java/org/apache/commons/latka/xml index.html
               docs/latka/xref/java/org/apache/commons index.html
  Log:
  New Maven generated site
  
  Revision  Changes    Path
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/index.html
  
  Index: index.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <a href="../">[parent]</a>
  <hr>
  <table width="100%">
  <tr>
  <td><b>Name</b></td>
  <td><b>Size</b></td>
  <td><b>Last Modified</b></td>
  </tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="commons/index.html">commons</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  </table>
  <hr>
  <center>This page automatically generated by Maven</center>
  </body>
  </html>
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/XMLReporter.html
  
  Index: XMLReporter.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/XMLReporter.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <font color="#329900"><i>// java imports</font></i>
  <a name="63" href="#63">63</a>  <b>import</b> java.io.IOException;
  <a name="64" href="#64">64</a>  <b>import</b> java.io.PrintWriter;
  <a name="65" href="#65">65</a>  <b>import</b> java.io.StringWriter;
  <a name="66" href="#66">66</a>  <font color="#329900"><i>// latka imports</font></i>
  <a name="67" href="#67">67</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>.<a href="../../../../org/apache/commons/latka/http/Request.html">Request</a>;
  <a name="68" href="#68">68</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/RequestErrorEvent.html">RequestErrorEvent</a>;
  <a name="69" href="#69">69</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a>;
  <a name="70" href="#70">70</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/RequestFailedEvent.html">RequestFailedEvent</a>;
  <a name="71" href="#71">71</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/SuiteEvent.html">SuiteEvent</a>;
  <a name="72" href="#72">72</a>  <font color="#329900"><i>// jdom imports</font></i>
  <a name="73" href="#73">73</a>  <b>import</b> org.jdom.Document;
  <a name="74" href="#74">74</a>  <b>import</b> org.jdom.Element;
  <a name="75" href="#75">75</a>  <b>import</b> org.jdom.output.XMLOutputter;
  <a name="76" href="#76">76</a>  
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i> * This LatkaEventListener will generate an XML report</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i> * of all tests run during an Latka XML suite.  XMLReporter</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i> * instances are NOT reusable for multiple invocations</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i> * of the {@link </font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i> * org.apache.commons.latka.Latka#runTests(org.apache.commons.latka.Suite,</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i> * org.apache.commons.latka.event.LatkaEventInfo) </font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i> * Latka#runTests(Suite, LatkaEventInfo)} method.</font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i> *</font></i>
  <a name="86" href="#86">86</a>  <font color="#AA0000"><i> * @author Morgan Delagrange</font></i>
  <a name="87" href="#87">87</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="88" href="#88">88</a>  <font color="#AA0000"><i> * @version $Id: XMLReporter.html,v 1.1 2002/04/01 05:47:08 dion Exp $</font></i>
  <a name="89" href="#89">89</a>  <font color="#AA0000"><i> */</font></i>
  <a name="90" href="#90">90</a>  <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/XMLReporter.html">XMLReporter</a> <b>extends</b> <a href="../../../../org/apache/commons/latka/AbstractReporter.html">AbstractReporter</a> {
  <a name="91" href="#91">91</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* JDOM document produced as output */</font></i></font></i>
  <a name="92" href="#92">92</a>      <b>protected</b> Document _doc         = <b>null</b>;
  <a name="93" href="#93">93</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* top level element of JDOM document, a &lt;report&gt; element*/</font></i></font></i>
  <a name="94" href="#94">94</a>      <b>protected</b> Element  _rootElement = <b>null</b>;
  <a name="95" href="#95">95</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* used for output as tests run */</font></i>                   </font></i>
  <a name="96" href="#96">96</a>      <b>protected</b> PrintWriter _printWriter = <b>new</b> PrintWriter(System.out);
  <a name="97" href="#97">97</a>  
  <a name="98" href="#98">98</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i>     * Create an XML Reporter, initialising document property, as a new empty</font></i>
  <a name="100" href="#100">100</a> <font color="#AA0000"><i>     * report with an unsuccessful suite</font></i>
  <a name="101" href="#101">101</a> <font color="#AA0000"><i>     */</font></i>
  <a name="102" href="#102">102</a>     <b>public</b> <a href="../../../../org/apache/commons/latka/XMLReporter.html">XMLReporter</a>() {
  <a name="103" href="#103">103</a>         _rootElement = <b>new</b> Element(<font color="#000099">"report"</font>);
  <a name="104" href="#104">104</a>         <font color="#329900"><i>//defaults to false, until a SuiteSuccess event occurs</font></i>
  <a name="105" href="#105">105</a>         _doc = <b>new</b> Document(_rootElement);
  <a name="106" href="#106">106</a>         _rootElement.setAttribute(<font color="#000099">"suiteSuccess"</font>, <font color="#000099">"false"</font>);
  <a name="107" href="#107">107</a>     }
  <a name="108" href="#108">108</a> 
  <a name="109" href="#109">109</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="110" href="#110">110</a> <font color="#AA0000"><i>     * Returns the XML Document produced by this listener</font></i>
  <a name="111" href="#111">111</a> <font color="#AA0000"><i>     *</font></i>
  <a name="112" href="#112">112</a> <font color="#AA0000"><i>     * @return JDOM representation of the test report</font></i>
  <a name="113" href="#113">113</a> <font color="#AA0000"><i>     */</font></i>
  <a name="114" href="#114">114</a>     <b>public</b> Document getDocument() {
  <a name="115" href="#115">115</a>         <b>return</b> _doc;
  <a name="116" href="#116">116</a>     }
  <a name="117" href="#117">117</a> 
  <a name="118" href="#118">118</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="119" href="#119">119</a> <font color="#AA0000"><i>     * Returns the test report converted from JDOM to a</font></i>
  <a name="120" href="#120">120</a> <font color="#AA0000"><i>     * text string.</font></i>
  <a name="121" href="#121">121</a> <font color="#AA0000"><i>     *</font></i>
  <a name="122" href="#122">122</a> <font color="#AA0000"><i>     * @return the test report as an XML string</font></i>
  <a name="123" href="#123">123</a> <font color="#AA0000"><i>     * @throws IOException if the XML formatter cannot convert the JDOM object</font></i>
  <a name="124" href="#124">124</a> <font color="#AA0000"><i>     *                     to text</font></i>
  <a name="125" href="#125">125</a> <font color="#AA0000"><i>     */</font></i>
  <a name="126" href="#126">126</a>     <b>public</b> String getDocumentAsString() throws IOException {
  <a name="127" href="#127">127</a>         <font color="#329900"><i>// get the xml string from the listener</font></i>
  <a name="128" href="#128">128</a>         XMLOutputter outputter = <b>new</b> XMLOutputter(<font color="#000099">"  "</font>, <b>true</b>);
  <a name="129" href="#129">129</a>         StringWriter writer = <b>new</b> StringWriter();
  <a name="130" href="#130">130</a>       
  <a name="131" href="#131">131</a>         outputter.output(getDocument(), writer);
  <a name="132" href="#132">132</a> 
  <a name="133" href="#133">133</a>         String xmlDocument = writer.toString();
  <a name="134" href="#134">134</a> 
  <a name="135" href="#135">135</a>         <b>return</b> xmlDocument;
  <a name="136" href="#136">136</a>     }
  <a name="137" href="#137">137</a> 
  <a name="138" href="#138">138</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="139" href="#139">139</a> <font color="#AA0000"><i>     * @see AbstractReporter#requestError(RequestEvent) </font></i>
  <a name="140" href="#140">140</a> <font color="#AA0000"><i>     * @param event the event detailing the request in error</font></i>
  <a name="141" href="#141">141</a> <font color="#AA0000"><i>     */</font></i>
  <a name="142" href="#142">142</a>     <b>public</b> <b>void</b> requestError(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="143" href="#143">143</a>         _printWriter.print(<font color="#000099">"E"</font>);
  <a name="144" href="#144">144</a>         _printWriter.flush();
  <a name="145" href="#145">145</a>         <b>super</b>.requestError(event);
  <a name="146" href="#146">146</a> 
  <a name="147" href="#147">147</a>         <a href="../../../../org/apache/commons/latka/event/RequestErrorEvent.html">RequestErrorEvent</a> errorEvent = (RequestErrorEvent) event;
  <a name="148" href="#148">148</a>         <font color="#329900"><i>// &lt;root&gt;&lt;request&gt;&lt;requestError&gt;&lt;label&gt;errortext&lt;/label&gt;</font></i>
  <a name="149" href="#149">149</a>         <font color="#329900"><i>// &lt;/requestError&gt;&lt;/request&gt;&lt;/root&gt;</font></i>
  <a name="150" href="#150">150</a>         Element label = <b>new</b> Element(<font color="#000099">"label"</font>)
  <a name="151" href="#151">151</a>                             .addContent(errorEvent.getError().toString());
  <a name="152" href="#152">152</a>         Element requestError = <b>new</b> Element(<font color="#000099">"requestError"</font>).addContent(label);
  <a name="153" href="#153">153</a>         _rootElement.addContent(createRequestElement(event)
  <a name="154" href="#154">154</a>                                 .addContent(requestError));
  <a name="155" href="#155">155</a> 
  <a name="156" href="#156">156</a>     }
  <a name="157" href="#157">157</a> 
  <a name="158" href="#158">158</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="159" href="#159">159</a> <font color="#AA0000"><i>     * @see AbstractReporter#requestSucceeded(RequestEvent)</font></i>
  <a name="160" href="#160">160</a> <font color="#AA0000"><i>     * @param event the event detailing the request that succeeded</font></i>
  <a name="161" href="#161">161</a> <font color="#AA0000"><i>     */</font></i>
  <a name="162" href="#162">162</a>     <b>public</b> <b>void</b> requestSucceeded(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="163" href="#163">163</a> 
  <a name="164" href="#164">164</a>         _printWriter.print(<font color="#000099">"."</font>);
  <a name="165" href="#165">165</a>         _printWriter.flush();
  <a name="166" href="#166">166</a>     
  <a name="167" href="#167">167</a>         <b>super</b>.requestSucceeded(event);
  <a name="168" href="#168">168</a> 
  <a name="169" href="#169">169</a>         _rootElement.addContent(createRequestElement(event)
  <a name="170" href="#170">170</a>                                 .addContent(<b>new</b> Element(<font color="#000099">"requestSuccess"</font>))
  <a name="171" href="#171">171</a>                                );
  <a name="172" href="#172">172</a>     }
  <a name="173" href="#173">173</a> 
  <a name="174" href="#174">174</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="175" href="#175">175</a> <font color="#AA0000"><i>     * @see AbstractReporter#requestFailed(RequestEvent)</font></i>
  <a name="176" href="#176">176</a> <font color="#AA0000"><i>     * @param event the event detailing the request that failed</font></i>
  <a name="177" href="#177">177</a> <font color="#AA0000"><i>     */</font></i>
  <a name="178" href="#178">178</a>     <b>public</b> <b>void</b> requestFailed(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="179" href="#179">179</a>     
  <a name="180" href="#180">180</a>         _printWriter.print(<font color="#000099">"F"</font>);
  <a name="181" href="#181">181</a>         _printWriter.flush();
  <a name="182" href="#182">182</a>     
  <a name="183" href="#183">183</a>         <b>super</b>.requestFailed(event);
  <a name="184" href="#184">184</a> 
  <a name="185" href="#185">185</a>         <a href="../../../../org/apache/commons/latka/event/RequestFailedEvent.html">RequestFailedEvent</a> failedEvent = (RequestFailedEvent) event;
  <a name="186" href="#186">186</a> 
  <a name="187" href="#187">187</a>         <font color="#329900"><i>// &lt;root&gt;&lt;request&gt;&lt;requestFailure responseId="xxx"&gt;&lt;label&gt;XXX&lt;/label&gt;</font></i>
  <a name="188" href="#188">188</a>         <font color="#329900"><i>// &lt;/requestFailure&gt;&lt;/request&gt;&lt;/root&gt;</font></i>
  <a name="189" href="#189">189</a>         Element label = <b>new</b> Element(<font color="#000099">"label"</font>)
  <a name="190" href="#190">190</a>                             .addContent(failedEvent.getValidationException()
  <a name="191" href="#191">191</a>                                                    .getMessage()
  <a name="192" href="#192">192</a>                                                    .toString());
  <a name="193" href="#193">193</a>         Element requestFailure = <b>new</b> Element(<font color="#000099">"requestFailure"</font>)
  <a name="194" href="#194">194</a>                                     .setAttribute(<font color="#000099">"responseId"</font>,
  <a name="195" href="#195">195</a>                                                   event.getResponse().toString()
  <a name="196" href="#196">196</a>                                                  )
  <a name="197" href="#197">197</a>                                     .addContent(label);
  <a name="198" href="#198">198</a> 
  <a name="199" href="#199">199</a>         _rootElement.addContent(createRequestElement(event)
  <a name="200" href="#200">200</a>                                 .addContent(requestFailure));
  <a name="201" href="#201">201</a>   }
  <a name="202" href="#202">202</a> 
  <a name="203" href="#203">203</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="204" href="#204">204</a> <font color="#AA0000"><i>     * @see AbstractReporter#requestSkipped(RequestEvent)</font></i>
  <a name="205" href="#205">205</a> <font color="#AA0000"><i>     * @param event the event detailing the request that was skipped</font></i>
  <a name="206" href="#206">206</a> <font color="#AA0000"><i>     */</font></i>
  <a name="207" href="#207">207</a>     <b>public</b> <b>void</b> requestSkipped(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="208" href="#208">208</a>         
  <a name="209" href="#209">209</a>         _printWriter.print(<font color="#000099">"S"</font>);
  <a name="210" href="#210">210</a>         _printWriter.flush();
  <a name="211" href="#211">211</a>     
  <a name="212" href="#212">212</a>         <b>super</b>.requestSkipped(event);
  <a name="213" href="#213">213</a> 
  <a name="214" href="#214">214</a>         <a href="../../../../org/apache/commons/latka/http/Request.html">Request</a> request = event.getRequest();
  <a name="215" href="#215">215</a>         <font color="#329900"><i>// &lt;root&gt;&lt;request&gt;&lt;requestSkipped/&gt;&lt;/request&gt;&lt;/root&gt;</font></i>
  <a name="216" href="#216">216</a>         _rootElement.addContent(createRequestElement(event)
  <a name="217" href="#217">217</a>                                 .addContent(<b>new</b> Element(<font color="#000099">"requestSkipped"</font>)));
  <a name="218" href="#218">218</a> 
  <a name="219" href="#219">219</a>     }
  <a name="220" href="#220">220</a> 
  <a name="221" href="#221">221</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="222" href="#222">222</a> <font color="#AA0000"><i>     * @see AbstractReporter#suiteCompleted(SuiteEvent)</font></i>
  <a name="223" href="#223">223</a> <font color="#AA0000"><i>     * @param event the event detailing the completing Suite</font></i>
  <a name="224" href="#224">224</a> <font color="#AA0000"><i>     */</font></i>
  <a name="225" href="#225">225</a>     <b>public</b> <b>void</b> suiteCompleted(<a href="../../../../org/apache/commons/latka/event/SuiteEvent.html">SuiteEvent</a> event) {
  <a name="226" href="#226">226</a>         _rootElement.getAttribute(<font color="#000099">"suiteSuccess"</font>).setValue(
  <a name="227" href="#227">227</a>             String.valueOf(didSuiteSucceed()));
  <a name="228" href="#228">228</a>     }
  <a name="229" href="#229">229</a> 
  <a name="230" href="#230">230</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="231" href="#231">231</a> <font color="#AA0000"><i>     * Utility method that converts a RequestEvent object to its</font></i>
  <a name="232" href="#232">232</a> <font color="#AA0000"><i>     * corresponding element in the JDOM object.</font></i>
  <a name="233" href="#233">233</a> <font color="#AA0000"><i>     *</font></i>
  <a name="234" href="#234">234</a> <font color="#AA0000"><i>     * @param event the request event sent to the listener</font></i>
  <a name="235" href="#235">235</a> <font color="#AA0000"><i>     * @return the JDOM Element equivalent</font></i>
  <a name="236" href="#236">236</a> <font color="#AA0000"><i>     */</font></i>
  <a name="237" href="#237">237</a>     <b>protected</b> Element createRequestElement(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="238" href="#238">238</a>         <font color="#329900"><i>// the request object</font></i>
  <a name="239" href="#239">239</a>         <a href="../../../../org/apache/commons/latka/http/Request.html">Request</a> request = event.getRequest();
  <a name="240" href="#240">240</a> 
  <a name="241" href="#241">241</a>         Element requestElement = <b>new</b> Element(<font color="#000099">"request"</font>)
  <a name="242" href="#242">242</a>             .setAttribute(<font color="#000099">"requestTime"</font>,
  <a name="243" href="#243">243</a>                           String.valueOf(request.getRequestTiming()))
  <a name="244" href="#244">244</a>             .setAttribute(<font color="#000099">"url"</font>, request.getURL().toString());
  <a name="245" href="#245">245</a> 
  <a name="246" href="#246">246</a>         String label = request.getLabel();
  <a name="247" href="#247">247</a>         <b>if</b> (label != <b>null</b>) {
  <a name="248" href="#248">248</a>             requestElement.setAttribute(<font color="#000099">"label"</font>, label);
  <a name="249" href="#249">249</a>         }
  <a name="250" href="#250">250</a> 
  <a name="251" href="#251">251</a>         <b>return</b> requestElement;
  <a name="252" href="#252">252</a>     }
  <a name="253" href="#253">253</a> 
  <a name="254" href="#254">254</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="255" href="#255">255</a> <font color="#AA0000"><i>     * During the execution, any diagnostic ouput will be sent</font></i>
  <a name="256" href="#256">256</a> <font color="#AA0000"><i>     * to the stream designated here.  If no PrintWriter</font></i>
  <a name="257" href="#257">257</a> <font color="#AA0000"><i>     * is set, output will be sent to standard out.</font></i>
  <a name="258" href="#258">258</a> <font color="#AA0000"><i>     * </font></i>
  <a name="259" href="#259">259</a> <font color="#AA0000"><i>     * @param writer PrintWriter that will receive output generated during</font></i>
  <a name="260" href="#260">260</a> <font color="#AA0000"><i>     *               the test</font></i>
  <a name="261" href="#261">261</a> <font color="#AA0000"><i>     */</font></i>
  <a name="262" href="#262">262</a>     <b>public</b> <b>void</b> setPrintWriter(PrintWriter writer) {
  <a name="263" href="#263">263</a>         _printWriter = writer;
  <a name="264" href="#264">264</a>     }
  <a name="265" href="#265">265</a> 
  <a name="266" href="#266">266</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/Validator.html
  
  Index: Validator.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/Validator.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>.<a href="../../../../org/apache/commons/latka/http/Response.html">Response</a>;
  <a name="63" href="#63">63</a>  
  <a name="64" href="#64">64</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="65" href="#65">65</a>  <font color="#AA0000"><i> * This is the standard interface for custom validation of an HTTP</font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i> * Response in Latka.  All custom validators need to implement</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i> * a Validator class and a ValidationHandler class.</font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> *</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * @see org.apache.commons.latka.http.Response</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> * @see org.apache.commons.latka.xml.ValidationHandler</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> *</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> * @author Doug Sale</font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i> * @version $Revision: 1.1 $</font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> */</font></i>
  <a name="76" href="#76">76</a>  <b>public</b> <b>interface</b> <a href="../../../../org/apache/commons/latka/Validator.html">Validator</a> {
  <a name="77" href="#77">77</a>      
  <a name="78" href="#78">78</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>   * Run custom validation.  Latka will</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i>   * provide the HTTP response to this method.  The implementer</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i>   * should throw a ValidationException if the Response fails</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i>   * to meet the validation criteria.</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>   *</font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i>   * @param response the HTTP response</font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i>   * @throws ValidationException if the Response fails to be valid</font></i>
  <a name="86" href="#86">86</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="87" href="#87">87</a>    <b>public</b> <b>abstract</b> <b>void</b> validate(<a href="../../../../org/apache/commons/latka/http/Response.html">Response</a> response)
  <a name="88" href="#88">88</a>      throws ValidationException;
  <a name="89" href="#89">89</a>  }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/ValidationException.html
  
  Index: ValidationException.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/ValidationException.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="63" href="#63">63</a>  <font color="#AA0000"><i> * This exception is thrown by &lt;em&gt;validators&lt;/em&gt; when a validation has failed</font></i>
  <a name="64" href="#64">64</a>  <font color="#AA0000"><i> *</font></i>
  <a name="65" href="#65">65</a>  <font color="#AA0000"><i> * @author Doug Sale</font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i> * @author dIon Gillard (mainly javadoc)</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i> * @version $Revision: 1.1 $</font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> */</font></i>
  <a name="69" href="#69">69</a>  <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/ValidationException.html">ValidationException</a> <b>extends</b> Exception {
  <a name="70" href="#70">70</a>      
  <a name="71" href="#71">71</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i>     * Create a validation exception with a null label and reason</font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="74" href="#74">74</a>      <b>public</b> <a href="../../../../org/apache/commons/latka/ValidationException.html">ValidationException</a>() {
  <a name="75" href="#75">75</a>          <b>this</b>(<b>null</b>, <b>null</b>);
  <a name="76" href="#76">76</a>      }
  <a name="77" href="#77">77</a>  
  <a name="78" href="#78">78</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>     * Create a validation exception with the given</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i>     * label and reason</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i>     * @param label the user's description of the assertion/test</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i>     * @param reason the reason it failed</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>     */</font></i>    
  <a name="84" href="#84">84</a>      <b>public</b> <a href="../../../../org/apache/commons/latka/ValidationException.html">ValidationException</a>(String label, String reason) {
  <a name="85" href="#85">85</a>          _label = label;
  <a name="86" href="#86">86</a>          _reason = reason;
  <a name="87" href="#87">87</a>      }
  <a name="88" href="#88">88</a>  
  <a name="89" href="#89">89</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* User's description of the test/assertion */</font></i></font></i>
  <a name="90" href="#90">90</a>      <b>private</b> String _label = <b>null</b>;
  <a name="91" href="#91">91</a>  
  <a name="92" href="#92">92</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* Why the test/assertion failed */</font></i></font></i>
  <a name="93" href="#93">93</a>      <b>private</b> String _reason = <b>null</b>;
  <a name="94" href="#94">94</a>  
  <a name="95" href="#95">95</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="96" href="#96">96</a>  <font color="#AA0000"><i>     * the message of the exception</font></i>
  <a name="97" href="#97">97</a>  <font color="#AA0000"><i>     * @return the message of the exception, built from</font></i>
  <a name="98" href="#98">98</a>  <font color="#AA0000"><i>     * the label and reason</font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i>     */</font></i>    
  <a name="100" href="#100">100</a>     <b>public</b> String getMessage() {
  <a name="101" href="#101">101</a>         StringBuffer buf = <b>new</b> StringBuffer();
  <a name="102" href="#102">102</a>         <b>if</b> (<b>null</b> != getLabel()) {
  <a name="103" href="#103">103</a>             buf.append(getLabel());
  <a name="104" href="#104">104</a>             <b>if</b> (<b>null</b> != getReason()) {
  <a name="105" href="#105">105</a>                 buf.append(<font color="#000099">": "</font>);
  <a name="106" href="#106">106</a>             }
  <a name="107" href="#107">107</a>         }
  <a name="108" href="#108">108</a>         <b>if</b> (<b>null</b> != getReason()) {
  <a name="109" href="#109">109</a>             buf.append(getReason());
  <a name="110" href="#110">110</a>         }
  <a name="111" href="#111">111</a>         <b>return</b> buf.toString();
  <a name="112" href="#112">112</a>     }
  <a name="113" href="#113">113</a> 
  <a name="114" href="#114">114</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="115" href="#115">115</a> <font color="#AA0000"><i>     * User's description of the test/assertion</font></i>
  <a name="116" href="#116">116</a> <font color="#AA0000"><i>     * @return User's description of the test/assertion</font></i>
  <a name="117" href="#117">117</a> <font color="#AA0000"><i>     */</font></i>
  <a name="118" href="#118">118</a>     <b>public</b> String getLabel() {
  <a name="119" href="#119">119</a>         <b>return</b> _label;
  <a name="120" href="#120">120</a>     }
  <a name="121" href="#121">121</a> 
  <a name="122" href="#122">122</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="123" href="#123">123</a> <font color="#AA0000"><i>     * Why the test/assertion failed</font></i>
  <a name="124" href="#124">124</a> <font color="#AA0000"><i>     * @return Why the test/assertion failed</font></i>
  <a name="125" href="#125">125</a> <font color="#AA0000"><i>     */</font></i>
  <a name="126" href="#126">126</a>     <b>public</b> String getReason() {
  <a name="127" href="#127">127</a>         <b>return</b> _reason;
  <a name="128" href="#128">128</a>     }
  <a name="129" href="#129">129</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/Suite.html
  
  Index: Suite.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/Suite.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.io.Reader;
  <a name="63" href="#63">63</a>  <b>import</b> java.net.URL;
  <a name="64" href="#64">64</a>  
  <a name="65" href="#65">65</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i> * References a Latka XML suite, stored either inside a Reader</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i> * or at a file URI.</font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> *</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * @see Latka#runTests(Suite, org.apache.commons.latka.event.LatkaEventInfo)</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> *</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> * @author Morgan Delagrange</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> */</font></i>
  <a name="73" href="#73">73</a>  <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/Suite.html">Suite</a> {
  <a name="74" href="#74">74</a>  
  <a name="75" href="#75">75</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* reader stream containing a <a href="../../../../org/apache/commons/latka/Latka.html">Latka</a> XML suite */</font></i></font></i>
  <a name="76" href="#76">76</a>      <b>protected</b> Reader _reader = <b>null</b>;
  <a name="77" href="#77">77</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* test suite URL */</font></i></font></i>
  <a name="78" href="#78">78</a>      <b>protected</b> URL _url = <b>null</b>;
  <a name="79" href="#79">79</a>  
  <a name="80" href="#80">80</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i>     * Create a test suite from an XML document located in the</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i>     * designated Stream.</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>     *</font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i>     * @param reader stream containing a Latka XML suite</font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="86" href="#86">86</a>      <b>public</b> <a href="../../../../org/apache/commons/latka/Suite.html">Suite</a>(Reader reader) {
  <a name="87" href="#87">87</a>          _reader = reader;
  <a name="88" href="#88">88</a>      }
  <a name="89" href="#89">89</a>  
  <a name="90" href="#90">90</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="91" href="#91">91</a>  <font color="#AA0000"><i>     * Create a test suite from an XML document located at the</font></i>
  <a name="92" href="#92">92</a>  <font color="#AA0000"><i>     * designated URL.</font></i>
  <a name="93" href="#93">93</a>  <font color="#AA0000"><i>     *</font></i>
  <a name="94" href="#94">94</a>  <font color="#AA0000"><i>     * @param url of a Latka XML suite</font></i>
  <a name="95" href="#95">95</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="96" href="#96">96</a>      <b>public</b> <a href="../../../../org/apache/commons/latka/Suite.html">Suite</a>(URL url) {
  <a name="97" href="#97">97</a>          _url = url;
  <a name="98" href="#98">98</a>      }
  <a name="99" href="#99">99</a>  
  <a name="100" href="#100">100</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="101" href="#101">101</a> <font color="#AA0000"><i>     * URL containing the test suite.</font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i>     * </font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>     * @return test suite URL</font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i>     */</font></i>
  <a name="105" href="#105">105</a>     <b>public</b> URL getURL() {
  <a name="106" href="#106">106</a>         <b>return</b> _url;
  <a name="107" href="#107">107</a>     }
  <a name="108" href="#108">108</a> 
  <a name="109" href="#109">109</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="110" href="#110">110</a> <font color="#AA0000"><i>     * Set the URL of the test suite.  Much like a SAX </font></i>
  <a name="111" href="#111">111</a> <font color="#AA0000"><i>     * InputSource, you may set both a Reader and a URL, </font></i>
  <a name="112" href="#112">112</a> <font color="#AA0000"><i>     * indicating that while the base XML document is </font></i>
  <a name="113" href="#113">113</a> <font color="#AA0000"><i>     * inside a Reader, the parser resolves entities </font></i>
  <a name="114" href="#114">114</a> <font color="#AA0000"><i>     * relative to the given URL.</font></i>
  <a name="115" href="#115">115</a> <font color="#AA0000"><i>     * @param url the URL to set</font></i>
  <a name="116" href="#116">116</a> <font color="#AA0000"><i>     */</font></i>
  <a name="117" href="#117">117</a>     <b>public</b> <b>void</b> setURL(URL url) {
  <a name="118" href="#118">118</a>         _url = url;
  <a name="119" href="#119">119</a>     }
  <a name="120" href="#120">120</a> 
  <a name="121" href="#121">121</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="122" href="#122">122</a> <font color="#AA0000"><i>     * The reader containing the Latka XML suite</font></i>
  <a name="123" href="#123">123</a> <font color="#AA0000"><i>     * </font></i>
  <a name="124" href="#124">124</a> <font color="#AA0000"><i>     * @return source of the Latka suite</font></i>
  <a name="125" href="#125">125</a> <font color="#AA0000"><i>     */</font></i>
  <a name="126" href="#126">126</a>     <b>public</b> Reader getReader() {
  <a name="127" href="#127">127</a>         <b>return</b> _reader;
  <a name="128" href="#128">128</a>     }
  <a name="129" href="#129">129</a> 
  <a name="130" href="#130">130</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="131" href="#131">131</a> <font color="#AA0000"><i>     * Sets a Reader for the XML.  See {@link #setURL(URL)}</font></i>
  <a name="132" href="#132">132</a> <font color="#AA0000"><i>     * method for a description of using URLs and Readers in </font></i>
  <a name="133" href="#133">133</a> <font color="#AA0000"><i>     * conjunction.</font></i>
  <a name="134" href="#134">134</a> <font color="#AA0000"><i>     * @param reader the reader to be set</font></i>
  <a name="135" href="#135">135</a> <font color="#AA0000"><i>     */</font></i>
  <a name="136" href="#136">136</a>     <b>public</b> <b>void</b> setReader(Reader reader) {
  <a name="137" href="#137">137</a>         _reader = reader;
  <a name="138" href="#138">138</a>     }
  <a name="139" href="#139">139</a> 
  <a name="140" href="#140">140</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/SimpleReporter.html
  
  Index: SimpleReporter.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/SimpleReporter.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  <font color="#329900"><i>// java imports</font></i>
  <a name="62" href="#62">62</a>  <b>import</b> java.util.ArrayList;
  <a name="63" href="#63">63</a>  <b>import</b> java.util.Iterator;
  <a name="64" href="#64">64</a>  <b>import</b> java.util.List;
  <a name="65" href="#65">65</a>  
  <a name="66" href="#66">66</a>  <font color="#329900"><i>// latka imports</font></i>
  <a name="67" href="#67">67</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/RequestErrorEvent.html">RequestErrorEvent</a>;
  <a name="68" href="#68">68</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a>;
  <a name="69" href="#69">69</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/RequestFailedEvent.html">RequestFailedEvent</a>;
  <a name="70" href="#70">70</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/SuiteEvent.html">SuiteEvent</a>;
  <a name="71" href="#71">71</a>  
  <a name="72" href="#72">72</a>  
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i> * A simple class that reports on Latka events. As events occur, a single </font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> * character is printed to show their status &lt;code&gt;.&lt;/code&gt; for success,</font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i> * &lt;code&gt;F&lt;/code&gt; for failure, &lt;code&gt;e&lt;/code&gt; for skipping, &lt;code&gt;E&lt;/code&gt; for</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i> * error.</font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i> *</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i> * On Suite completion, the statistics for the suite are printed</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i> *</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i> * @author Rodney Waldhoff</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i> */</font></i>
  <a name="84" href="#84">84</a>  <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/SimpleReporter.html">SimpleReporter</a> <b>extends</b> <a href="../../../../org/apache/commons/latka/AbstractReporter.html">AbstractReporter</a> {
  <a name="85" href="#85">85</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* number of requests that succeed */</font></i></font></i>
  <a name="86" href="#86">86</a>      <b>private</b> <b>int</b> _pass = 0;
  <a name="87" href="#87">87</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* number of requests that fail */</font></i></font></i>
  <a name="88" href="#88">88</a>      <b>private</b> <b>int</b> _fail = 0;
  <a name="89" href="#89">89</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* number of requests that are in error */</font></i></font></i>
  <a name="90" href="#90">90</a>      <b>private</b> <b>int</b> _err  = 0;
  <a name="91" href="#91">91</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* number of requests that are skippped */</font></i></font></i>
  <a name="92" href="#92">92</a>      <b>private</b> <b>int</b> _skip = 0;
  <a name="93" href="#93">93</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* list of events for failures */</font></i></font></i>
  <a name="94" href="#94">94</a>      <b>private</b> List _failures = <b>new</b> ArrayList();
  <a name="95" href="#95">95</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* list of events for errors */</font></i></font></i>
  <a name="96" href="#96">96</a>      <b>private</b> List _errors = <b>new</b> ArrayList();
  <a name="97" href="#97">97</a>  
  <a name="98" href="#98">98</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i>     * Handle a request succeeding by printing a period, and</font></i>
  <a name="100" href="#100">100</a> <font color="#AA0000"><i>     * keeping the stats for later usage.</font></i>
  <a name="101" href="#101">101</a> <font color="#AA0000"><i>     * @param event the success event from Latka</font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i>     */</font></i>
  <a name="103" href="#103">103</a>     <b>public</b> <b>void</b> requestSucceeded(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="104" href="#104">104</a>         System.out.print(<font color="#000099">"."</font>);
  <a name="105" href="#105">105</a>         <b>super</b>.requestSucceeded(event);
  <a name="106" href="#106">106</a>         _pass++;
  <a name="107" href="#107">107</a>     }
  <a name="108" href="#108">108</a> 
  <a name="109" href="#109">109</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="110" href="#110">110</a> <font color="#AA0000"><i>     * Handle a request failing by printing an &lt;code&gt;F&lt;/code&gt;, and</font></i>
  <a name="111" href="#111">111</a> <font color="#AA0000"><i>     * keeping the stats for later usage</font></i>
  <a name="112" href="#112">112</a> <font color="#AA0000"><i>     * @param event the failure event from Latka</font></i>
  <a name="113" href="#113">113</a> <font color="#AA0000"><i>     */</font></i>
  <a name="114" href="#114">114</a>     <b>public</b> <b>void</b> requestFailed(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="115" href="#115">115</a>         System.out.print(<font color="#000099">"F"</font>);
  <a name="116" href="#116">116</a>         <b>super</b>.requestFailed(event);
  <a name="117" href="#117">117</a>         _fail++;
  <a name="118" href="#118">118</a>         _failures.add(event);
  <a name="119" href="#119">119</a>     }
  <a name="120" href="#120">120</a>     
  <a name="121" href="#121">121</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="122" href="#122">122</a> <font color="#AA0000"><i>     * Handle a request being skipped by printing an &lt;code&gt;s&lt;/code&gt;, and</font></i>
  <a name="123" href="#123">123</a> <font color="#AA0000"><i>     * keeping the stats for later usage</font></i>
  <a name="124" href="#124">124</a> <font color="#AA0000"><i>     * @param event the skipped event from Latka</font></i>
  <a name="125" href="#125">125</a> <font color="#AA0000"><i>     */</font></i>
  <a name="126" href="#126">126</a>     <b>public</b> <b>void</b> requestSkipped(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="127" href="#127">127</a>         System.out.print(<font color="#000099">"s"</font>);
  <a name="128" href="#128">128</a>         <b>super</b>.requestSkipped(event);
  <a name="129" href="#129">129</a>         _skip++;
  <a name="130" href="#130">130</a>     }
  <a name="131" href="#131">131</a> 
  <a name="132" href="#132">132</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="133" href="#133">133</a> <font color="#AA0000"><i>     * Handle a request in error by printing an &lt;code&gt;E&lt;/code&gt;, and</font></i>
  <a name="134" href="#134">134</a> <font color="#AA0000"><i>     * keeping the stats for later usage</font></i>
  <a name="135" href="#135">135</a> <font color="#AA0000"><i>     * @param event the error event from Latka</font></i>
  <a name="136" href="#136">136</a> <font color="#AA0000"><i>     */</font></i>
  <a name="137" href="#137">137</a>     <b>public</b> <b>void</b> requestError(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="138" href="#138">138</a>         System.out.print(<font color="#000099">"E"</font>);
  <a name="139" href="#139">139</a>         <b>super</b>.requestError(event);
  <a name="140" href="#140">140</a>         _err++;
  <a name="141" href="#141">141</a>         _errors.add(event);
  <a name="142" href="#142">142</a>     }
  <a name="143" href="#143">143</a> 
  <a name="144" href="#144">144</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="145" href="#145">145</a> <font color="#AA0000"><i>     * On suite completion, print the statistics gather on event handling</font></i>
  <a name="146" href="#146">146</a> <font color="#AA0000"><i>     * @param event the failure event from Latka</font></i>
  <a name="147" href="#147">147</a> <font color="#AA0000"><i>     */</font></i>
  <a name="148" href="#148">148</a>     <b>public</b> <b>void</b> suiteCompleted(<a href="../../../../org/apache/commons/latka/event/SuiteEvent.html">SuiteEvent</a> event) {
  <a name="149" href="#149">149</a>         System.out.println();
  <a name="150" href="#150">150</a>         <b>if</b> (didSuiteSucceed() == <b>true</b>) {
  <a name="151" href="#151">151</a>             System.out.println(<font color="#000099">"SUITE PASSED"</font>);
  <a name="152" href="#152">152</a>         } <b>else</b> {
  <a name="153" href="#153">153</a>             System.out.println(<font color="#000099">"SUITE FAILED"</font>);
  <a name="154" href="#154">154</a>         }
  <a name="155" href="#155">155</a> 
  <a name="156" href="#156">156</a>         printStats();
  <a name="157" href="#157">157</a> 
  <a name="158" href="#158">158</a>         <b>if</b> (didSuiteSucceed() == <b>true</b>) {
  <a name="159" href="#159">159</a>             System.out.println(<font color="#000099">"SUITE PASSED"</font>);
  <a name="160" href="#160">160</a>         } <b>else</b> {
  <a name="161" href="#161">161</a>             maybePrintFailures();
  <a name="162" href="#162">162</a>             maybePrintErrors();
  <a name="163" href="#163">163</a>             System.out.println(<font color="#000099">"SUITE FAILED"</font>);
  <a name="164" href="#164">164</a>         }
  <a name="165" href="#165">165</a>     }
  <a name="166" href="#166">166</a> 
  <a name="167" href="#167">167</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="168" href="#168">168</a> <font color="#AA0000"><i>     * Print the statistics gathered (total, passed, failed, errors </font></i>
  <a name="169" href="#169">169</a> <font color="#AA0000"><i>     * and skipped requests counts)</font></i>
  <a name="170" href="#170">170</a> <font color="#AA0000"><i>     */</font></i>
  <a name="171" href="#171">171</a>     <b>private</b> <b>void</b> printStats() {
  <a name="172" href="#172">172</a>         System.out.println((_pass + _fail + _err + _skip) + <font color="#000099">" requests run."</font>);
  <a name="173" href="#173">173</a>         System.out.println(_pass + <font color="#000099">" passed."</font>);
  <a name="174" href="#174">174</a>         System.out.println(_fail + <font color="#000099">" failed."</font>);
  <a name="175" href="#175">175</a>         System.out.println(_err + <font color="#000099">" errors."</font>);
  <a name="176" href="#176">176</a>         System.out.println(_skip + <font color="#000099">" skipped."</font>);
  <a name="177" href="#177">177</a>     }
  <a name="178" href="#178">178</a> 
  <a name="179" href="#179">179</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="180" href="#180">180</a> <font color="#AA0000"><i>     * Print any failure requests details</font></i>
  <a name="181" href="#181">181</a> <font color="#AA0000"><i>     */</font></i>
  <a name="182" href="#182">182</a>     <b>private</b> <b>void</b> maybePrintFailures() {
  <a name="183" href="#183">183</a>         <b>if</b> (!_failures.isEmpty()) {
  <a name="184" href="#184">184</a>             System.out.println();
  <a name="185" href="#185">185</a>             System.out.println(<font color="#000099">"Failures:"</font>);
  <a name="186" href="#186">186</a>             Iterator it = _failures.iterator();
  <a name="187" href="#187">187</a>             <b>while</b> (it.hasNext()) {
  <a name="188" href="#188">188</a>                 <a href="../../../../org/apache/commons/latka/event/RequestFailedEvent.html">RequestFailedEvent</a> event = (RequestFailedEvent) it.next();
  <a name="189" href="#189">189</a>                 StringBuffer buf = <b>new</b> StringBuffer(<font color="#000099">"Request "</font>);
  <a name="190" href="#190">190</a>                 <b>if</b> (<b>null</b> != event.getRequest()) {
  <a name="191" href="#191">191</a>                     <b>if</b> (<b>null</b> != event.getRequest().getLabel()) {
  <a name="192" href="#192">192</a>                         buf.append(<font color="#000099">"\&quot;"</font>)
  <a name="193" href="#193">193</a>                            .append(event.getRequest().getLabel())
  <a name="194" href="#194">194</a>                            .append(<font color="#000099">"\&quot; "</font>);
  <a name="195" href="#195">195</a>                     }
  <a name="196" href="#196">196</a>                     <b>if</b> (<b>null</b> != event.getRequest().getURL()) {
  <a name="197" href="#197">197</a>                         buf.append(<font color="#000099">"&lt;"</font>)
  <a name="198" href="#198">198</a>                            .append(event.getRequest().getURL())
  <a name="199" href="#199">199</a>                            .append(<font color="#000099">"&gt; "</font>);
  <a name="200" href="#200">200</a>                     }
  <a name="201" href="#201">201</a>                 }
  <a name="202" href="#202">202</a>                 buf.append(<font color="#000099">" failed. "</font>);
  <a name="203" href="#203">203</a>                 buf.append(event.getValidationException().getMessage());
  <a name="204" href="#204">204</a>                 System.out.println(buf.toString());
  <a name="205" href="#205">205</a>             }
  <a name="206" href="#206">206</a>         }
  <a name="207" href="#207">207</a>     }
  <a name="208" href="#208">208</a> 
  <a name="209" href="#209">209</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="210" href="#210">210</a> <font color="#AA0000"><i>     * Print any error requests details</font></i>
  <a name="211" href="#211">211</a> <font color="#AA0000"><i>     */</font></i>
  <a name="212" href="#212">212</a>     <b>private</b> <b>void</b> maybePrintErrors() {
  <a name="213" href="#213">213</a>         <b>if</b> (!_errors.isEmpty()) {
  <a name="214" href="#214">214</a>             System.out.println();
  <a name="215" href="#215">215</a>             System.out.println(<font color="#000099">"Failures:"</font>);
  <a name="216" href="#216">216</a>             Iterator it = _errors.iterator();
  <a name="217" href="#217">217</a>             <b>while</b> (it.hasNext()) {
  <a name="218" href="#218">218</a>                 <a href="../../../../org/apache/commons/latka/event/RequestErrorEvent.html">RequestErrorEvent</a> event = (RequestErrorEvent) it.next();
  <a name="219" href="#219">219</a>                 StringBuffer buf = <b>new</b> StringBuffer(<font color="#000099">"Request "</font>);
  <a name="220" href="#220">220</a>                 <b>if</b> (<b>null</b> != event.getRequest()) {
  <a name="221" href="#221">221</a>                     <b>if</b> (<b>null</b> != event.getRequest().getLabel()) {
  <a name="222" href="#222">222</a>                         buf.append(<font color="#000099">"\&quot;"</font>)
  <a name="223" href="#223">223</a>                            .append(event.getRequest().getLabel())
  <a name="224" href="#224">224</a>                            .append(<font color="#000099">"\&quot; "</font>);
  <a name="225" href="#225">225</a>                     }
  <a name="226" href="#226">226</a>                     <b>if</b> (<b>null</b> != event.getRequest().getURL()) {
  <a name="227" href="#227">227</a>                         buf.append(<font color="#000099">"&lt;"</font>)
  <a name="228" href="#228">228</a>                            .append(event.getRequest().getURL())
  <a name="229" href="#229">229</a>                            .append(<font color="#000099">"&gt; "</font>);
  <a name="230" href="#230">230</a>                     }
  <a name="231" href="#231">231</a>                 }
  <a name="232" href="#232">232</a>                 buf.append(event.getError().toString());
  <a name="233" href="#233">233</a>                 System.out.println(buf.toString());
  <a name="234" href="#234">234</a>             }
  <a name="235" href="#235">235</a>         }
  <a name="236" href="#236">236</a>     }
  <a name="237" href="#237">237</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/LatkaProperties.html
  
  Index: LatkaProperties.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/LatkaProperties.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.io.InputStream;
  <a name="63" href="#63">63</a>  <b>import</b> java.io.IOException;
  <a name="64" href="#64">64</a>  <b>import</b> java.util.Properties;
  <a name="65" href="#65">65</a>  
  <a name="66" href="#66">66</a>  <b>import</b> org.apache.log4j.Category;
  <a name="67" href="#67">67</a>  
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * Stores properties for Latka.  This class is backed by a </font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> * ThreadLocal variable, so every Thread is guaranteed to</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> * get a unique Properties object.  Note, however, that</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> * inside an environment utilizing a Thread pool, such</font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i> * as many Servlet engines, it is possible for </font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i> * the Properties object to travel quite widely.  Use the</font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> * {@link #resetProperties()} method to reset the Properties</font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i> * object for a Thread to its default values.</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i> * </font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i> * @author Morgan Delagrange</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i> * @author dIon Gillard (javadoc changes)</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i> */</font></i>
  <a name="81" href="#81">81</a>  <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/LatkaProperties.html">LatkaProperties</a> {
  <a name="82" href="#82">82</a>  
  <a name="83" href="#83">83</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* log4j category to append output to */</font></i></font></i>
  <a name="84" href="#84">84</a>      <b>protected</b> <b>static</b> <b>final</b> Category _log =
  <a name="85" href="#85">85</a>          Category.getInstance(LatkaProperties.<b>class</b>);
  <a name="86" href="#86">86</a>  
  <a name="87" href="#87">87</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* default Properties file for <a href="../../../../org/apache/commons/latka/Latka.html">Latka</a> */</font></i></font></i>
  <a name="88" href="#88">88</a>      <b>protected</b> <b>static</b> Properties _initProps = loadDefaultProps();
  <a name="89" href="#89">89</a>  
  <a name="90" href="#90">90</a>      <b>static</b> {
  <a name="91" href="#91">91</a>          _initProps.putAll(loadUserProps());
  <a name="92" href="#92">92</a>      }
  <a name="93" href="#93">93</a>  
  <a name="94" href="#94">94</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="95" href="#95">95</a>  <font color="#AA0000"><i>     * This ThreadLocal is automatically instantiated per thread</font></i>
  <a name="96" href="#96">96</a>  <font color="#AA0000"><i>     * with a Properties object containing the default properties.</font></i>
  <a name="97" href="#97">97</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="98" href="#98">98</a>      <b>protected</b> <b>static</b> ThreadLocal _propsThreadLocal =
  <a name="99" href="#99">99</a>          <b>new</b> LatkaThreadLocal(_initProps);
  <a name="100" href="#100">100</a> 
  <a name="101" href="#101">101</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i>     * Returns the unique Properties object for the current</font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>     * Thread.  The Properties object is initialized with</font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i>     * the default Latka Properties.</font></i>
  <a name="105" href="#105">105</a> <font color="#AA0000"><i>     * </font></i>
  <a name="106" href="#106">106</a> <font color="#AA0000"><i>     * @return Latka Properties object </font></i>
  <a name="107" href="#107">107</a> <font color="#AA0000"><i>     */</font></i>
  <a name="108" href="#108">108</a>     <b>public</b> <b>static</b> Properties getProperties() {
  <a name="109" href="#109">109</a>         <b>return</b> (Properties) _propsThreadLocal.get();
  <a name="110" href="#110">110</a>     }
  <a name="111" href="#111">111</a> 
  <a name="112" href="#112">112</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="113" href="#113">113</a> <font color="#AA0000"><i>     * Resets the Latka properties to their initial value</font></i>
  <a name="114" href="#114">114</a> <font color="#AA0000"><i>     * (getProperties() will still return the same Object).</font></i>
  <a name="115" href="#115">115</a> <font color="#AA0000"><i>     * One use for this method is to reset state inside</font></i>
  <a name="116" href="#116">116</a> <font color="#AA0000"><i>     * a Thread-pooling environment.</font></i>
  <a name="117" href="#117">117</a> <font color="#AA0000"><i>     */</font></i>
  <a name="118" href="#118">118</a>     <b>public</b> <b>static</b> <b>void</b> resetProperties() {
  <a name="119" href="#119">119</a>         Properties props = (Properties) _propsThreadLocal.get();
  <a name="120" href="#120">120</a>         props.clear();
  <a name="121" href="#121">121</a>         props.putAll(_initProps);
  <a name="122" href="#122">122</a>     }
  <a name="123" href="#123">123</a> 
  <a name="124" href="#124">124</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="125" href="#125">125</a> <font color="#AA0000"><i>     * Loads the default Properties from the </font></i>
  <a name="126" href="#126">126</a> <font color="#AA0000"><i>     * first "latka.properties" file located encountered </font></i>
  <a name="127" href="#127">127</a> <font color="#AA0000"><i>     * in the classpath.</font></i>
  <a name="128" href="#128">128</a> <font color="#AA0000"><i>     * </font></i>
  <a name="129" href="#129">129</a> <font color="#AA0000"><i>     * @return A Properties object generated from the contents of the</font></i>
  <a name="130" href="#130">130</a> <font color="#AA0000"><i>     *         default property file</font></i>
  <a name="131" href="#131">131</a> <font color="#AA0000"><i>     */</font></i>
  <a name="132" href="#132">132</a>     <b>protected</b> <b>static</b> Properties loadDefaultProps() {
  <a name="133" href="#133">133</a> 
  <a name="134" href="#134">134</a>         Properties properties  = <b>new</b> Properties();
  <a name="135" href="#135">135</a>     
  <a name="136" href="#136">136</a>         <b>try</b> {
  <a name="137" href="#137">137</a>             properties.putAll(
  <a name="138" href="#138">138</a>                        loadPropsFromClasspath(<font color="#000099">"latka.properties.internal"</font>));
  <a name="139" href="#139">139</a>         } <b>catch</b> (IOException e) {
  <a name="140" href="#140">140</a>             _log.error(
  <a name="141" href="#141">141</a>                 <font color="#000099">"Couldn't find latka.properties.internal file in the classpath"</font>,
  <a name="142" href="#142">142</a>                 e);
  <a name="143" href="#143">143</a>         }
  <a name="144" href="#144">144</a> 
  <a name="145" href="#145">145</a>         <b>return</b> properties;
  <a name="146" href="#146">146</a> 
  <a name="147" href="#147">147</a>     }
  <a name="148" href="#148">148</a> 
  <a name="149" href="#149">149</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="150" href="#150">150</a> <font color="#AA0000"><i>     * Load &lt;em&gt;latka.properties&lt;/em&gt; from classpath</font></i>
  <a name="151" href="#151">151</a> <font color="#AA0000"><i>     * @return loaded properties</font></i>
  <a name="152" href="#152">152</a> <font color="#AA0000"><i>     */</font></i>
  <a name="153" href="#153">153</a>     <b>protected</b> <b>static</b> Properties loadUserProps() {
  <a name="154" href="#154">154</a> 
  <a name="155" href="#155">155</a>         Properties properties  = <b>new</b> Properties();
  <a name="156" href="#156">156</a> 
  <a name="157" href="#157">157</a>         <b>try</b> {
  <a name="158" href="#158">158</a>             properties.putAll(loadPropsFromClasspath(<font color="#000099">"latka.properties"</font>));
  <a name="159" href="#159">159</a>         } <b>catch</b> (IOException e) {
  <a name="160" href="#160">160</a>             _log.debug(e);
  <a name="161" href="#161">161</a>             _log.warn(
  <a name="162" href="#162">162</a>              <font color="#000099">"No user-defined latka.properties file in the classpath (optional)"</font>
  <a name="163" href="#163">163</a>                      );
  <a name="164" href="#164">164</a>         }
  <a name="165" href="#165">165</a> 
  <a name="166" href="#166">166</a>         <b>return</b> properties;
  <a name="167" href="#167">167</a>    
  <a name="168" href="#168">168</a>     }
  <a name="169" href="#169">169</a> 
  <a name="170" href="#170">170</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="171" href="#171">171</a> <font color="#AA0000"><i>     * Load properties specified from context class path</font></i>
  <a name="172" href="#172">172</a> <font color="#AA0000"><i>     * @param classpathLocation Resource name to load</font></i>
  <a name="173" href="#173">173</a> <font color="#AA0000"><i>     * @throws IOException from loading resource</font></i>
  <a name="174" href="#174">174</a> <font color="#AA0000"><i>     * @return initialized properties object</font></i>
  <a name="175" href="#175">175</a> <font color="#AA0000"><i>     */</font></i>
  <a name="176" href="#176">176</a>     <b>protected</b> <b>static</b> Properties
  <a name="177" href="#177">177</a>                      loadPropsFromClasspath(String classpathLocation)
  <a name="178" href="#178">178</a>                      throws IOException {
  <a name="179" href="#179">179</a>         Properties properties  = <b>new</b> Properties();
  <a name="180" href="#180">180</a>     
  <a name="181" href="#181">181</a>         ClassLoader loader = Thread.currentThread().getContextClassLoader();
  <a name="182" href="#182">182</a> 
  <a name="183" href="#183">183</a>         InputStream stream = loader.getResourceAsStream(classpathLocation);
  <a name="184" href="#184">184</a> 
  <a name="185" href="#185">185</a>         <b>if</b> (stream == <b>null</b>) {
  <a name="186" href="#186">186</a>             <b>throw</b> <b>new</b> IOException(<font color="#000099">"Could not find this file in classpath: "</font> +
  <a name="187" href="#187">187</a>                                   classpathLocation);
  <a name="188" href="#188">188</a>         }
  <a name="189" href="#189">189</a> 
  <a name="190" href="#190">190</a>         properties.load(stream);
  <a name="191" href="#191">191</a> 
  <a name="192" href="#192">192</a>         <b>return</b> properties;
  <a name="193" href="#193">193</a>     }
  <a name="194" href="#194">194</a> 
  <a name="195" href="#195">195</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="196" href="#196">196</a> <font color="#AA0000"><i>     * Custom ThreadLocal class that automatically initialized</font></i>
  <a name="197" href="#197">197</a> <font color="#AA0000"><i>     * the default Properties for the Thread.</font></i>
  <a name="198" href="#198">198</a> <font color="#AA0000"><i>     * </font></i>
  <a name="199" href="#199">199</a> <font color="#AA0000"><i>     * @author Morgan Delagrange</font></i>
  <a name="200" href="#200">200</a> <font color="#AA0000"><i>     */</font></i>
  <a name="201" href="#201">201</a>     <b>private</b> <b>static</b> <b>class</b> LatkaThreadLocal <b>extends</b> ThreadLocal {
  <a name="202" href="#202">202</a>         <font color="#AA0000"><i>/**<font color="#AA0000"><i>* default properties for the thread */</font></i></font></i>
  <a name="203" href="#203">203</a>         <b>protected</b> Properties _initProps = <b>null</b>;
  <a name="204" href="#204">204</a> 
  <a name="205" href="#205">205</a>         <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="206" href="#206">206</a> <font color="#AA0000"><i>         * Constructor specifying the default Properties object</font></i>
  <a name="207" href="#207">207</a> <font color="#AA0000"><i>         * for Latka</font></i>
  <a name="208" href="#208">208</a> <font color="#AA0000"><i>         * </font></i>
  <a name="209" href="#209">209</a> <font color="#AA0000"><i>         * @param initProps default Properties object</font></i>
  <a name="210" href="#210">210</a> <font color="#AA0000"><i>         */</font></i>
  <a name="211" href="#211">211</a>         <b>public</b> LatkaThreadLocal(Properties initProps) {
  <a name="212" href="#212">212</a>             _initProps = initProps;
  <a name="213" href="#213">213</a>         }
  <a name="214" href="#214">214</a> 
  <a name="215" href="#215">215</a>         <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="216" href="#216">216</a> <font color="#AA0000"><i>         * Returns a clone of the default Properties file</font></i>
  <a name="217" href="#217">217</a> <font color="#AA0000"><i>         * for Latka</font></i>
  <a name="218" href="#218">218</a> <font color="#AA0000"><i>         * </font></i>
  <a name="219" href="#219">219</a> <font color="#AA0000"><i>         * @return Latka Properties file for the current Thread</font></i>
  <a name="220" href="#220">220</a> <font color="#AA0000"><i>         */</font></i>
  <a name="221" href="#221">221</a>         <b>protected</b> Object initialValue() {
  <a name="222" href="#222">222</a>             <b>return</b> _initProps.clone();
  <a name="223" href="#223">223</a>         }
  <a name="224" href="#224">224</a> 
  <a name="225" href="#225">225</a>     }
  <a name="226" href="#226">226</a> 
  <a name="227" href="#227">227</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/LatkaException.html
  
  Index: LatkaException.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/LatkaException.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.io.PrintStream;
  <a name="63" href="#63">63</a>  <b>import</b> java.io.PrintWriter;
  <a name="64" href="#64">64</a>  
  <a name="65" href="#65">65</a>  <b>import</b> org.xml.sax.SAXException;
  <a name="66" href="#66">66</a>  
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> * Latka throws this exception to the client whenever a problem</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * occurs that is not covered by one of the standard JDK exceptions</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> * (validation errors, SAX problems, etc.)</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> *</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> * @author Morgan Delagrange</font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i> * @version $Id: LatkaException.html,v 1.1 2002/04/01 05:47:08 dion Exp $</font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> */</font></i>
  <a name="76" href="#76">76</a>  <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a> <b>extends</b> Exception {
  <a name="77" href="#77">77</a>    
  <a name="78" href="#78">78</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>     * The original exception</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="81" href="#81">81</a>      <b>protected</b> Exception _wrappedException = <b>null</b>;
  <a name="82" href="#82">82</a>  
  <a name="83" href="#83">83</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i>     * Standard exception constructor</font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i>     * @param message some text explaining the exception</font></i>
  <a name="86" href="#86">86</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="87" href="#87">87</a>      <b>public</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(String message) {
  <a name="88" href="#88">88</a>          <b>super</b>(message);
  <a name="89" href="#89">89</a>      }
  <a name="90" href="#90">90</a>  
  <a name="91" href="#91">91</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="92" href="#92">92</a>  <font color="#AA0000"><i>     * Wrapped exception.</font></i>
  <a name="93" href="#93">93</a>  <font color="#AA0000"><i>     *</font></i>
  <a name="94" href="#94">94</a>  <font color="#AA0000"><i>     * @param e exception to wrap</font></i>
  <a name="95" href="#95">95</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="96" href="#96">96</a>      <b>public</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(Exception e) {
  <a name="97" href="#97">97</a>          <b>super</b>(e.toString());
  <a name="98" href="#98">98</a>          _wrappedException = e;
  <a name="99" href="#99">99</a>      }
  <a name="100" href="#100">100</a> 
  <a name="101" href="#101">101</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i>     * Get a wrapped exception</font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>     *</font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i>     * @return a wrapped exception, or null if no wrapped</font></i>
  <a name="105" href="#105">105</a> <font color="#AA0000"><i>     *         exception exists.</font></i>
  <a name="106" href="#106">106</a> <font color="#AA0000"><i>     */</font></i>
  <a name="107" href="#107">107</a>     <b>public</b> Exception getException() {
  <a name="108" href="#108">108</a>         <b>return</b> _wrappedException;
  <a name="109" href="#109">109</a>     }
  <a name="110" href="#110">110</a> 
  <a name="111" href="#111">111</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="112" href="#112">112</a> <font color="#AA0000"><i>     * Print a wrapped exception to stdout and, in the case</font></i>
  <a name="113" href="#113">113</a> <font color="#AA0000"><i>     * of SAXExceptions, an additional wrapped exception.</font></i>
  <a name="114" href="#114">114</a> <font color="#AA0000"><i>     * This method does _not_ print the exception's message</font></i>
  <a name="115" href="#115">115</a> <font color="#AA0000"><i>     * itself.</font></i>
  <a name="116" href="#116">116</a> <font color="#AA0000"><i>     *</font></i>
  <a name="117" href="#117">117</a> <font color="#AA0000"><i>     * @param e LatkaException with wrapped messages.</font></i>
  <a name="118" href="#118">118</a> <font color="#AA0000"><i>     */</font></i>
  <a name="119" href="#119">119</a>     <b>public</b> <b>static</b> <b>void</b> printWrappedExceptions(<a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a> e) {
  <a name="120" href="#120">120</a>         Exception wrappedException = e.getException();
  <a name="121" href="#121">121</a> 
  <a name="122" href="#122">122</a>         <b>if</b> (wrappedException != <b>null</b>) {
  <a name="123" href="#123">123</a>             System.out.println(<font color="#000099">"Wraps exception:"</font>);
  <a name="124" href="#124">124</a>             e.printStackTrace();
  <a name="125" href="#125">125</a> 
  <a name="126" href="#126">126</a>             <b>if</b> (wrappedException instanceof SAXException) {
  <a name="127" href="#127">127</a>                 Exception saxWrappedException =
  <a name="128" href="#128">128</a>                   ((SAXException) wrappedException).getException();
  <a name="129" href="#129">129</a>                 <b>if</b> (saxWrappedException != <b>null</b>) {
  <a name="130" href="#130">130</a>                     System.out.println(<font color="#000099">"Wraps exception:"</font>);
  <a name="131" href="#131">131</a>                     e.printStackTrace();
  <a name="132" href="#132">132</a>                 }
  <a name="133" href="#133">133</a>             }
  <a name="134" href="#134">134</a> 
  <a name="135" href="#135">135</a>         }
  <a name="136" href="#136">136</a>     }
  <a name="137" href="#137">137</a> 
  <a name="138" href="#138">138</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="139" href="#139">139</a> <font color="#AA0000"><i>     * provide wrapped exception details </font></i>
  <a name="140" href="#140">140</a> <font color="#AA0000"><i>     */</font></i>
  <a name="141" href="#141">141</a>     <b>public</b> <b>void</b> printStackTrace() {
  <a name="142" href="#142">142</a>         <b>if</b> (getException() != <b>null</b>) {
  <a name="143" href="#143">143</a>             System.err.println(<font color="#000099">"Wrapped Exception details:"</font>);
  <a name="144" href="#144">144</a>             getException().printStackTrace();
  <a name="145" href="#145">145</a>         }
  <a name="146" href="#146">146</a>         
  <a name="147" href="#147">147</a>         <b>super</b>.printStackTrace();
  <a name="148" href="#148">148</a>     }
  <a name="149" href="#149">149</a>     
  <a name="150" href="#150">150</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="151" href="#151">151</a> <font color="#AA0000"><i>     * provide wrapped exception details </font></i>
  <a name="152" href="#152">152</a> <font color="#AA0000"><i>     * @param s PrintStream to print to</font></i>
  <a name="153" href="#153">153</a> <font color="#AA0000"><i>     */</font></i>
  <a name="154" href="#154">154</a>     <b>public</b> <b>void</b> printStackTrace(PrintStream s) {
  <a name="155" href="#155">155</a>         <b>if</b> (getException() != <b>null</b>) {
  <a name="156" href="#156">156</a>             s.println(<font color="#000099">"Wrapped Exception details:"</font>);
  <a name="157" href="#157">157</a>             getException().printStackTrace(s);
  <a name="158" href="#158">158</a>         }
  <a name="159" href="#159">159</a>         
  <a name="160" href="#160">160</a>         <b>super</b>.printStackTrace(s);
  <a name="161" href="#161">161</a>     }
  <a name="162" href="#162">162</a>     
  <a name="163" href="#163">163</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="164" href="#164">164</a> <font color="#AA0000"><i>     * Print wrapped exception details, if any</font></i>
  <a name="165" href="#165">165</a> <font color="#AA0000"><i>     * @param s the print writer to send output to</font></i>
  <a name="166" href="#166">166</a> <font color="#AA0000"><i>     */</font></i>
  <a name="167" href="#167">167</a>     <b>public</b> <b>void</b> printStackTrace(PrintWriter s) {
  <a name="168" href="#168">168</a>         <b>if</b> (getException() != <b>null</b>) {
  <a name="169" href="#169">169</a>             s.println(<font color="#000099">"Wrapped Exception details:"</font>);
  <a name="170" href="#170">170</a>             getException().printStackTrace(s);
  <a name="171" href="#171">171</a>         }
  <a name="172" href="#172">172</a>         
  <a name="173" href="#173">173</a>         <b>super</b>.printStackTrace(s);
  <a name="174" href="#174">174</a>     }
  <a name="175" href="#175">175</a>     
  <a name="176" href="#176">176</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/Latka.html
  
  Index: Latka.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/Latka.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.io.File;
  <a name="63" href="#63">63</a>  <b>import</b> java.io.FileInputStream;
  <a name="64" href="#64">64</a>  <b>import</b> java.io.FileWriter;
  <a name="65" href="#65">65</a>  <b>import</b> java.io.IOException;
  <a name="66" href="#66">66</a>  <b>import</b> java.io.StringReader;
  <a name="67" href="#67">67</a>  <b>import</b> java.io.StringWriter;
  <a name="68" href="#68">68</a>  
  <a name="69" href="#69">69</a>  <b>import</b> java.net.URL;
  <a name="70" href="#70">70</a>  
  <a name="71" href="#71">71</a>  <b>import</b> java.text.SimpleDateFormat;
  <a name="72" href="#72">72</a>  
  <a name="73" href="#73">73</a>  <b>import</b> java.util.Date;
  <a name="74" href="#74">74</a>  <b>import</b> java.util.Properties;
  <a name="75" href="#75">75</a>  
  <a name="76" href="#76">76</a>  <b>import</b> javax.xml.parsers.ParserConfigurationException;
  <a name="77" href="#77">77</a>  <b>import</b> javax.xml.parsers.SAXParserFactory;
  <a name="78" href="#78">78</a>  <b>import</b> javax.xml.parsers.SAXParser;
  <a name="79" href="#79">79</a>  <b>import</b> javax.xml.transform.Source;
  <a name="80" href="#80">80</a>  <b>import</b> javax.xml.transform.Transformer;
  <a name="81" href="#81">81</a>  <b>import</b> javax.xml.transform.TransformerException;
  <a name="82" href="#82">82</a>  <b>import</b> javax.xml.transform.TransformerFactory;
  <a name="83" href="#83">83</a>  <b>import</b> javax.xml.transform.stream.StreamResult;
  <a name="84" href="#84">84</a>  <b>import</b> javax.xml.transform.stream.StreamSource;
  <a name="85" href="#85">85</a>  
  <a name="86" href="#86">86</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/LatkaEventInfo.html">LatkaEventInfo</a>;
  <a name="87" href="#87">87</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/xml/index.html">org.apache.commons.latka.xml</a>.<a href="../../../../org/apache/commons/latka/xml/LatkaVariableEntityResolver.html">LatkaVariableEntityResolver</a>;
  <a name="88" href="#88">88</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/xml/index.html">org.apache.commons.latka.xml</a>.<a href="../../../../org/apache/commons/latka/xml/SuiteHandler.html">SuiteHandler</a>;
  <a name="89" href="#89">89</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/xml/index.html">org.apache.commons.latka.xml</a>.<a href="../../../../org/apache/commons/latka/xml/XMLPreprocessor.html">XMLPreprocessor</a>;
  <a name="90" href="#90">90</a>  
  <a name="91" href="#91">91</a>  <b>import</b> org.apache.log4j.Category;
  <a name="92" href="#92">92</a>  
  <a name="93" href="#93">93</a>  <b>import</b> org.xml.sax.InputSource;
  <a name="94" href="#94">94</a>  <b>import</b> org.xml.sax.SAXException;
  <a name="95" href="#95">95</a>  <b>import</b> org.xml.sax.XMLReader;
  <a name="96" href="#96">96</a>  
  <a name="97" href="#97">97</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="98" href="#98">98</a>  <font color="#AA0000"><i> * This is the primary class for executing Latka functional</font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i> * tests.  The main(String aargs[]) class provides a convenient</font></i>
  <a name="100" href="#100">100</a> <font color="#AA0000"><i> * command-line interface for executing single tests.  See the</font></i>
  <a name="101" href="#101">101</a> <font color="#AA0000"><i> * Latka documentation for details on command-line usage.</font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i> * There is also a webapp-based Latka interface.</font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i> *</font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i> * @see Suite</font></i>
  <a name="105" href="#105">105</a> <font color="#AA0000"><i> * @see LatkaProperties</font></i>
  <a name="106" href="#106">106</a> <font color="#AA0000"><i> *</font></i>
  <a name="107" href="#107">107</a> <font color="#AA0000"><i> * @author Morgan Delagrange</font></i>
  <a name="108" href="#108">108</a> <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:dion@apache.org" target="alexandria_uri">mailto:dion@apache.org</a>"&gt;dIon Gillard&lt;/a&gt;</font></i>
  <a name="109" href="#109">109</a> <font color="#AA0000"><i> *</font></i>
  <a name="110" href="#110">110</a> <font color="#AA0000"><i> * @version $Revision: 1.1 $</font></i>
  <a name="111" href="#111">111</a> <font color="#AA0000"><i> */</font></i>
  <a name="112" href="#112">112</a> <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/Latka.html">Latka</a> {
  <a name="113" href="#113">113</a> 
  <a name="114" href="#114">114</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>* whether xml parsing is validating or not */</font></i></font></i>
  <a name="115" href="#115">115</a>     <b>protected</b> <b>boolean</b> _isValidating = <b>true</b>;
  <a name="116" href="#116">116</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>* XSL stylesheet url to use when generating XML */</font></i></font></i>
  <a name="117" href="#117">117</a>     <b>protected</b> URL _reportStylesheetUrl = <b>null</b>;
  <a name="118" href="#118">118</a> 
  <a name="119" href="#119">119</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>* log4j category for logged output */</font></i></font></i>
  <a name="120" href="#120">120</a>     <b>protected</b> <b>static</b> Category _log = 
  <a name="121" href="#121">121</a>                              Category.getInstance(Latka.<b>class</b>.getName());
  <a name="122" href="#122">122</a> 
  <a name="123" href="#123">123</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>* <a href="../../../../org/apache/commons/latka/Latka.html">Latka</a> configuration variables */</font></i></font></i>
  <a name="124" href="#124">124</a>     <b>protected</b> Properties _props = LatkaProperties.getProperties();
  <a name="125" href="#125">125</a> 
  <a name="126" href="#126">126</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>* Message displayed to user when incorrect args provided */</font></i></font></i>
  <a name="127" href="#127">127</a>     <b>protected</b> <b>static</b> String LATKA_USAGE = 
  <a name="128" href="#128">128</a>             <font color="#000099">"\n######################\n"</font> +
  <a name="129" href="#129">129</a>             <font color="#000099">"Latka usage:\n"</font> +
  <a name="130" href="#130">130</a>             <font color="#000099">"  java org.apache.commons.latka.Latka \&quot;XML_suite_URL\&quot; "</font> +
  <a name="131" href="#131">131</a>             <font color="#000099">"[\&quot;propfile:file_name\&quot;] [\&quot;prop:prop_name=prop_value\&quot;]\n\n"</font> +
  <a name="132" href="#132">132</a>             <font color="#000099">"The quotes around properties are REQUIRED.\n"</font> +
  <a name="133" href="#133">133</a>             <font color="#000099">"######################\n"</font>;
  <a name="134" href="#134">134</a>     
  <a name="135" href="#135">135</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="136" href="#136">136</a> <font color="#AA0000"><i>     * Execute a single Latka test suite.  The Latka event listner</font></i>
  <a name="137" href="#137">137</a> <font color="#AA0000"><i>     * will receive all the events generated during the test.</font></i>
  <a name="138" href="#138">138</a> <font color="#AA0000"><i>     * The Latka packages contain an implmentation of LatkaEventInfo</font></i>
  <a name="139" href="#139">139</a> <font color="#AA0000"><i>     * which can generate an XML report according to a standard</font></i>
  <a name="140" href="#140">140</a> <font color="#AA0000"><i>     * DTD (see documentation).</font></i>
  <a name="141" href="#141">141</a> <font color="#AA0000"><i>     *</font></i>
  <a name="142" href="#142">142</a> <font color="#AA0000"><i>     * @param suite test suite to execute</font></i>
  <a name="143" href="#143">143</a> <font color="#AA0000"><i>     * @param listener target for test events</font></i>
  <a name="144" href="#144">144</a> <font color="#AA0000"><i>     * @throws LatkaException when any internal error occurs</font></i>
  <a name="145" href="#145">145</a> <font color="#AA0000"><i>     *</font></i>
  <a name="146" href="#146">146</a> <font color="#AA0000"><i>     * @see XMLReporter XML-based implementation of LatkaEventInfo</font></i>
  <a name="147" href="#147">147</a> <font color="#AA0000"><i>     */</font></i>
  <a name="148" href="#148">148</a>     <b>public</b> <b>void</b> runTests(<a href="../../../../org/apache/commons/latka/Suite.html">Suite</a> suite, <a href="../../../../org/apache/commons/latka/event/LatkaEventInfo.html">LatkaEventInfo</a> listener)
  <a name="149" href="#149">149</a>                 throws <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a> {
  <a name="150" href="#150">150</a>     
  <a name="151" href="#151">151</a>         InputSource source = <b>null</b>;
  <a name="152" href="#152">152</a> 
  <a name="153" href="#153">153</a>         <b>try</b> {
  <a name="154" href="#154">154</a> 
  <a name="155" href="#155">155</a>             <a href="../../../../org/apache/commons/latka/xml/XMLPreprocessor.html">XMLPreprocessor</a> preprocessor = XMLPreprocessor.instance();
  <a name="156" href="#156">156</a> 
  <a name="157" href="#157">157</a>             preprocessor.preprocessXml(suite);
  <a name="158" href="#158">158</a> 
  <a name="159" href="#159">159</a>             source = <b>new</b> InputSource(suite.getReader());
  <a name="160" href="#160">160</a>             <b>if</b> (suite.getURL() != <b>null</b>) {
  <a name="161" href="#161">161</a>             source.setSystemId(suite.getURL().toString());
  <a name="162" href="#162">162</a>             }
  <a name="163" href="#163">163</a> 
  <a name="164" href="#164">164</a>             SAXParserFactory factory = SAXParserFactory.newInstance();
  <a name="165" href="#165">165</a>             factory.setNamespaceAware(<b>true</b>);
  <a name="166" href="#166">166</a> 
  <a name="167" href="#167">167</a>             <font color="#329900"><i>// always force validation of the tests</font></i>
  <a name="168" href="#168">168</a>             factory.setValidating(_isValidating);   
  <a name="169" href="#169">169</a> 
  <a name="170" href="#170">170</a>             SAXParser parser = factory.newSAXParser();
  <a name="171" href="#171">171</a> 
  <a name="172" href="#172">172</a>             XMLReader reader = parser.getXMLReader();
  <a name="173" href="#173">173</a> 
  <a name="174" href="#174">174</a>             <a href="../../../../org/apache/commons/latka/xml/SuiteHandler.html">SuiteHandler</a> handler = <b>new</b> <a href="../../../../org/apache/commons/latka/xml/SuiteHandler.html">SuiteHandler</a>(reader, listener);
  <a name="175" href="#175">175</a> 
  <a name="176" href="#176">176</a>             reader.setContentHandler(handler);
  <a name="177" href="#177">177</a>             reader.setErrorHandler(handler);
  <a name="178" href="#178">178</a>             reader.setEntityResolver(<b>new</b> <a href="../../../../org/apache/commons/latka/xml/LatkaVariableEntityResolver.html">LatkaVariableEntityResolver</a>());
  <a name="179" href="#179">179</a> 
  <a name="180" href="#180">180</a>             reader.parse(source);
  <a name="181" href="#181">181</a> 
  <a name="182" href="#182">182</a>         } <b>catch</b> (ParserConfigurationException e) {
  <a name="183" href="#183">183</a>             <b>throw</b> <b>new</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(e);
  <a name="184" href="#184">184</a>         } <b>catch</b> (SAXException e) {
  <a name="185" href="#185">185</a>             <b>throw</b> <b>new</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(e);
  <a name="186" href="#186">186</a>         } <b>catch</b> (IOException e) {
  <a name="187" href="#187">187</a>             <b>throw</b> <b>new</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(e);
  <a name="188" href="#188">188</a>         }
  <a name="189" href="#189">189</a>     }
  <a name="190" href="#190">190</a> 
  <a name="191" href="#191">191</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="192" href="#192">192</a> <font color="#AA0000"><i>     * Set whether or not Latka will validate the XML in</font></i>
  <a name="193" href="#193">193</a> <font color="#AA0000"><i>     * each test.</font></i>
  <a name="194" href="#194">194</a> <font color="#AA0000"><i>     *</font></i>
  <a name="195" href="#195">195</a> <font color="#AA0000"><i>     * @param isValidating whether or not to validate XML</font></i>
  <a name="196" href="#196">196</a> <font color="#AA0000"><i>     */</font></i>
  <a name="197" href="#197">197</a>     <b>public</b> <b>void</b> setValidating(<b>boolean</b> isValidating) {
  <a name="198" href="#198">198</a>         _isValidating = isValidating;
  <a name="199" href="#199">199</a>     }
  <a name="200" href="#200">200</a> 
  <a name="201" href="#201">201</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="202" href="#202">202</a> <font color="#AA0000"><i>     * Set the URL to be used when transforming XML generated by the XMLReporter</font></i>
  <a name="203" href="#203">203</a> <font color="#AA0000"><i>     * @param url a valid URL referencing a stylesheet </font></i>
  <a name="204" href="#204">204</a> <font color="#AA0000"><i>     */</font></i>
  <a name="205" href="#205">205</a>     <b>public</b> <b>void</b> setReportStylesheet(URL url) {
  <a name="206" href="#206">206</a>         _reportStylesheetUrl = url;
  <a name="207" href="#207">207</a>     }
  <a name="208" href="#208">208</a> 
  <a name="209" href="#209">209</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="210" href="#210">210</a> <font color="#AA0000"><i>     * Use this method to log XML generated by the</font></i>
  <a name="211" href="#211">211</a> <font color="#AA0000"><i>     * XMLReporter class.</font></i>
  <a name="212" href="#212">212</a> <font color="#AA0000"><i>     *</font></i>
  <a name="213" href="#213">213</a> <font color="#AA0000"><i>     * @param xml XML to be logged</font></i>
  <a name="214" href="#214">214</a> <font color="#AA0000"><i>     * @throws IOException if the XML could not be written to the filesystem</font></i>
  <a name="215" href="#215">215</a> <font color="#AA0000"><i>     */</font></i>
  <a name="216" href="#216">216</a>     <b>protected</b> <b>void</b> logXML(String xml) throws IOException {
  <a name="217" href="#217">217</a> 
  <a name="218" href="#218">218</a>         String logProp = _props.getProperty(<font color="#000099">"latka.writeLog"</font>);
  <a name="219" href="#219">219</a>         <b>if</b> ((logProp != <b>null</b>) && (logProp.equals(<font color="#000099">"false"</font>))) {
  <a name="220" href="#220">220</a>             <b>return</b>;
  <a name="221" href="#221">221</a>         }
  <a name="222" href="#222">222</a> 
  <a name="223" href="#223">223</a>         File dir = <b>new</b> File(<font color="#000099">"logs"</font>);
  <a name="224" href="#224">224</a>         <font color="#329900"><i>// try to create logs directory. if it fails, then check to</font></i>
  <a name="225" href="#225">225</a>         <font color="#329900"><i>// make sure it is there (may have existed before) and is writeable</font></i>
  <a name="226" href="#226">226</a>         <b>if</b> (!dir.mkdirs()) {
  <a name="227" href="#227">227</a>             <b>if</b> (!dir.exists ()) {
  <a name="228" href="#228">228</a>                 <b>throw</b> <b>new</b> IOException(<font color="#000099">"Unable to create logs directory"</font>);
  <a name="229" href="#229">229</a>             } <b>else</b> <b>if</b> (!dir.canWrite ()) {
  <a name="230" href="#230">230</a>                 <b>throw</b> <b>new</b> IOException(<font color="#000099">"Unable to write to logs directory"</font>);
  <a name="231" href="#231">231</a>             }
  <a name="232" href="#232">232</a>         }
  <a name="233" href="#233">233</a>         SimpleDateFormat formatter = <b>new</b> SimpleDateFormat (<font color="#000099">"yyyyMMdd'-'HHmm"</font>);
  <a name="234" href="#234">234</a>         Date currentTime_1 = <b>new</b> Date();
  <a name="235" href="#235">235</a>         String dateString = formatter.format(currentTime_1);
  <a name="236" href="#236">236</a>         File file = <b>new</b> File(dir, dateString + <font color="#000099">".xml"</font>);
  <a name="237" href="#237">237</a>         FileWriter fileWriter = <b>new</b> FileWriter(file);
  <a name="238" href="#238">238</a>         fileWriter.write(xml);
  <a name="239" href="#239">239</a>         fileWriter.close();
  <a name="240" href="#240">240</a>     }
  <a name="241" href="#241">241</a> 
  <a name="242" href="#242">242</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="243" href="#243">243</a> <font color="#AA0000"><i>     * Transform the XML generated by the XMLReporter using</font></i>
  <a name="244" href="#244">244</a> <font color="#AA0000"><i>     * the default stylesheet.</font></i>
  <a name="245" href="#245">245</a> <font color="#AA0000"><i>     *</font></i>
  <a name="246" href="#246">246</a> <font color="#AA0000"><i>     * @param xml XML generated by XMLReporter</font></i>
  <a name="247" href="#247">247</a> <font color="#AA0000"><i>     * @return transformed report</font></i>
  <a name="248" href="#248">248</a> <font color="#AA0000"><i>     * @throws LatkaException if the XML could not be transformed</font></i>
  <a name="249" href="#249">249</a> <font color="#AA0000"><i>     */</font></i>
  <a name="250" href="#250">250</a>     <b>public</b> String transformXML(String xml) throws LatkaException {
  <a name="251" href="#251">251</a>     
  <a name="252" href="#252">252</a>         <b>try</b> {
  <a name="253" href="#253">253</a>             StringWriter output = <b>new</b> StringWriter();
  <a name="254" href="#254">254</a> 
  <a name="255" href="#255">255</a>             Source xslSource = <b>null</b>;
  <a name="256" href="#256">256</a> 
  <a name="257" href="#257">257</a>             <b>if</b> (_reportStylesheetUrl == <b>null</b>) {
  <a name="258" href="#258">258</a>             ClassLoader loader = Thread.currentThread().getContextClassLoader();
  <a name="259" href="#259">259</a> 
  <a name="260" href="#260">260</a>             xslSource = <b>new</b> StreamSource(
  <a name="261" href="#261">261</a>                             loader.getResourceAsStream(
  <a name="262" href="#262">262</a>                             <font color="#000099">"org.apache.commons.latka.report.xsl"</font>)
  <a name="263" href="#263">263</a>                         );
  <a name="264" href="#264">264</a>             } <b>else</b> {
  <a name="265" href="#265">265</a>                 xslSource = <b>new</b> StreamSource(_reportStylesheetUrl.toString());
  <a name="266" href="#266">266</a>             }
  <a name="267" href="#267">267</a> 
  <a name="268" href="#268">268</a> 
  <a name="269" href="#269">269</a>             Transformer transformer = 
  <a name="270" href="#270">270</a>             TransformerFactory.newInstance().newTransformer(xslSource);
  <a name="271" href="#271">271</a>             StreamSource xmlSource = <b>new</b> StreamSource(<b>new</b> StringReader(xml));
  <a name="272" href="#272">272</a>             StreamResult result = <b>new</b> StreamResult(output);
  <a name="273" href="#273">273</a>             transformer.transform(xmlSource, result);
  <a name="274" href="#274">274</a>             <b>return</b> output.toString();
  <a name="275" href="#275">275</a>         } <b>catch</b> (TransformerException e) {
  <a name="276" href="#276">276</a>             <b>throw</b> <b>new</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(e);
  <a name="277" href="#277">277</a>         }
  <a name="278" href="#278">278</a>     }
  <a name="279" href="#279">279</a> 
  <a name="280" href="#280">280</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="281" href="#281">281</a> <font color="#AA0000"><i>     * Processes the command line arguments, executes a single test.</font></i>
  <a name="282" href="#282">282</a> <font color="#AA0000"><i>     * and processes the resulting report.  Command line usage is</font></i>
  <a name="283" href="#283">283</a> <font color="#AA0000"><i>     * described in the LATKA_USAGE constant.</font></i>
  <a name="284" href="#284">284</a> <font color="#AA0000"><i>     *</font></i>
  <a name="285" href="#285">285</a> <font color="#AA0000"><i>     * @param args arguments passed into the main(String[]) method</font></i>
  <a name="286" href="#286">286</a> <font color="#AA0000"><i>     *</font></i>
  <a name="287" href="#287">287</a> <font color="#AA0000"><i>     * @throws LatkaException if any problems are encountered during</font></i>
  <a name="288" href="#288">288</a> <font color="#AA0000"><i>     * the execution of the tests</font></i>
  <a name="289" href="#289">289</a> <font color="#AA0000"><i>     */</font></i>
  <a name="290" href="#290">290</a>     <b>protected</b> <b>void</b> runCommandLine(String args[]) throws LatkaException {
  <a name="291" href="#291">291</a> 
  <a name="292" href="#292">292</a>         <b>if</b> (args.length &lt; 1) {
  <a name="293" href="#293">293</a>             System.out.println(LATKA_USAGE);
  <a name="294" href="#294">294</a>         }
  <a name="295" href="#295">295</a> 
  <a name="296" href="#296">296</a>         String urlString = args[0];
  <a name="297" href="#297">297</a> 
  <a name="298" href="#298">298</a>         <b>if</b> (args.length &gt; 1) {
  <a name="299" href="#299">299</a> 
  <a name="300" href="#300">300</a>             <b>for</b> (<b>int</b> i = 1; i &lt; args.length; ++i) {
  <a name="301" href="#301">301</a>                 String arg = args[i];
  <a name="302" href="#302">302</a>                 <b>if</b> (arg.startsWith(<font color="#000099">"prop:"</font>)) {
  <a name="303" href="#303">303</a>                     String propName = arg.substring(5, arg.indexOf(<font color="#000099">"="</font>));
  <a name="304" href="#304">304</a>                     String propValue = arg.substring(arg.indexOf(<font color="#000099">"="</font>) + 1);
  <a name="305" href="#305">305</a>                     _props.setProperty(propName, propValue);
  <a name="306" href="#306">306</a>                 } <b>else</b> <b>if</b> (arg.startsWith(<font color="#000099">"propfile:"</font>)) { 
  <a name="307" href="#307">307</a>                     <b>try</b> {
  <a name="308" href="#308">308</a>                         _props.load(<b>new</b> FileInputStream(arg.substring(9)));
  <a name="309" href="#309">309</a>                     } <b>catch</b> (IOException e) {
  <a name="310" href="#310">310</a>                         System.out.println(<font color="#000099">"Could not load user prop file, uri="</font>
  <a name="311" href="#311">311</a>                                             + arg.substring(9));
  <a name="312" href="#312">312</a>                     }                                            
  <a name="313" href="#313">313</a>                 } <b>else</b> {
  <a name="314" href="#314">314</a>                     <b>throw</b> <b>new</b> IllegalArgumentException(LATKA_USAGE);
  <a name="315" href="#315">315</a>                 }
  <a name="316" href="#316">316</a>             } <font color="#329900"><i>// for</font></i>
  <a name="317" href="#317">317</a>         } <font color="#329900"><i>// if</font></i>
  <a name="318" href="#318">318</a> 
  <a name="319" href="#319">319</a>         String xml = <b>null</b>;
  <a name="320" href="#320">320</a>         <a href="../../../../org/apache/commons/latka/XMLReporter.html">XMLReporter</a> listener = <b>new</b> <a href="../../../../org/apache/commons/latka/XMLReporter.html">XMLReporter</a>();
  <a name="321" href="#321">321</a> 
  <a name="322" href="#322">322</a>         <b>try</b> {
  <a name="323" href="#323">323</a> 
  <a name="324" href="#324">324</a>             URL url = <b>new</b> URL(urlString);
  <a name="325" href="#325">325</a>             <a href="../../../../org/apache/commons/latka/Suite.html">Suite</a> suite = <b>new</b> <a href="../../../../org/apache/commons/latka/Suite.html">Suite</a>(url);
  <a name="326" href="#326">326</a> 
  <a name="327" href="#327">327</a> 
  <a name="328" href="#328">328</a>             runTests(suite, listener);
  <a name="329" href="#329">329</a> 
  <a name="330" href="#330">330</a>             xml = listener.getDocumentAsString();
  <a name="331" href="#331">331</a>             logXML(xml);
  <a name="332" href="#332">332</a>         } <b>catch</b> (IOException e) {
  <a name="333" href="#333">333</a>             <b>throw</b> <b>new</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(e);
  <a name="334" href="#334">334</a>         }
  <a name="335" href="#335">335</a> 
  <a name="336" href="#336">336</a>         System.out.println(transformXML(xml));
  <a name="337" href="#337">337</a> 
  <a name="338" href="#338">338</a>         <b>if</b> (listener.didSuiteSucceed() == false) {
  <a name="339" href="#339">339</a>             <font color="#329900"><i>// throw an exception, so the process will</font></i>
  <a name="340" href="#340">340</a>             <font color="#329900"><i>// return as a failure</font></i>
  <a name="341" href="#341">341</a>             <b>throw</b> <b>new</b> <a href="../../../../org/apache/commons/latka/LatkaException.html">LatkaException</a>(<font color="#000099">"SUITE FAILED"</font>);
  <a name="342" href="#342">342</a>         }
  <a name="343" href="#343">343</a>     }
  <a name="344" href="#344">344</a> 
  <a name="345" href="#345">345</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="346" href="#346">346</a> <font color="#AA0000"><i>     * Execute a single test suite via the command line</font></i>
  <a name="347" href="#347">347</a> <font color="#AA0000"><i>     * interface.  See the Latka documentation for detailed</font></i>
  <a name="348" href="#348">348</a> <font color="#AA0000"><i>     * usage instructions.  The Java process will return</font></i>
  <a name="349" href="#349">349</a> <font color="#AA0000"><i>     * a 0 if all tests succeed and a 1 if any fail</font></i>
  <a name="350" href="#350">350</a> <font color="#AA0000"><i>     * or there is an unrecoverable error in the test</font></i>
  <a name="351" href="#351">351</a> <font color="#AA0000"><i>     * execution.</font></i>
  <a name="352" href="#352">352</a> <font color="#AA0000"><i>     *</font></i>
  <a name="353" href="#353">353</a> <font color="#AA0000"><i>     * @param args arguments containing the test suite location</font></i>
  <a name="354" href="#354">354</a> <font color="#AA0000"><i>     *        and any properties or property file references</font></i>
  <a name="355" href="#355">355</a> <font color="#AA0000"><i>     */</font></i>
  <a name="356" href="#356">356</a>     <b>public</b> <b>static</b> <b>void</b> main (String args[]) {
  <a name="357" href="#357">357</a> 
  <a name="358" href="#358">358</a>         <a href="../../../../org/apache/commons/latka/Latka.html">Latka</a> latka = <b>new</b> <a href="../../../../org/apache/commons/latka/Latka.html">Latka</a>();
  <a name="359" href="#359">359</a>         <b>try</b> {
  <a name="360" href="#360">360</a>             latka.runCommandLine(args);
  <a name="361" href="#361">361</a>         } <b>catch</b> (LatkaException e) {
  <a name="362" href="#362">362</a>             e.printStackTrace();
  <a name="363" href="#363">363</a>             System.exit(1);
  <a name="364" href="#364">364</a>         }
  <a name="365" href="#365">365</a>     
  <a name="366" href="#366">366</a>     }
  <a name="367" href="#367">367</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/index.html
  
  Index: index.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <a href="../">[parent]</a>
  <hr>
  <table width="100%">
  <tr>
  <td><b>Name</b></td>
  <td><b>Size</b></td>
  <td><b>Last Modified</b></td>
  </tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="event/index.html">event</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="http/index.html">http</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="junit/index.html">junit</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="util/index.html">util</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="validators/index.html">validators</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="xml/index.html">xml</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="AbstractReporter.html">AbstractReporter.java</a></td><td valign="middle" NOWRAP>22960 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="HtmlPrettyPrintWriter.html">HtmlPrettyPrintWriter.java</a></td><td valign="middle" NOWRAP>12844 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Latka.html">Latka.java</a></td><td valign="middle" NOWRAP>35423 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="LatkaException.html">LatkaException.java</a></td><td valign="middle" NOWRAP>17055 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="LatkaProperties.html">LatkaProperties.java</a></td><td valign="middle" NOWRAP>21606 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="SimpleReporter.html">SimpleReporter.java</a></td><td valign="middle" NOWRAP>24384 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Suite.html">Suite.java</a></td><td valign="middle" NOWRAP>14228 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="ValidationException.html">ValidationException.java</a></td><td valign="middle" NOWRAP>13252 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Validator.html">Validator.java</a></td><td valign="middle" NOWRAP>10291 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="XMLReporter.html">XMLReporter.java</a></td><td valign="middle" NOWRAP>27674 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  </table>
  <hr>
  <center>This page automatically generated by Maven</center>
  </body>
  </html>
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/HtmlPrettyPrintWriter.html
  
  Index: HtmlPrettyPrintWriter.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/HtmlPrettyPrintWriter.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.io.PrintWriter;
  <a name="63" href="#63">63</a>  <b>import</b> java.io.Writer;
  <a name="64" href="#64">64</a>  
  <a name="65" href="#65">65</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i> * Provides more attractive HTML formatting for the runtime</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i> * output of Latka.  The characters printed during test </font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> * execution ("." for success, "F" for failure, "E" for</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * error, "S" for skipped) will be color coded,</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> * and a &lt;wbr&gt; tag will be inserted roughly </font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> * every five characters</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> * to allow for line wrapping.</font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i> * </font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i> * @author Morgan Delagrange</font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> * @author dIon Gillard (javadocs)</font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i> * @see XMLReporter#setPrintWriter(PrintWriter)</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i> * @version $Revision: 1.1 $</font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i> */</font></i>
  <a name="79" href="#79">79</a>  <b>public</b> <b>class</b> <a href="../../../../org/apache/commons/latka/HtmlPrettyPrintWriter.html">HtmlPrettyPrintWriter</a> <b>extends</b> PrintWriter {
  <a name="80" href="#80">80</a>  
  <a name="81" href="#81">81</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>* number of characters written by the writer */</font></i></font></i>
  <a name="82" href="#82">82</a>    <b>protected</b> <b>int</b> _charsWritten = 0;
  <a name="83" href="#83">83</a>  
  <a name="84" href="#84">84</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i>   * Create a HtmlPrettyPrintWriter wrapping an existing writer</font></i>
  <a name="86" href="#86">86</a>  <font color="#AA0000"><i>   * sends output to the wrapped writer</font></i>
  <a name="87" href="#87">87</a>  <font color="#AA0000"><i>   * @param writer any java.io.Writer</font></i>
  <a name="88" href="#88">88</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="89" href="#89">89</a>    <b>public</b> <a href="../../../../org/apache/commons/latka/HtmlPrettyPrintWriter.html">HtmlPrettyPrintWriter</a>(Writer writer) {
  <a name="90" href="#90">90</a>      <b>super</b>(writer);
  <a name="91" href="#91">91</a>    }
  <a name="92" href="#92">92</a>  
  <a name="93" href="#93">93</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="94" href="#94">94</a>  <font color="#AA0000"><i>   * Write a string to the wrapped writer format it specially as per</font></i>
  <a name="95" href="#95">95</a>  <font color="#AA0000"><i>   * the class definition</font></i>
  <a name="96" href="#96">96</a>  <font color="#AA0000"><i>   * @param output a String to be written</font></i>
  <a name="97" href="#97">97</a>  <font color="#AA0000"><i>   */</font></i> 
  <a name="98" href="#98">98</a>    <b>public</b> <b>void</b> print(String output) {
  <a name="99" href="#99">99</a>  
  <a name="100" href="#100">100</a>     ++_charsWritten;
  <a name="101" href="#101">101</a> 
  <a name="102" href="#102">102</a>     <b>if</b> (output == <b>null</b>) {
  <a name="103" href="#103">103</a>       <b>super</b>.print(output);
  <a name="104" href="#104">104</a>     } <b>else</b> <b>if</b> (output.equals(<font color="#000099">"."</font>)) {
  <a name="105" href="#105">105</a>       <b>super</b>.print(<font color="#000099">"&lt;font color=\&quot;green\&quot;&gt;.&lt;/font&gt;"</font>);
  <a name="106" href="#106">106</a>     } <b>else</b> <b>if</b> (output.equals(<font color="#000099">"S"</font>)) {
  <a name="107" href="#107">107</a>       <b>super</b>.print(<font color="#000099">"&lt;font color=\&quot;gray\&quot;&gt;S&lt;/font&gt;"</font>);
  <a name="108" href="#108">108</a>     } <b>else</b> <b>if</b> (output.equals(<font color="#000099">"F"</font>)) {
  <a name="109" href="#109">109</a>       <b>super</b>.print(<font color="#000099">"&lt;font color=\&quot;red\&quot;&gt;F&lt;/font&gt;"</font>);
  <a name="110" href="#110">110</a>     } <b>else</b> <b>if</b> (output.equals(<font color="#000099">"E"</font>)) {
  <a name="111" href="#111">111</a>       <b>super</b>.print(<font color="#000099">"&lt;font color=\&quot;red\&quot;&gt;E&lt;/font&gt;"</font>);
  <a name="112" href="#112">112</a>     } <b>else</b> {
  <a name="113" href="#113">113</a>       <b>super</b>.print(output);
  <a name="114" href="#114">114</a>     }
  <a name="115" href="#115">115</a> 
  <a name="116" href="#116">116</a>     <b>if</b> ((_charsWritten % 5) == 0) {
  <a name="117" href="#117">117</a>       <b>super</b>.print(<font color="#000099">"&lt;wbr&gt;"</font>);
  <a name="118" href="#118">118</a>     }
  <a name="119" href="#119">119</a> 
  <a name="120" href="#120">120</a>   }
  <a name="121" href="#121">121</a> 
  <a name="122" href="#122">122</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/AbstractReporter.html
  
  Index: AbstractReporter.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../apidocs/org/apache/commons/latka/AbstractReporter.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>
  <a name="59" href="#59">59</a>     
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../org/apache/commons/latka/index.html">org.apache.commons.latka</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/LatkaEventInfo.html">LatkaEventInfo</a>;
  <a name="63" href="#63">63</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/event/index.html">org.apache.commons.latka.event</a>.<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a>;
  <a name="64" href="#64">64</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>.<a href="../../../../org/apache/commons/latka/http/Request.html">Request</a>;
  <a name="65" href="#65">65</a>  <b>import</b> <a href="../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>.<a href="../../../../org/apache/commons/latka/http/Session.html">Session</a>;
  <a name="66" href="#66">66</a>  
  <a name="67" href="#67">67</a>  <b>import</b> java.util.HashMap;
  <a name="68" href="#68">68</a>  <b>import</b> java.util.LinkedList;
  <a name="69" href="#69">69</a>  <b>import</b> java.util.List;
  <a name="70" href="#70">70</a>  <b>import</b> java.util.Map;
  <a name="71" href="#71">71</a>  
  <a name="72" href="#72">72</a>  <b>import</b> org.apache.log4j.Category;
  <a name="73" href="#73">73</a>  
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> * The base class for several 'reporters'.</font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i> *</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i> * A reporter is a class that will store or record information about events that</font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i> * occur during Latka processing</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i> *</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i> * @author Rodney Waldhoff</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i> * @author Morgan Delagrange</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i> * @version $Revision: 1.1 $</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i> */</font></i>
  <a name="84" href="#84">84</a>  <b>public</b> <b>abstract</b> <b>class</b> <a href="../../../../org/apache/commons/latka/AbstractReporter.html">AbstractReporter</a> implements <a href="../../../../org/apache/commons/latka/event/LatkaEventInfo.html">LatkaEventInfo</a> {
  <a name="85" href="#85">85</a>  
  <a name="86" href="#86">86</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="87" href="#87">87</a>  <font color="#AA0000"><i>     * maps the request to it's success or failure as a Boolean</font></i>
  <a name="88" href="#88">88</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="89" href="#89">89</a>      <b>protected</b> Map _requestSucceeded = <b>new</b> HashMap();
  <a name="90" href="#90">90</a>    
  <a name="91" href="#91">91</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="92" href="#92">92</a>  <font color="#AA0000"><i>     * maps the session to it's success or failure as a Boolean</font></i>
  <a name="93" href="#93">93</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="94" href="#94">94</a>      <b>protected</b> Map _sessionSucceeded = <b>new</b> HashMap();
  <a name="95" href="#95">95</a>  
  <a name="96" href="#96">96</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="97" href="#97">97</a>  <font color="#AA0000"><i>     * Holds whether or not the entire suite has succeeded</font></i>
  <a name="98" href="#98">98</a>  <font color="#AA0000"><i>     * This is set to false when &lt;strong&gt;any&lt;/strong&gt; request fails.</font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="100" href="#100">100</a>     <b>protected</b> <b>boolean</b> _suiteSucceeded = <b>true</b>;
  <a name="101" href="#101">101</a> 
  <a name="102" href="#102">102</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>     * Holds the failed responses received by this object.</font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i>     * @see #requestFailed(RequestEvent)</font></i>
  <a name="105" href="#105">105</a> <font color="#AA0000"><i>     */</font></i>
  <a name="106" href="#106">106</a>     <b>protected</b> List _failedResponses = <b>new</b> LinkedList();
  <a name="107" href="#107">107</a> 
  <a name="108" href="#108">108</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="109" href="#109">109</a> <font color="#AA0000"><i>     * The log4J category used for processing log requests.</font></i>
  <a name="110" href="#110">110</a> <font color="#AA0000"><i>     */</font></i>
  <a name="111" href="#111">111</a>     <b>protected</b> <b>static</b> <b>final</b> Category _log = 
  <a name="112" href="#112">112</a>                                 Category.getInstance(AbstractReporter.<b>class</b>);
  <a name="113" href="#113">113</a> 
  <a name="114" href="#114">114</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="115" href="#115">115</a> <font color="#AA0000"><i>     * Invoked if the request succeeds.</font></i>
  <a name="116" href="#116">116</a> <font color="#AA0000"><i>     * Records the success</font></i>
  <a name="117" href="#117">117</a> <font color="#AA0000"><i>     *</font></i>
  <a name="118" href="#118">118</a> <font color="#AA0000"><i>     * @param event  a successful request event</font></i>
  <a name="119" href="#119">119</a> <font color="#AA0000"><i>     */</font></i>
  <a name="120" href="#120">120</a>     <b>public</b> <b>void</b> requestSucceeded(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="121" href="#121">121</a>         recordSuccess(event, <b>true</b>);
  <a name="122" href="#122">122</a>     }
  <a name="123" href="#123">123</a> 
  <a name="124" href="#124">124</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="125" href="#125">125</a> <font color="#AA0000"><i>     * Invoked if the request failed.</font></i>
  <a name="126" href="#126">126</a> <font color="#AA0000"><i>     * Records the failure and adds the request's response to the list of</font></i>
  <a name="127" href="#127">127</a> <font color="#AA0000"><i>     * failed responses</font></i>
  <a name="128" href="#128">128</a> <font color="#AA0000"><i>     *</font></i>
  <a name="129" href="#129">129</a> <font color="#AA0000"><i>     * @param event  a "failed" request event.</font></i>
  <a name="130" href="#130">130</a> <font color="#AA0000"><i>     */</font></i>
  <a name="131" href="#131">131</a>     <b>public</b> <b>void</b> requestFailed(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="132" href="#132">132</a>         recordSuccess(event, false);
  <a name="133" href="#133">133</a>         _failedResponses.add(event.getResponse());
  <a name="134" href="#134">134</a>     }
  <a name="135" href="#135">135</a> 
  <a name="136" href="#136">136</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="137" href="#137">137</a> <font color="#AA0000"><i>     * A skipped request.</font></i>
  <a name="138" href="#138">138</a> <font color="#AA0000"><i>     * Records the skip as a failure</font></i>
  <a name="139" href="#139">139</a> <font color="#AA0000"><i>     *</font></i>
  <a name="140" href="#140">140</a> <font color="#AA0000"><i>     * @param event  a "skipped" request.</font></i>
  <a name="141" href="#141">141</a> <font color="#AA0000"><i>     */</font></i>
  <a name="142" href="#142">142</a>     <b>public</b> <b>void</b> requestSkipped(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="143" href="#143">143</a>         recordSuccess(event, false);
  <a name="144" href="#144">144</a>     }
  <a name="145" href="#145">145</a> 
  <a name="146" href="#146">146</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="147" href="#147">147</a> <font color="#AA0000"><i>     * Invoked if a request error occurs.</font></i>
  <a name="148" href="#148">148</a> <font color="#AA0000"><i>     * Records the error as a failure</font></i>
  <a name="149" href="#149">149</a> <font color="#AA0000"><i>     *</font></i>
  <a name="150" href="#150">150</a> <font color="#AA0000"><i>     * @param event  a request "error" event.</font></i>
  <a name="151" href="#151">151</a> <font color="#AA0000"><i>     */</font></i>
  <a name="152" href="#152">152</a>     <b>public</b> <b>void</b> requestError(<a href="../../../../org/apache/commons/latka/event/RequestEvent.html">RequestEvent</a> event) {
  <a name="153" href="#153">153</a>         recordSuccess(event, false);
  <a name="154" href="#154">154</a>     }
  <a name="155" href="#155">155</a> 
  <a name="156" href="#156">156</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="157" href="#157">157</a> <font color="#AA0000"><i>     * Record the "success status" of a request event.</font></i>
  <a name="158" href="#158">158</a> <font color="#AA0000"><i>     * On a failed request, the current suite, request and session are</font></i>
  <a name="159" href="#159">159</a> <font color="#AA0000"><i>     * marked as failed</font></i>
  <a name="160" href="#160">160</a> <font color="#AA0000"><i>     *</font></i>
  <a name="161" href="#161">161</a> <font color="#AA0000"><i>     * @param event  a request event.</font></i>
  <a name="162" href="#162">162</a> <font color="#AA0000"><i>     * @param bool   the success (&lt;code&gt;true&lt;/code&gt;) or failure</font></i>
  <a name="163" href="#163">163</a> <font color="#AA0000"><i>     * (&lt;code&gt;false&lt;/code&gt;) of the request.</font></i>
  <a name="164" href="#164">164</a> <font color="#AA0000"><i>     */</font></i>
  <a name="165" href="#165">165</a>     <b>protected</b> <b>void</b> recordSuccess (RequestEvent event, <b>boolean</b> bool) {
  <a name="166" href="#166">166</a>         <b>if</b> (bool == false) {
  <a name="167" href="#167">167</a>             _suiteSucceeded = false;
  <a name="168" href="#168">168</a>             _requestSucceeded.put(event.getRequest(), <b>new</b> Boolean(bool));
  <a name="169" href="#169">169</a>             _sessionSucceeded.put(event.getSession(), <b>new</b> Boolean(bool));
  <a name="170" href="#170">170</a>             _log.info(<font color="#000099">"request failed"</font>);
  <a name="171" href="#171">171</a>         }
  <a name="172" href="#172">172</a>     }
  <a name="173" href="#173">173</a> 
  <a name="174" href="#174">174</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="175" href="#175">175</a> <font color="#AA0000"><i>     * Check to see if a particular Request succeeded or failed.</font></i>
  <a name="176" href="#176">176</a> <font color="#AA0000"><i>     *</font></i>
  <a name="177" href="#177">177</a> <font color="#AA0000"><i>     * @param request the request to check for success or</font></i>
  <a name="178" href="#178">178</a> <font color="#AA0000"><i>     * failure</font></i>
  <a name="179" href="#179">179</a> <font color="#AA0000"><i>     * @return true if request succeeded</font></i>
  <a name="180" href="#180">180</a> <font color="#AA0000"><i>     */</font></i>
  <a name="181" href="#181">181</a>     <b>public</b> <b>boolean</b> didRequestSucceed(<a href="../../../../org/apache/commons/latka/http/Request.html">Request</a> request) {
  <a name="182" href="#182">182</a>         Boolean bool = (Boolean) _requestSucceeded.get(request);
  <a name="183" href="#183">183</a> 
  <a name="184" href="#184">184</a>         <b>if</b> (bool == <b>null</b> || bool.booleanValue() == <b>true</b>) {
  <a name="185" href="#185">185</a>             <b>return</b> <b>true</b>;
  <a name="186" href="#186">186</a>         } <b>else</b> {
  <a name="187" href="#187">187</a>             <b>return</b> false;
  <a name="188" href="#188">188</a>         }
  <a name="189" href="#189">189</a> 
  <a name="190" href="#190">190</a>     }
  <a name="191" href="#191">191</a> 
  <a name="192" href="#192">192</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="193" href="#193">193</a> <font color="#AA0000"><i>     * Check to see if a particular Session succeeded or failed.</font></i>
  <a name="194" href="#194">194</a> <font color="#AA0000"><i>     * Once a request inside a session fails, the session itself</font></i>
  <a name="195" href="#195">195</a> <font color="#AA0000"><i>     * is marked as a failure.</font></i>
  <a name="196" href="#196">196</a> <font color="#AA0000"><i>     *</font></i>
  <a name="197" href="#197">197</a> <font color="#AA0000"><i>     * @param session the session to check for success or</font></i>
  <a name="198" href="#198">198</a> <font color="#AA0000"><i>     * failure</font></i>
  <a name="199" href="#199">199</a> <font color="#AA0000"><i>     * @return true if all requests in the session succeeded</font></i>
  <a name="200" href="#200">200</a> <font color="#AA0000"><i>     */</font></i>
  <a name="201" href="#201">201</a>     <b>public</b> <b>boolean</b> didSessionSucceed(<a href="../../../../org/apache/commons/latka/http/Session.html">Session</a> session) {
  <a name="202" href="#202">202</a>         Boolean bool = (Boolean) _sessionSucceeded.get(session);
  <a name="203" href="#203">203</a> 
  <a name="204" href="#204">204</a>         <b>if</b> (bool == <b>null</b> || bool.booleanValue() == <b>true</b>) {
  <a name="205" href="#205">205</a>             <b>return</b> <b>true</b>;
  <a name="206" href="#206">206</a>         } <b>else</b> {
  <a name="207" href="#207">207</a>             <b>return</b> false;
  <a name="208" href="#208">208</a>         }
  <a name="209" href="#209">209</a>     }
  <a name="210" href="#210">210</a> 
  <a name="211" href="#211">211</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="212" href="#212">212</a> <font color="#AA0000"><i>     * Returns true if all Requests in the suite succeed.</font></i>
  <a name="213" href="#213">213</a> <font color="#AA0000"><i>     *</font></i>
  <a name="214" href="#214">214</a> <font color="#AA0000"><i>     * @return true if all Requests have succeeded</font></i>
  <a name="215" href="#215">215</a> <font color="#AA0000"><i>     */</font></i>
  <a name="216" href="#216">216</a>     <b>public</b> <b>boolean</b> didSuiteSucceed() {
  <a name="217" href="#217">217</a>         <b>return</b> _suiteSucceeded;
  <a name="218" href="#218">218</a>     }
  <a name="219" href="#219">219</a> 
  <a name="220" href="#220">220</a>     <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="221" href="#221">221</a> <font color="#AA0000"><i>     * @return a list of all responses of failed requests</font></i>
  <a name="222" href="#222">222</a> <font color="#AA0000"><i>     */</font></i>
  <a name="223" href="#223">223</a>     <b>public</b> List getFailedResponses() {
  <a name="224" href="#224">224</a>         <b>return</b> _failedResponses;
  <a name="225" href="#225">225</a>     }
  <a name="226" href="#226">226</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/xml/index.html
  
  Index: index.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <a href="../">[parent]</a>
  <hr>
  <table width="100%">
  <tr>
  <td><b>Name</b></td>
  <td><b>Size</b></td>
  <td><b>Last Modified</b></td>
  </tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="FindVariablesHandler.html">FindVariablesHandler.java</a></td><td valign="middle" NOWRAP>12839 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="LatkaHandler.html">LatkaHandler.java</a></td><td valign="middle" NOWRAP>9047 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="LatkaVariableEntityResolver.html">LatkaVariableEntityResolver.java</a></td><td valign="middle" NOWRAP>12933 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="ParameterHandler.html">ParameterHandler.java</a></td><td valign="middle" NOWRAP>12385 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="RequestHandler.html">RequestHandler.java</a></td><td valign="middle" NOWRAP>30829 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="RequestHeaderHandler.html">RequestHeaderHandler.java</a></td><td valign="middle" NOWRAP>11630 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="SessionHandler.html">SessionHandler.java</a></td><td valign="middle" NOWRAP>18143 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="SuiteHandler.html">SuiteHandler.java</a></td><td valign="middle" NOWRAP>19388 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="ValidationHandler.html">ValidationHandler.java</a></td><td valign="middle" NOWRAP>17111 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="ValidationReflectionHandler.html">ValidationReflectionHandler.java</a></td><td valign="middle" NOWRAP>23260 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="XMLPreprocessor.html">XMLPreprocessor.java</a></td><td valign="middle" NOWRAP>42621 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  </table>
  <hr>
  <center>This page automatically generated by Maven</center>
  </body>
  </html>
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/index.html
  
  Index: index.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <a href="../">[parent]</a>
  <hr>
  <table width="100%">
  <tr>
  <td><b>Name</b></td>
  <td><b>Size</b></td>
  <td><b>Last Modified</b></td>
  </tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./folder.gif" valign="middle" border="0">&nbsp;<a href="latka/index.html">latka</a></td><td valign="middle" NOWRAP>0 (in bytes) </td><td valign="middle" NOWRAP>30/03/2002</td></tr>
  </table>
  <hr>
  <center>This page automatically generated by Maven</center>
  </body>
  </html>
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message