jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@apache.org
Subject svn commit: r151075 [11/15] - in incubator/jackrabbit/site: ./ apidocs/ apidocs/org/apache/jackrabbit/core/ apidocs/org/apache/jackrabbit/core/class-use/ apidocs/org/apache/jackrabbit/core/state/ apidocs/org/apache/jackrabbit/core/state/mem/ apidocs/org/apache/jackrabbit/core/state/obj/ apidocs/org/apache/jackrabbit/core/state/xml/ apidocs/org/apache/jackrabbit/core/version/ apidocs/org/apache/jackrabbit/core/version/persistence/ apidocs/org/apache/jackrabbit/core/xml/ xref-test/ xref-test/org/apache/jackrabbit/test/ xref-test/org/apache/jackrabbit/test/api/ xref-test/org/apache/jackrabbit/test/api/version/ xref-test/org/apache/jackrabbit/test/observation/ xref-test/org/apache/jackrabbit/test/search/ xref/org/apache/jackrabbit/core/ xref/org/apache/jackrabbit/core/search/lucene/
Date Wed, 02 Feb 2005 22:41:19 GMT
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/VersionLabelTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/VersionLabelTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/VersionLabelTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/VersionLabelTest.html Wed Feb  2 14:40:59 2005
@@ -0,0 +1,327 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>VersionLabelTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2004-2005 The Apache Software Foundation or its licensors,</em>
+<a name="3" href="#3">3</a>   <em class="comment"> *                     as applicable.</em>
+<a name="4" href="#4">4</a>   <em class="comment"> *</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *</em>
+<a name="9" href="#9">9</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a>  <em class="comment"> *</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/package-summary.html">org.apache.jackrabbit.test.api.version</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> javax.jcr.RepositoryException;
+<a name="20" href="#20">20</a>  <strong>import</strong> javax.jcr.UnsupportedRepositoryOperationException;
+<a name="21" href="#21">21</a>  <strong>import</strong> javax.jcr.version.VersionHistory;
+<a name="22" href="#22">22</a>  <strong>import</strong> javax.jcr.version.Version;
+<a name="23" href="#23">23</a>  <strong>import</strong> javax.jcr.version.VersionException;
+<a name="24" href="#24">24</a>  <strong>import</strong> java.util.HashSet;
+<a name="25" href="#25">25</a>  <strong>import</strong> java.util.Arrays;
+<a name="26" href="#26">26</a>  
+<a name="27" href="#27">27</a>  <em>/**<em>*</em></em>
+<a name="28" href="#28">28</a>  <em> * &lt;code>VersionLabelTest&lt;/code> covers methods related to version label such as</em>
+<a name="29" href="#29">29</a>  <em> * &lt;ul></em>
+<a name="30" href="#30">30</a>  <em> * &lt;li>{@link VersionHistory#addVersionLabel(String, String, boolean)}&lt;/li></em>
+<a name="31" href="#31">31</a>  <em> * &lt;li>{@link VersionHistory#removeVersionLabel(String)}&lt;/li></em>
+<a name="32" href="#32">32</a>  <em> * &lt;li>{@link VersionHistory#restoreByLabel(String, boolean)} &lt;/li></em>
+<a name="33" href="#33">33</a>  <em> * &lt;li>{@link VersionHistory#getVersionByLabel(String)}&lt;/li></em>
+<a name="34" href="#34">34</a>  <em> * &lt;li>{@link javax.jcr.version.VersionHistory#getVersionLabels()} &lt;/li></em>
+<a name="35" href="#35">35</a>  <em> * &lt;li>{@link javax.jcr.version.VersionHistory#hasVersionLabel(javax.jcr.version.Version, String)}&lt;/li></em>
+<a name="36" href="#36">36</a>  <em> * &lt;li>{@link VersionHistory#hasVersionLabel(String)}&lt;/li></em>
+<a name="37" href="#37">37</a>  <em> * &lt;li>{@link VersionHistory#hasVersionLabel(javax.jcr.version.Version, String)} &lt;/li></em>
+<a name="38" href="#38">38</a>  <em> * &lt;/ul></em>
+<a name="39" href="#39">39</a>  <em> *</em>
+<a name="40" href="#40">40</a>  <em> * @test</em>
+<a name="41" href="#41">41</a>  <em> * @sources VersionLabelTest.java</em>
+<a name="42" href="#42">42</a>  <em> * @executeClass org.apache.jackrabbit.test.api.version.VersionLabelTest</em>
+<a name="43" href="#43">43</a>  <em> * @keywords versioning</em>
+<a name="44" href="#44">44</a>  <em> */</em>
+<a name="45" href="#45">45</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/VersionLabelTest.html">VersionLabelTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractVersionTest.html">AbstractVersionTest</a> {
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>      <strong>protected</strong> String versionLabel = <span class="string">"foo"</span>;
+<a name="48" href="#48">48</a>      <strong>protected</strong> String versionLabel2 = <span class="string">"bar"</span>;
+<a name="49" href="#49">49</a>  
+<a name="50" href="#50">50</a>      <strong>protected</strong> VersionHistory vHistory;
+<a name="51" href="#51">51</a>      <strong>protected</strong> Version rootVersion;
+<a name="52" href="#52">52</a>  
+<a name="53" href="#53">53</a>      <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="54" href="#54">54</a>          <strong>super</strong>.setUp();
+<a name="55" href="#55">55</a>  
+<a name="56" href="#56">56</a>          vHistory = versionableNode.getVersionHistory();
+<a name="57" href="#57">57</a>          rootVersion = vHistory.getRootVersion();
+<a name="58" href="#58">58</a>  
+<a name="59" href="#59">59</a>          <strong>if</strong> (vHistory.hasVersionLabel(versionLabel)) {
+<a name="60" href="#60">60</a>              fail(<span class="string">"Version label '"</span>+versionLabel+<span class="string">"' is already present in this version history. Label test cannot be performed."</span>);
+<a name="61" href="#61">61</a>          }
+<a name="62" href="#62">62</a>  
+<a name="63" href="#63">63</a>          <strong>if</strong> (vHistory.hasVersionLabel(versionLabel2)) {
+<a name="64" href="#64">64</a>              fail(<span class="string">"Version label '"</span>+versionLabel2+<span class="string">"' is already present in this version history. Label test cannot be performed."</span>);
+<a name="65" href="#65">65</a>          }
+<a name="66" href="#66">66</a>      }
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>      <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="69" href="#69">69</a>          <strong>try</strong> {
+<a name="70" href="#70">70</a>              <em class="comment">// clean up: remove the version labels again.</em>
+<a name="71" href="#71">71</a>              vHistory.removeVersionLabel(versionLabel);
+<a name="72" href="#72">72</a>              vHistory.removeVersionLabel(versionLabel2);
+<a name="73" href="#73">73</a>          } <strong>catch</strong> (RepositoryException e) {
+<a name="74" href="#74">74</a>              <em class="comment">// ignore</em>
+<a name="75" href="#75">75</a>          }
+<a name="76" href="#76">76</a>          <strong>super</strong>.tearDown();
+<a name="77" href="#77">77</a>      }
+<a name="78" href="#78">78</a>  
+<a name="79" href="#79">79</a>      <em>/**<em>*</em></em>
+<a name="80" href="#80">80</a>  <em>     * Test if the number of labels available in the version history is increased</em>
+<a name="81" href="#81">81</a>  <em>     * by added a new label.</em>
+<a name="82" href="#82">82</a>  <em>     *</em>
+<a name="83" href="#83">83</a>  <em>     * @throws RepositoryException</em>
+<a name="84" href="#84">84</a>  <em>     * @see VersionHistory#addVersionLabel(String, String, boolean)</em>
+<a name="85" href="#85">85</a>  <em>     */</em>
+<a name="86" href="#86">86</a>      <strong>public</strong> <strong>void</strong> testAddVersionLabel() throws RepositoryException {
+<a name="87" href="#87">87</a>          <strong>int</strong> initialLength = vHistory.getVersionLabels().length;
+<a name="88" href="#88">88</a>          vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="89" href="#89">89</a>          String[] labels = vHistory.getVersionLabels();
+<a name="90" href="#90">90</a>  
+<a name="91" href="#91">91</a>          assertEquals(<span class="string">"A version label that has been successfully added must increes the total number of version labels available in the history."</span>, initialLength + 1, labels.length);
+<a name="92" href="#92">92</a>      }
+<a name="93" href="#93">93</a>  
+<a name="94" href="#94">94</a>      <em>/**<em>*</em></em>
+<a name="95" href="#95">95</a>  <em>     * Test if the a label added with VersionHistory.addVersionLabel(String, String, boolean)</em>
+<a name="96" href="#96">96</a>  <em>     * is present in the array returned by VersionHistory.getVersionLabels(), if</em>
+<a name="97" href="#97">97</a>  <em>     * the label has not been present before.</em>
+<a name="98" href="#98">98</a>  <em>     *</em>
+<a name="99" href="#99">99</a>  <em>     * @throws RepositoryException</em>
+<a name="100" href="#100">100</a> <em>     * @see VersionHistory#addVersionLabel(String, String, boolean)</em>
+<a name="101" href="#101">101</a> <em>     */</em>
+<a name="102" href="#102">102</a>     <strong>public</strong> <strong>void</strong> testAddVersionLabel2() throws RepositoryException {
+<a name="103" href="#103">103</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="104" href="#104">104</a>         String[] labels = vHistory.getVersionLabels();
+<a name="105" href="#105">105</a>         <strong>boolean</strong> found = false;
+<a name="106" href="#106">106</a>         <strong>for</strong> (<strong>int</strong> i = 0; i &lt; labels.length; i++) {
+<a name="107" href="#107">107</a>             <strong>if</strong> (labels[i].equals(versionLabel)) {
+<a name="108" href="#108">108</a>                 found = <strong>true</strong>;
+<a name="109" href="#109">109</a>                 <strong>break</strong>;
+<a name="110" href="#110">110</a>             }
+<a name="111" href="#111">111</a>         }
+<a name="112" href="#112">112</a>         assertTrue(<span class="string">"The version label that has been successfully added must be present in the array containing all labels."</span>, found);
+<a name="113" href="#113">113</a>     }
+<a name="114" href="#114">114</a> 
+<a name="115" href="#115">115</a>     <em>/**<em>*</em></em>
+<a name="116" href="#116">116</a> <em>     * Test if VersionHistory.hasVersionLabel(String) returns true, if the label</em>
+<a name="117" href="#117">117</a> <em>     * has beed successfully added before.</em>
+<a name="118" href="#118">118</a> <em>     *</em>
+<a name="119" href="#119">119</a> <em>     * @throws RepositoryException</em>
+<a name="120" href="#120">120</a> <em>     * @see VersionHistory#hasVersionLabel(String)</em>
+<a name="121" href="#121">121</a> <em>     */</em>
+<a name="122" href="#122">122</a>     <strong>public</strong> <strong>void</strong> testHasVersionLabel() throws RepositoryException {
+<a name="123" href="#123">123</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="124" href="#124">124</a>         assertTrue(<span class="string">"VersionHistory.hasVersionLabel(String) must return true if the label has been sucessfully added."</span>, vHistory.hasVersionLabel(versionLabel));
+<a name="125" href="#125">125</a>     }
+<a name="126" href="#126">126</a> 
+<a name="127" href="#127">127</a>     <em>/**<em>*</em></em>
+<a name="128" href="#128">128</a> <em>     * Test if VersionHistory.hasVersionLabel(Version, String) returns true, if the label</em>
+<a name="129" href="#129">129</a> <em>     * has beed successfully added before to the specified version.</em>
+<a name="130" href="#130">130</a> <em>     *</em>
+<a name="131" href="#131">131</a> <em>     * @throws RepositoryException</em>
+<a name="132" href="#132">132</a> <em>     * @see VersionHistory#hasVersionLabel(javax.jcr.version.Version, String)</em>
+<a name="133" href="#133">133</a> <em>     */</em>
+<a name="134" href="#134">134</a>     <strong>public</strong> <strong>void</strong> testHasVersionLabelForVersion() throws RepositoryException {
+<a name="135" href="#135">135</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="136" href="#136">136</a>         assertTrue(<span class="string">"VersionHistory.hasVersionLabel(Version, String) must return true if the label has been sucessfully added."</span>, vHistory.hasVersionLabel(rootVersion, versionLabel));
+<a name="137" href="#137">137</a>     }
+<a name="138" href="#138">138</a> 
+<a name="139" href="#139">139</a>     <em>/**<em>*</em></em>
+<a name="140" href="#140">140</a> <em>     * Test if multiple distinct version labels can be added for a given version.</em>
+<a name="141" href="#141">141</a> <em>     *</em>
+<a name="142" href="#142">142</a> <em>     * @throws RepositoryException</em>
+<a name="143" href="#143">143</a> <em>     */</em>
+<a name="144" href="#144">144</a>     <strong>public</strong> <strong>void</strong> testAddMultipleVersionLabels() throws RepositoryException {
+<a name="145" href="#145">145</a>         <strong>try</strong> {
+<a name="146" href="#146">146</a>             vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="147" href="#147">147</a>             vHistory.addVersionLabel(rootVersion.getName(), versionLabel2, false);
+<a name="148" href="#148">148</a>         } <strong>catch</strong> (VersionException e) {
+<a name="149" href="#149">149</a>             fail(<span class="string">"Adding multiple distict version labels to a version must be allowed."</span>);
+<a name="150" href="#150">150</a>         }
+<a name="151" href="#151">151</a>     }
+<a name="152" href="#152">152</a> 
+<a name="153" href="#153">153</a>     <em>/**<em>*</em></em>
+<a name="154" href="#154">154</a> <em>     * Test if VersionHistory.addVersionLabel(versionName, label, moveLabel)</em>
+<a name="155" href="#155">155</a> <em>     * throws VersionException the label already exists and if moveLabel is false)</em>
+<a name="156" href="#156">156</a> <em>     *</em>
+<a name="157" href="#157">157</a> <em>     * @throws RepositoryException</em>
+<a name="158" href="#158">158</a> <em>     */</em>
+<a name="159" href="#159">159</a>     <strong>public</strong> <strong>void</strong> testAddDuplicateVersionLabel() throws RepositoryException {
+<a name="160" href="#160">160</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="161" href="#161">161</a>         <strong>try</strong> {
+<a name="162" href="#162">162</a>             versionableNode.checkout();
+<a name="163" href="#163">163</a>             Version v = versionableNode.checkin();
+<a name="164" href="#164">164</a>             vHistory.addVersionLabel(v.getName(), versionLabel, false);
+<a name="165" href="#165">165</a> 
+<a name="166" href="#166">166</a>             fail(<span class="string">"Adding a version label that already exist in the version history must throw a VersionException."</span>);
+<a name="167" href="#167">167</a>         } <strong>catch</strong> (VersionException e) {
+<a name="168" href="#168">168</a>             <em class="comment">//success</em>
+<a name="169" href="#169">169</a>         }
+<a name="170" href="#170">170</a>     }
+<a name="171" href="#171">171</a> 
+<a name="172" href="#172">172</a>     <em>/**<em>*</em></em>
+<a name="173" href="#173">173</a> <em>     * Test if the 'moveLabel' flag moves an existing version label.</em>
+<a name="174" href="#174">174</a> <em>     *</em>
+<a name="175" href="#175">175</a> <em>     * @throws RepositoryException</em>
+<a name="176" href="#176">176</a> <em>     * @see VersionHistory#addVersionLabel(String, String, boolean)  with boolan flag equals true.</em>
+<a name="177" href="#177">177</a> <em>     */</em>
+<a name="178" href="#178">178</a>     <strong>public</strong> <strong>void</strong> testMoveLabel() throws RepositoryException {
+<a name="179" href="#179">179</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="180" href="#180">180</a>         <strong>try</strong> {
+<a name="181" href="#181">181</a>             versionableNode.checkout();
+<a name="182" href="#182">182</a>             Version v = versionableNode.checkin();
+<a name="183" href="#183">183</a>             vHistory.addVersionLabel(v.getName(), versionLabel, <strong>true</strong>);
+<a name="184" href="#184">184</a> 
+<a name="185" href="#185">185</a>             <strong>if</strong> (!vHistory.hasVersionLabel(v, versionLabel)) {
+<a name="186" href="#186">186</a>                fail(<span class="string">"If 'moveLabel' is true, an existing version label must be moved to the indicated version."</span>);
+<a name="187" href="#187">187</a>             }
+<a name="188" href="#188">188</a> 
+<a name="189" href="#189">189</a>         } <strong>catch</strong> (VersionException e) {
+<a name="190" href="#190">190</a>             fail(<span class="string">"If 'moveLabel' is true, an existing version label must be moved to the indicated version."</span>);
+<a name="191" href="#191">191</a>         }
+<a name="192" href="#192">192</a>     }
+<a name="193" href="#193">193</a> 
+<a name="194" href="#194">194</a>     <em>/**<em>*</em></em>
+<a name="195" href="#195">195</a> <em>     * Test the removal of an version label that does not exist (must throw VersionException).</em>
+<a name="196" href="#196">196</a> <em>     *</em>
+<a name="197" href="#197">197</a> <em>     * @throws RepositoryException</em>
+<a name="198" href="#198">198</a> <em>     */</em>
+<a name="199" href="#199">199</a>     <strong>public</strong> <strong>void</strong> testRemoveNonExistingLabel() throws RepositoryException {
+<a name="200" href="#200">200</a>         <strong>if</strong> (vHistory.hasVersionLabel(versionLabel)) {
+<a name="201" href="#201">201</a>             fail(<span class="string">"Testing the removal on a non-existing version label failed: '"</span>+versionLabel+<span class="string">"' exists on version history."</span>);
+<a name="202" href="#202">202</a>         }
+<a name="203" href="#203">203</a>         <strong>try</strong> {
+<a name="204" href="#204">204</a>             vHistory.removeVersionLabel(versionLabel);
+<a name="205" href="#205">205</a>             fail(<span class="string">"VersionHistory.removeLabel(String) must throw a VersionException if the label does not exist."</span>);
+<a name="206" href="#206">206</a>         } <strong>catch</strong> (VersionException e) {
+<a name="207" href="#207">207</a>             <em class="comment">// success</em>
+<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>     <em>/**<em>*</em></em>
+<a name="212" href="#212">212</a> <em>     * Test the removal of an version label that has successfully been added</em>
+<a name="213" href="#213">213</a> <em>     * before.</em>
+<a name="214" href="#214">214</a> <em>     *</em>
+<a name="215" href="#215">215</a> <em>     * @throws RepositoryException</em>
+<a name="216" href="#216">216</a> <em>     * @see VersionHistory#removeVersionLabel(String)</em>
+<a name="217" href="#217">217</a> <em>     */</em>
+<a name="218" href="#218">218</a>     <strong>public</strong> <strong>void</strong> testRemoveLabel() throws RepositoryException {
+<a name="219" href="#219">219</a> 
+<a name="220" href="#220">220</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="221" href="#221">221</a>         vHistory.removeVersionLabel(versionLabel);
+<a name="222" href="#222">222</a> 
+<a name="223" href="#223">223</a>         assertFalse(<span class="string">"VersionHistory.removeLabel(String) must remove the version label if it exists (has successfully been added before)."</span>, vHistory.hasVersionLabel(versionLabel));
+<a name="224" href="#224">224</a>     }
+<a name="225" href="#225">225</a> 
+<a name="226" href="#226">226</a>     <em>/**<em>*</em></em>
+<a name="227" href="#227">227</a> <em>     * Test if VersionHistory.getVersionByLabel(String) returns the version that</em>
+<a name="228" href="#228">228</a> <em>     * has been specified with the addVersionLabel call.</em>
+<a name="229" href="#229">229</a> <em>     *</em>
+<a name="230" href="#230">230</a> <em>     * @throws RepositoryException</em>
+<a name="231" href="#231">231</a> <em>     * @see VersionHistory#getVersionByLabel(String)</em>
+<a name="232" href="#232">232</a> <em>     */</em>
+<a name="233" href="#233">233</a>     <strong>public</strong> <strong>void</strong> testGetVersionByLabel() throws RepositoryException {
+<a name="234" href="#234">234</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, <strong>true</strong>);
+<a name="235" href="#235">235</a>         Version v = vHistory.getVersionByLabel(versionLabel);
+<a name="236" href="#236">236</a> 
+<a name="237" href="#237">237</a>         assertEquals(<span class="string">"VersionHistory.getVersionByLabel(String) must retrieve the particular version that was specified in addVersionLabel call."</span>, v, rootVersion);
+<a name="238" href="#238">238</a>     }
+<a name="239" href="#239">239</a> 
+<a name="240" href="#240">240</a>     <em>/**<em>*</em></em>
+<a name="241" href="#241">241</a> <em>     * Test VersionHistory.getVersionLabels() returns all labels present on the version history.</em>
+<a name="242" href="#242">242</a> <em>     *</em>
+<a name="243" href="#243">243</a> <em>     * @throws RepositoryException</em>
+<a name="244" href="#244">244</a> <em>     * @see javax.jcr.version.VersionHistory#getVersionLabels()</em>
+<a name="245" href="#245">245</a> <em>     */</em>
+<a name="246" href="#246">246</a>     <strong>public</strong> <strong>void</strong> testGetVersionLabels() throws RepositoryException {
+<a name="247" href="#247">247</a> 
+<a name="248" href="#248">248</a>         HashSet testLabels = <strong>new</strong> HashSet(Arrays.asList(vHistory.getVersionLabels()));
+<a name="249" href="#249">249</a>         versionableNode.checkout();
+<a name="250" href="#250">250</a>         Version v = versionableNode.checkin();
+<a name="251" href="#251">251</a> 
+<a name="252" href="#252">252</a>         vHistory.addVersionLabel(v.getName(), versionLabel, false);
+<a name="253" href="#253">253</a>         testLabels.add(versionLabel);
+<a name="254" href="#254">254</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel2, false);
+<a name="255" href="#255">255</a>         testLabels.add(versionLabel2);
+<a name="256" href="#256">256</a> 
+<a name="257" href="#257">257</a>         String[] labels = vHistory.getVersionLabels();
+<a name="258" href="#258">258</a>         <strong>for</strong> (<strong>int</strong> i = 0; i &lt; labels.length; i++) {
+<a name="259" href="#259">259</a>             String l = labels[i];
+<a name="260" href="#260">260</a>             <strong>if</strong> (!testLabels.contains(l)) {
+<a name="261" href="#261">261</a>                 fail(<span class="string">"VersionHistory.getVersionLabels() must only return labels, that have been added to the history."</span>);
+<a name="262" href="#262">262</a>             }
+<a name="263" href="#263">263</a>             testLabels.remove(l);
+<a name="264" href="#264">264</a>         }
+<a name="265" href="#265">265</a> 
+<a name="266" href="#266">266</a>         assertTrue(<span class="string">"VersionHistory.getVersionLabels() must return all labels, that have been added to the history."</span>, testLabels.isEmpty());
+<a name="267" href="#267">267</a>     }
+<a name="268" href="#268">268</a> 
+<a name="269" href="#269">269</a>     <em>/**<em>*</em></em>
+<a name="270" href="#270">270</a> <em>     * Test VersionHistory.getVersionLabels(Version) only returns all labels present</em>
+<a name="271" href="#271">271</a> <em>     * for the specified version.</em>
+<a name="272" href="#272">272</a> <em>     * </em>
+<a name="273" href="#273">273</a> <em>     * @throws RepositoryException</em>
+<a name="274" href="#274">274</a> <em>     * @see VersionHistory#getVersionLabels(javax.jcr.version.Version)</em>
+<a name="275" href="#275">275</a> <em>     */</em>
+<a name="276" href="#276">276</a>     <strong>public</strong> <strong>void</strong> testGetVersionLabelsForVersion() throws RepositoryException {
+<a name="277" href="#277">277</a> 
+<a name="278" href="#278">278</a>         HashSet testLabels = <strong>new</strong> HashSet(Arrays.asList(vHistory.getVersionLabels(rootVersion)));
+<a name="279" href="#279">279</a> 
+<a name="280" href="#280">280</a>         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+<a name="281" href="#281">281</a>         testLabels.add(versionLabel);
+<a name="282" href="#282">282</a> 
+<a name="283" href="#283">283</a>         <em class="comment">// add a version label to another version (not added to the testLabel set)</em>
+<a name="284" href="#284">284</a>         versionableNode.checkout();
+<a name="285" href="#285">285</a>         Version v = versionableNode.checkin();
+<a name="286" href="#286">286</a>         vHistory.addVersionLabel(v.getName(), versionLabel2, false);
+<a name="287" href="#287">287</a> 
+<a name="288" href="#288">288</a>         String[] labels = vHistory.getVersionLabels(rootVersion);
+<a name="289" href="#289">289</a>         <strong>for</strong> (<strong>int</strong> i = 0; i &lt; labels.length; i++) {
+<a name="290" href="#290">290</a>             String l = labels[i];
+<a name="291" href="#291">291</a>             <strong>if</strong> (!testLabels.contains(l)) {
+<a name="292" href="#292">292</a>                 fail(<span class="string">"VersionHistory.getVersionLabels(Version) must only return labels, that have been added for this version."</span>);
+<a name="293" href="#293">293</a>             }
+<a name="294" href="#294">294</a>             testLabels.remove(l);
+<a name="295" href="#295">295</a>         }
+<a name="296" href="#296">296</a> 
+<a name="297" href="#297">297</a>         assertTrue(<span class="string">"VersionHistory.getVersionLabels(Version)  must return all labels, that have been added for this version."</span>, testLabels.isEmpty());
+<a name="298" href="#298">298</a>     }
+<a name="299" href="#299">299</a> 
+<a name="300" href="#300">300</a>     <em>/**<em>*</em></em>
+<a name="301" href="#301">301</a> <em>     * Test calling Node.restoreByLabel(String, boolean) on a non-versionable node.</em>
+<a name="302" href="#302">302</a> <em>     *</em>
+<a name="303" href="#303">303</a> <em>     * @throws javax.jcr.RepositoryException</em>
+<a name="304" href="#304">304</a> <em>     * @see javax.jcr.Node#restoreByLabel(String, boolean)</em>
+<a name="305" href="#305">305</a> <em>     */</em>
+<a name="306" href="#306">306</a>     <strong>public</strong> <strong>void</strong> testRestoreByLabelNonVersionableNode() throws RepositoryException {
+<a name="307" href="#307">307</a>         <strong>try</strong> {
+<a name="308" href="#308">308</a>             nonVersionableNode.restoreByLabel(versionLabel, <strong>true</strong>);
+<a name="309" href="#309">309</a>             fail(<span class="string">"Node.restoreByLabel(String, boolean) on a non versionable node must throw UnsupportedRepositoryOperationException"</span>);
+<a name="310" href="#310">310</a>         } <strong>catch</strong> (UnsupportedRepositoryOperationException e) {
+<a name="311" href="#311">311</a>             <em class="comment">//success</em>
+<a name="312" href="#312">312</a>         }
+<a name="313" href="#313">313</a>     }
+<a name="314" href="#314">314</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/VersionLabelTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.html Wed Feb  2 14:40:59 2005
@@ -0,0 +1,259 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>WorkspaceRestoreTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2004-2005 The Apache Software Foundation or its licensors,</em>
+<a name="3" href="#3">3</a>   <em class="comment"> *                     as applicable.</em>
+<a name="4" href="#4">4</a>   <em class="comment"> *</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *</em>
+<a name="9" href="#9">9</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a>  <em class="comment"> *</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/package-summary.html">org.apache.jackrabbit.test.api.version</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> org.apache.jackrabbit.test.NotExecutableException;
+<a name="20" href="#20">20</a>  
+<a name="21" href="#21">21</a>  <strong>import</strong> javax.jcr.nodetype.NodeDef;
+<a name="22" href="#22">22</a>  <strong>import</strong> javax.jcr.version.Version;
+<a name="23" href="#23">23</a>  <strong>import</strong> javax.jcr.version.VersionException;
+<a name="24" href="#24">24</a>  <strong>import</strong> javax.jcr.version.OnParentVersionAction;
+<a name="25" href="#25">25</a>  <strong>import</strong> javax.jcr.Session;
+<a name="26" href="#26">26</a>  <strong>import</strong> javax.jcr.Node;
+<a name="27" href="#27">27</a>  <strong>import</strong> javax.jcr.RepositoryException;
+<a name="28" href="#28">28</a>  <strong>import</strong> javax.jcr.ItemNotFoundException;
+<a name="29" href="#29">29</a>  <strong>import</strong> javax.jcr.InvalidItemStateException;
+<a name="30" href="#30">30</a>  <strong>import</strong> javax.jcr.ItemExistsException;
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>  <em>/**<em>*</em></em>
+<a name="33" href="#33">33</a>  <em> * &lt;code>WorkspaceRestoreTest&lt;/code> provides test methods for the {@link javax.jcr.Workspace#restore(javax.jcr.version.Version[], boolean)}</em>
+<a name="34" href="#34">34</a>  <em> * method.</em>
+<a name="35" href="#35">35</a>  <em> *</em>
+<a name="36" href="#36">36</a>  <em> * @test</em>
+<a name="37" href="#37">37</a>  <em> * @sources WorkspaceRestoreTest.java</em>
+<a name="38" href="#38">38</a>  <em> * @executeClass org.apache.jackrabbit.test.api.version.WorkspaceRestoreTest</em>
+<a name="39" href="#39">39</a>  <em> * @keywords versioning</em>
+<a name="40" href="#40">40</a>  <em> */</em>
+<a name="41" href="#41">41</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.html">WorkspaceRestoreTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/RestoreTest.html">RestoreTest</a> {
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>      Session wSuperuser;
+<a name="44" href="#44">44</a>      Node wTestRoot;
+<a name="45" href="#45">45</a>      Node wVersionableNode;
+<a name="46" href="#46">46</a>      Node wVersionableNode2;
+<a name="47" href="#47">47</a>      Node wVersionableChildNode;
+<a name="48" href="#48">48</a>  
+<a name="49" href="#49">49</a>      Version wChildVersion;
+<a name="50" href="#50">50</a>  
+<a name="51" href="#51">51</a>      <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="52" href="#52">52</a>          <strong>super</strong>.setUp();
+<a name="53" href="#53">53</a>  
+<a name="54" href="#54">54</a>          <strong>try</strong> {
+<a name="55" href="#55">55</a>              wSuperuser = helper.getSuperuserSession(workspaceName);
+<a name="56" href="#56">56</a>          } <strong>catch</strong> (RepositoryException e) {
+<a name="57" href="#57">57</a>              fail(<span class="string">"Failed to retrieve superuser session for second workspace '"</span>+workspaceName+<span class="string">"': "</span>+e.getMessage());
+<a name="58" href="#58">58</a>          }
+<a name="59" href="#59">59</a>  
+<a name="60" href="#60">60</a>          <em class="comment">// test if the required nodes exist in the second workspace if not try to clone them</em>
+<a name="61" href="#61">61</a>          <strong>try</strong> {
+<a name="62" href="#62">62</a>              testRootNode.getCorrespondingNodePath(workspaceName);
+<a name="63" href="#63">63</a>          } <strong>catch</strong> (ItemNotFoundException e) {
+<a name="64" href="#64">64</a>              <em class="comment">// clone testRoot</em>
+<a name="65" href="#65">65</a>              wSuperuser.getWorkspace().clone(superuser.getWorkspace().getName(), testRoot, testRoot, <strong>true</strong>);
+<a name="66" href="#66">66</a>          }
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>          <strong>try</strong> {
+<a name="69" href="#69">69</a>              versionableNode.getCorrespondingNodePath(workspaceName);
+<a name="70" href="#70">70</a>          } <strong>catch</strong> (ItemNotFoundException e) {
+<a name="71" href="#71">71</a>              <em class="comment">// clone versionable node</em>
+<a name="72" href="#72">72</a>              wSuperuser.getWorkspace().clone(superuser.getWorkspace().getName(), versionableNode.getPath(), versionableNode.getPath(), <strong>true</strong>);
+<a name="73" href="#73">73</a>          }
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>          <strong>try</strong> {
+<a name="76" href="#76">76</a>              versionableNode2.getCorrespondingNodePath(workspaceName);
+<a name="77" href="#77">77</a>          } <strong>catch</strong> (ItemNotFoundException e) {
+<a name="78" href="#78">78</a>              <em class="comment">// clone second versionable node</em>
+<a name="79" href="#79">79</a>              wSuperuser.getWorkspace().clone(superuser.getWorkspace().getName(), versionableNode2.getPath(), versionableNode2.getPath(), <strong>true</strong>);
+<a name="80" href="#80">80</a>          }
+<a name="81" href="#81">81</a>  
+<a name="82" href="#82">82</a>          <strong>try</strong> {
+<a name="83" href="#83">83</a>              <em class="comment">// set node-fields (wTestRoot, wVersionableNode, wVersionableNode2)</em>
+<a name="84" href="#84">84</a>              <em class="comment">// and check versionable nodes out.</em>
+<a name="85" href="#85">85</a>              wTestRoot = wSuperuser.getNodeByUUID(testRootNode.getUUID());
+<a name="86" href="#86">86</a>  
+<a name="87" href="#87">87</a>              wVersionableNode = wSuperuser.getNodeByUUID(versionableNode.getUUID());
+<a name="88" href="#88">88</a>              wVersionableNode.checkout();
+<a name="89" href="#89">89</a>  
+<a name="90" href="#90">90</a>              wVersionableNode2 = wSuperuser.getNodeByUUID(versionableNode2.getUUID());
+<a name="91" href="#91">91</a>              wVersionableNode2.checkout();
+<a name="92" href="#92">92</a>  
+<a name="93" href="#93">93</a>          } <strong>catch</strong> (RepositoryException e) {
+<a name="94" href="#94">94</a>              fail(<span class="string">"Failed to setup test environment in workspace: "</span>+e.getMessage());
+<a name="95" href="#95">95</a>          }
+<a name="96" href="#96">96</a>  
+<a name="97" href="#97">97</a>          <em class="comment">// create persistent versionable CHILD-node below wVersionableNode in workspace 2</em>
+<a name="98" href="#98">98</a>          <em class="comment">// that is not present in the default workspace.</em>
+<a name="99" href="#99">99</a>          <strong>try</strong> {
+<a name="100" href="#100">100</a>             wVersionableChildNode = createVersionableNode(wVersionableNode, nodeName4, versionableNodeType);
+<a name="101" href="#101">101</a>         } <strong>catch</strong> (RepositoryException e) {
+<a name="102" href="#102">102</a>             fail(<span class="string">"Failed to create versionable child node in second workspace: "</span> + e.getMessage());
+<a name="103" href="#103">103</a>         }
+<a name="104" href="#104">104</a> 
+<a name="105" href="#105">105</a>         <em class="comment">// create a version of the versionable child node</em>
+<a name="106" href="#106">106</a>         wVersionableChildNode.checkout();
+<a name="107" href="#107">107</a>         wChildVersion = wVersionableChildNode.checkin();
+<a name="108" href="#108">108</a>         wVersionableChildNode.checkout();
+<a name="109" href="#109">109</a>     }
+<a name="110" href="#110">110</a> 
+<a name="111" href="#111">111</a> 
+<a name="112" href="#112">112</a>     <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="113" href="#113">113</a>         <strong>try</strong> {
+<a name="114" href="#114">114</a>             <em class="comment">// remove all versionable nodes below the test</em>
+<a name="115" href="#115">115</a>             wVersionableNode.remove();
+<a name="116" href="#116">116</a>             wVersionableNode2.remove();
+<a name="117" href="#117">117</a>             wTestRoot.save();
+<a name="118" href="#118">118</a>         } <strong>finally</strong> {
+<a name="119" href="#119">119</a>             <strong>super</strong>.tearDown();
+<a name="120" href="#120">120</a>         }
+<a name="121" href="#121">121</a>     }
+<a name="122" href="#122">122</a> 
+<a name="123" href="#123">123</a>     <em>/**<em>*</em></em>
+<a name="124" href="#124">124</a> <em>     * Test if InvalidItemStateException is thrown if the session affected by</em>
+<a name="125" href="#125">125</a> <em>     * Workspace.restore(Version[], boolean) has pending changes.</em>
+<a name="126" href="#126">126</a> <em>     */</em>
+<a name="127" href="#127">127</a>     <strong>public</strong> <strong>void</strong> testWorkspaceRestoreWithPendingChanges() throws RepositoryException {
+<a name="128" href="#128">128</a>         versionableNode.checkout();
+<a name="129" href="#129">129</a>         <strong>try</strong> {
+<a name="130" href="#130">130</a>             <em class="comment">// modify node without calling save()</em>
+<a name="131" href="#131">131</a>             versionableNode.setProperty(propertyName1, propertyValue);
+<a name="132" href="#132">132</a> 
+<a name="133" href="#133">133</a>             <em class="comment">// create version in second workspace</em>
+<a name="134" href="#134">134</a>             Version v = wVersionableNode.checkin();
+<a name="135" href="#135">135</a>             <em class="comment">// try to restore that version</em>
+<a name="136" href="#136">136</a>             superuser.getWorkspace().restore(<strong>new</strong> Version[] {v}, false);
+<a name="137" href="#137">137</a> 
+<a name="138" href="#138">138</a>             fail(<span class="string">"InvalidItemStateException must be thrown on attempt to call Workspace.restore(Version[], boolean) in a session having any unsaved changes pending."</span>);
+<a name="139" href="#139">139</a>         } <strong>catch</strong> (InvalidItemStateException e) {
+<a name="140" href="#140">140</a>             <em class="comment">// success</em>
+<a name="141" href="#141">141</a>         }
+<a name="142" href="#142">142</a>     }
+<a name="143" href="#143">143</a> 
+<a name="144" href="#144">144</a>     <em>/**<em>*</em></em>
+<a name="145" href="#145">145</a> <em>     * Test if VersionException is thrown if the specified version array does</em>
+<a name="146" href="#146">146</a> <em>     * not contain a version that has a corresponding node in this workspace.</em>
+<a name="147" href="#147">147</a> <em>     */</em>
+<a name="148" href="#148">148</a>     <strong>public</strong> <strong>void</strong> testWorkspaceRestoreHasCorrespondingNode() throws RepositoryException {
+<a name="149" href="#149">149</a>         <strong>try</strong> {
+<a name="150" href="#150">150</a>             superuser.getWorkspace().restore(<strong>new</strong> Version[] {wChildVersion}, false);
+<a name="151" href="#151">151</a>             fail(<span class="string">"Workspace.restore(Version[], boolean) must throw VersionException if non of the specified versions has a corresponding node in the workspace."</span>);
+<a name="152" href="#152">152</a>         } <strong>catch</strong> (VersionException e) {
+<a name="153" href="#153">153</a>             <em class="comment">// success</em>
+<a name="154" href="#154">154</a>         }
+<a name="155" href="#155">155</a>     }
+<a name="156" href="#156">156</a> 
+<a name="157" href="#157">157</a>     <em>/**<em>*</em></em>
+<a name="158" href="#158">158</a> <em>     * Test if Workspace.restore(Version[], boolean) succeeds if the following two</em>
+<a name="159" href="#159">159</a> <em>     * preconditions are fulfilled:&lt;ul></em>
+<a name="160" href="#160">160</a> <em>     * &lt;li>For every version V in S that corresponds to a missing node in the workspace,</em>
+<a name="161" href="#161">161</a> <em>     * there must also be a parent of V in S.&lt;/li></em>
+<a name="162" href="#162">162</a> <em>     * &lt;li>S must contain at least one version that corresponds to an existing</em>
+<a name="163" href="#163">163</a> <em>     * node in the workspace.&lt;/li></em>
+<a name="164" href="#164">164</a> <em>     * &lt;/ul></em>
+<a name="165" href="#165">165</a> <em>     */</em>
+<a name="166" href="#166">166</a>     <strong>public</strong> <strong>void</strong> testWorkspaceRestoreWithParent() throws RepositoryException {
+<a name="167" href="#167">167</a> 
+<a name="168" href="#168">168</a>         <strong>try</strong> {
+<a name="169" href="#169">169</a>             Version parentV = wVersionableNode.checkin();
+<a name="170" href="#170">170</a>             superuser.getWorkspace().restore(<strong>new</strong> Version[] {parentV, wChildVersion}, false);
+<a name="171" href="#171">171</a>         } <strong>catch</strong> (RepositoryException e) {
+<a name="172" href="#172">172</a>             fail(<span class="string">"Workspace.restore(Version[], boolean) with a version that has no corresponding node must succeed if a version of a parent with correspondance is present in the version array."</span>);
+<a name="173" href="#173">173</a>         }
+<a name="174" href="#174">174</a>     }
+<a name="175" href="#175">175</a> 
+<a name="176" href="#176">176</a>     <em>/**<em>*</em></em>
+<a name="177" href="#177">177</a> <em>     * Test if the removeExisting-flag removes an existing node in case of uuid conflict.</em>
+<a name="178" href="#178">178</a> <em>     */</em>
+<a name="179" href="#179">179</a>     <strong>public</strong> <strong>void</strong> testWorkspaceRestoreWithRemoveExisting()  throws NotExecutableException, RepositoryException {
+<a name="180" href="#180">180</a>         <em class="comment">// assert proper child node definition</em>
+<a name="181" href="#181">181</a>         NodeDef d = wVersionableChildNode.getDefinition();
+<a name="182" href="#182">182</a>         <strong>if</strong> (d.getOnParentVersion() != OnParentVersionAction.COPY || d.getOnParentVersion() != OnParentVersionAction.VERSION) {
+<a name="183" href="#183">183</a>             fail(<span class="string">"Childnode must have OPV COPY or VERSION in order to be able to test Node.restore with uuid conflict"</span>);
+<a name="184" href="#184">184</a>         }
+<a name="185" href="#185">185</a> 
+<a name="186" href="#186">186</a>         <em class="comment">// create version for parentNode of childNode</em>
+<a name="187" href="#187">187</a>         Version parentV = versionableNode.checkin();
+<a name="188" href="#188">188</a> 
+<a name="189" href="#189">189</a>         <em class="comment">// move child node in order to produce the uuid conflict</em>
+<a name="190" href="#190">190</a>         String newChildPath = wVersionableNode2.getPath() + <span class="string">"/"</span> + wVersionableChildNode.getName();
+<a name="191" href="#191">191</a>         wSuperuser.move(wVersionableChildNode.getPath(), newChildPath);
+<a name="192" href="#192">192</a>         wTestRoot.save();
+<a name="193" href="#193">193</a> 
+<a name="194" href="#194">194</a>         <em class="comment">// restore the parent with removeExisting == true >> moved child node</em>
+<a name="195" href="#195">195</a>         <em class="comment">// must be removed.</em>
+<a name="196" href="#196">196</a>         wSuperuser.getWorkspace().restore(<strong>new</strong> Version[] {parentV}, <strong>true</strong>);
+<a name="197" href="#197">197</a>         <strong>if</strong> (wSuperuser.itemExists(newChildPath)) {
+<a name="198" href="#198">198</a>             fail(<span class="string">"Workspace.restore(Version[], boolean) with the boolean flag set to true, must remove the existing node in case of Uuid conflict."</span>);
+<a name="199" href="#199">199</a>         }
+<a name="200" href="#200">200</a>     }
+<a name="201" href="#201">201</a> 
+<a name="202" href="#202">202</a>     <em>/**<em>*</em></em>
+<a name="203" href="#203">203</a> <em>     * Tests if restoring the &lt;code>Version&lt;/code> of an existing node throws an</em>
+<a name="204" href="#204">204</a> <em>     * &lt;code>ItemExistsException&lt;/code> if removeExisting is set to FALSE.</em>
+<a name="205" href="#205">205</a> <em>     */</em>
+<a name="206" href="#206">206</a>     <strong>public</strong> <strong>void</strong> testWorkspaceRestoreWithUUIDConflict() throws RepositoryException, NotExecutableException {
+<a name="207" href="#207">207</a>         <strong>try</strong> {
+<a name="208" href="#208">208</a>             <em class="comment">// Verify that nodes used for the test are indeed versionable</em>
+<a name="209" href="#209">209</a>             NodeDef nd = wVersionableNode.getDefinition();
+<a name="210" href="#210">210</a>             <strong>if</strong> ( nd.getOnParentVersion() != OnParentVersionAction.COPY || nd.getOnParentVersion() != OnParentVersionAction.VERSION ) {
+<a name="211" href="#211">211</a>                 <strong>throw</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/NotExecutableException.html">NotExecutableException</a>( <span class="string">"Nodes must be versionable in order to run this test."</span> );
+<a name="212" href="#212">212</a>             }
+<a name="213" href="#213">213</a> 
+<a name="214" href="#214">214</a>             Version v = wVersionableNode.checkin();
+<a name="215" href="#215">215</a> 
+<a name="216" href="#216">216</a>             wSuperuser.move( wVersionableChildNode.getPath(), wVersionableNode2.getPath() + <span class="string">"/"</span> + wVersionableChildNode.getName() );
+<a name="217" href="#217">217</a>             wSuperuser.getWorkspace().restore( <strong>new</strong> Version[] { v }, false );
+<a name="218" href="#218">218</a> 
+<a name="219" href="#219">219</a>             fail( <span class="string">"Node.restore( Version, boolean ): An ItemExistsException must be thrown if the node to be restored already exsits and removeExisting was set to false."</span> );
+<a name="220" href="#220">220</a>         } <strong>catch</strong> (ItemExistsException e ) {
+<a name="221" href="#221">221</a>             <em class="comment">// success</em>
+<a name="222" href="#222">222</a>         }
+<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>     <em>/**<em>*</em></em>
+<a name="227" href="#227">227</a> <em>     * Test if workspace-restoring a node works on checked-in node.</em>
+<a name="228" href="#228">228</a> <em>     */</em>
+<a name="229" href="#229">229</a>     <strong>public</strong> <strong>void</strong> testWorkspaceRestoreOnCheckedInNode() throws RepositoryException {
+<a name="230" href="#230">230</a>         <strong>if</strong> ( versionableNode.isCheckedOut() ) {
+<a name="231" href="#231">231</a>             versionableNode.checkin();
+<a name="232" href="#232">232</a>         }
+<a name="233" href="#233">233</a>         superuser.getWorkspace().restore( <strong>new</strong> Version[] { rootVersion }, <strong>true</strong>);
+<a name="234" href="#234">234</a>     }
+<a name="235" href="#235">235</a> 
+<a name="236" href="#236">236</a>     <em>/**<em>*</em></em>
+<a name="237" href="#237">237</a> <em>     * Test if workspace-restoring a node works on checked-out node.</em>
+<a name="238" href="#238">238</a> <em>     */</em>
+<a name="239" href="#239">239</a>     <strong>public</strong> <strong>void</strong> testWorkspaceRestoreOnCheckedOutNode() throws RepositoryException {
+<a name="240" href="#240">240</a>         <strong>if</strong> ( !versionableNode.isCheckedOut() ) {
+<a name="241" href="#241">241</a>             versionableNode.checkout();
+<a name="242" href="#242">242</a>         }
+<a name="243" href="#243">243</a>         superuser.getWorkspace().restore( <strong>new</strong> Version[] { rootVersion }, <strong>true</strong>);
+<a name="244" href="#244">244</a>     }
+<a name="245" href="#245">245</a> 
+<a name="246" href="#246">246</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-frame.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-frame.html?view=diff&r1=151074&r2=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-frame.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-frame.html Wed Feb  2 14:40:59 2005
@@ -18,7 +18,67 @@
       <ul>
         
           <li>
+            <a href="AbstractOnParentVersionTest.html" target="classFrame">AbstractOnParentVersionTest</a>
+          </li>
+        
+          <li>
+            <a href="AbstractVersionTest.html" target="classFrame">AbstractVersionTest</a>
+          </li>
+        
+          <li>
+            <a href="CheckinTest.html" target="classFrame">CheckinTest</a>
+          </li>
+        
+          <li>
+            <a href="CheckoutTest.html" target="classFrame">CheckoutTest</a>
+          </li>
+        
+          <li>
+            <a href="OnParentVersionAbortTest.html" target="classFrame">OnParentVersionAbortTest</a>
+          </li>
+        
+          <li>
+            <a href="OnParentVersionComputeTest.html" target="classFrame">OnParentVersionComputeTest</a>
+          </li>
+        
+          <li>
+            <a href="OnParentVersionCopyTest.html" target="classFrame">OnParentVersionCopyTest</a>
+          </li>
+        
+          <li>
+            <a href="OnParentVersionIgnoreTest.html" target="classFrame">OnParentVersionIgnoreTest</a>
+          </li>
+        
+          <li>
+            <a href="OnParentVersionInitializeTest.html" target="classFrame">OnParentVersionInitializeTest</a>
+          </li>
+        
+          <li>
+            <a href="RemoveVersionTest.html" target="classFrame">RemoveVersionTest</a>
+          </li>
+        
+          <li>
+            <a href="RestoreTest.html" target="classFrame">RestoreTest</a>
+          </li>
+        
+          <li>
             <a href="TestAll.html" target="classFrame">TestAll</a>
+          </li>
+        
+          <li>
+            <a href="VersionGraphTest.html" target="classFrame">VersionGraphTest</a>
+          </li>
+        
+          <li>
+            <a href="VersionHistoryTest.html" target="classFrame">VersionHistoryTest</a>
+          </li>
+        
+          <li>
+            <a href="VersionLabelTest.html" target="classFrame">VersionLabelTest</a>
+          </li>
+        
+          <li>
+            <a href="WorkspaceRestoreTest.html" target="classFrame">WorkspaceRestoreTest</a>
           </li>
         
       </ul>

Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-summary.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-summary.html?view=diff&r1=151074&r2=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-summary.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/package-summary.html Wed Feb  2 14:40:59 2005
@@ -59,7 +59,97 @@
           
             <tr>
               <td>
+                <a href="AbstractOnParentVersionTest.html" target="classFrame">AbstractOnParentVersionTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="AbstractVersionTest.html" target="classFrame">AbstractVersionTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="CheckinTest.html" target="classFrame">CheckinTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="CheckoutTest.html" target="classFrame">CheckoutTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="OnParentVersionAbortTest.html" target="classFrame">OnParentVersionAbortTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="OnParentVersionComputeTest.html" target="classFrame">OnParentVersionComputeTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="OnParentVersionCopyTest.html" target="classFrame">OnParentVersionCopyTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="OnParentVersionIgnoreTest.html" target="classFrame">OnParentVersionIgnoreTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="OnParentVersionInitializeTest.html" target="classFrame">OnParentVersionInitializeTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="RemoveVersionTest.html" target="classFrame">RemoveVersionTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="RestoreTest.html" target="classFrame">RestoreTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
                 <a href="TestAll.html" target="classFrame">TestAll</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="VersionGraphTest.html" target="classFrame">VersionGraphTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="VersionHistoryTest.html" target="classFrame">VersionHistoryTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="VersionLabelTest.html" target="classFrame">VersionLabelTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="WorkspaceRestoreTest.html" target="classFrame">WorkspaceRestoreTest</a>
               </td>
             </tr>
           

Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/NodeRemovedTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/NodeRemovedTest.html?view=diff&r1=151074&r2=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/NodeRemovedTest.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/NodeRemovedTest.html Wed Feb  2 14:40:59 2005
@@ -38,7 +38,7 @@
 <a name="29" href="#29">29</a>      <strong>public</strong> <strong>void</strong> testSingleNodeRemoved() throws RepositoryException {
 <a name="30" href="#30">30</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
 <a name="31" href="#31">31</a>          addEventListener(result, Event.NODE_REMOVED);
-<a name="32" href="#32">32</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="32" href="#32">32</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="33" href="#33">33</a>          testRootNode.save();
 <a name="34" href="#34">34</a>          foo.remove();
 <a name="35" href="#35">35</a>          testRootNode.save();
@@ -50,8 +50,8 @@
 <a name="41" href="#41">41</a>      <strong>public</strong> <strong>void</strong> testMultiNodesRemoved() throws RepositoryException {
 <a name="42" href="#42">42</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
 <a name="43" href="#43">43</a>          addEventListener(result, Event.NODE_REMOVED);
-<a name="44" href="#44">44</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
-<a name="45" href="#45">45</a>          foo.addNode(<span class="string">"bar"</span>, NT_UNSTRUCTURED);
+<a name="44" href="#44">44</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
+<a name="45" href="#45">45</a>          foo.addNode(<span class="string">"bar"</span>);
 <a name="46" href="#46">46</a>          testRootNode.save();
 <a name="47" href="#47">47</a>          foo.remove();
 <a name="48" href="#48">48</a>          testRootNode.save();
@@ -63,9 +63,9 @@
 <a name="54" href="#54">54</a>      <strong>public</strong> <strong>void</strong> testMultiNodesRemovedWithRemaining() throws RepositoryException {
 <a name="55" href="#55">55</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
 <a name="56" href="#56">56</a>          addEventListener(result, Event.NODE_REMOVED);
-<a name="57" href="#57">57</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
-<a name="58" href="#58">58</a>          testRootNode.addNode(<span class="string">"foobar"</span>, NT_UNSTRUCTURED);
-<a name="59" href="#59">59</a>          foo.addNode(<span class="string">"bar"</span>, NT_UNSTRUCTURED);
+<a name="57" href="#57">57</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
+<a name="58" href="#58">58</a>          testRootNode.addNode(<span class="string">"foobar"</span>);
+<a name="59" href="#59">59</a>          foo.addNode(<span class="string">"bar"</span>);
 <a name="60" href="#60">60</a>          testRootNode.save();
 <a name="61" href="#61">61</a>          foo.remove();
 <a name="62" href="#62">62</a>          testRootNode.save();

Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyAddedTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyAddedTest.html?view=diff&r1=151074&r2=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyAddedTest.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyAddedTest.html Wed Feb  2 14:40:59 2005
@@ -38,19 +38,19 @@
 <a name="29" href="#29">29</a>      <strong>public</strong> <strong>void</strong> testSinglePropertyAdded() throws RepositoryException {
 <a name="30" href="#30">30</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
 <a name="31" href="#31">31</a>          addEventListener(result, Event.PROPERTY_ADDED);
-<a name="32" href="#32">32</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="32" href="#32">32</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="33" href="#33">33</a>          foo.setProperty(<span class="string">"prop1"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="34" href="#34">34</a>          testRootNode.save();
 <a name="35" href="#35">35</a>          removeEventListener(result);
 <a name="36" href="#36">36</a>          Event[] events = result.getEvents(DEFAULT_WAIT_TIMEOUT);
 <a name="37" href="#37">37</a>          checkPropertyAdded(events, <strong>new</strong> String[]{<span class="string">"foo/prop1"</span>,
-<a name="38" href="#38">38</a>                                                  <span class="string">"foo/"</span> + JCR_PRIMARY_TYPE});
+<a name="38" href="#38">38</a>                                                  <span class="string">"foo/"</span> + jcrPrimaryType});
 <a name="39" href="#39">39</a>      }
 <a name="40" href="#40">40</a>  
 <a name="41" href="#41">41</a>      <strong>public</strong> <strong>void</strong> testMultiPropertyAdded() throws RepositoryException {
 <a name="42" href="#42">42</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
 <a name="43" href="#43">43</a>          addEventListener(result, Event.PROPERTY_ADDED);
-<a name="44" href="#44">44</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="44" href="#44">44</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="45" href="#45">45</a>          foo.setProperty(<span class="string">"prop1"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="46" href="#46">46</a>          foo.setProperty(<span class="string">"prop2"</span>, <strong>new</strong> String[]{<span class="string">"bar"</span>});
 <a name="47" href="#47">47</a>          testRootNode.save();
@@ -58,7 +58,7 @@
 <a name="49" href="#49">49</a>          Event[] events = result.getEvents(DEFAULT_WAIT_TIMEOUT);
 <a name="50" href="#50">50</a>          checkPropertyAdded(events, <strong>new</strong> String[]{<span class="string">"foo/prop1"</span>,
 <a name="51" href="#51">51</a>                                                  <span class="string">"foo/prop2"</span>,
-<a name="52" href="#52">52</a>                                                  <span class="string">"foo/"</span> + JCR_PRIMARY_TYPE});
+<a name="52" href="#52">52</a>                                                  <span class="string">"foo/"</span> + jcrPrimaryType});
 <a name="53" href="#53">53</a>      }
 <a name="54" href="#54">54</a>  
 <a name="55" href="#55">55</a>  

Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyChangedTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyChangedTest.html?view=diff&r1=151074&r2=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyChangedTest.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyChangedTest.html Wed Feb  2 14:40:59 2005
@@ -37,7 +37,7 @@
 <a name="28" href="#28">28</a>  
 <a name="29" href="#29">29</a>      <strong>public</strong> <strong>void</strong> testSinglePropertyChanged() throws RepositoryException {
 <a name="30" href="#30">30</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
-<a name="31" href="#31">31</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="31" href="#31">31</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="32" href="#32">32</a>          foo.setProperty(<span class="string">"bar"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="33" href="#33">33</a>          testRootNode.save();
 <a name="34" href="#34">34</a>          addEventListener(result, Event.PROPERTY_CHANGED);
@@ -50,7 +50,7 @@
 <a name="41" href="#41">41</a>  
 <a name="42" href="#42">42</a>      <strong>public</strong> <strong>void</strong> testMultiPropertyChanged() throws RepositoryException {
 <a name="43" href="#43">43</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
-<a name="44" href="#44">44</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="44" href="#44">44</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="45" href="#45">45</a>          foo.setProperty(<span class="string">"prop1"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="46" href="#46">46</a>          foo.setProperty(<span class="string">"prop2"</span>, <strong>new</strong> String[]{<span class="string">"bar"</span>});
 <a name="47" href="#47">47</a>          testRootNode.save();
@@ -65,7 +65,7 @@
 <a name="56" href="#56">56</a>  
 <a name="57" href="#57">57</a>      <strong>public</strong> <strong>void</strong> testSinglePropertyChangedWithAdded() throws RepositoryException {
 <a name="58" href="#58">58</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
-<a name="59" href="#59">59</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="59" href="#59">59</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="60" href="#60">60</a>          foo.setProperty(<span class="string">"bar"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="61" href="#61">61</a>          testRootNode.save();
 <a name="62" href="#62">62</a>          addEventListener(result, Event.PROPERTY_CHANGED);
@@ -79,7 +79,7 @@
 <a name="70" href="#70">70</a>  
 <a name="71" href="#71">71</a>      <strong>public</strong> <strong>void</strong> testMultiPropertyChangedWithAdded() throws RepositoryException {
 <a name="72" href="#72">72</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
-<a name="73" href="#73">73</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="73" href="#73">73</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="74" href="#74">74</a>          foo.setProperty(<span class="string">"prop1"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="75" href="#75">75</a>          foo.setProperty(<span class="string">"prop2"</span>, <strong>new</strong> String[]{<span class="string">"bar"</span>});
 <a name="76" href="#76">76</a>          testRootNode.save();

Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyRemovedTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyRemovedTest.html?view=diff&r1=151074&r2=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyRemovedTest.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/observation/PropertyRemovedTest.html Wed Feb  2 14:40:59 2005
@@ -39,7 +39,7 @@
 <a name="30" href="#30">30</a>      <strong>public</strong> <strong>void</strong> testSinglePropertyRemoved() throws RepositoryException {
 <a name="31" href="#31">31</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
 <a name="32" href="#32">32</a>          addEventListener(result, Event.PROPERTY_REMOVED);
-<a name="33" href="#33">33</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="33" href="#33">33</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="34" href="#34">34</a>          Property prop1 = foo.setProperty(<span class="string">"prop1"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="35" href="#35">35</a>          foo.setProperty(<span class="string">"prop2"</span>, <strong>new</strong> String[]{<span class="string">"bar"</span>});
 <a name="36" href="#36">36</a>          testRootNode.save();
@@ -53,7 +53,7 @@
 <a name="44" href="#44">44</a>      <strong>public</strong> <strong>void</strong> testMultiPropertyRemoved() throws RepositoryException {
 <a name="45" href="#45">45</a>          <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a> result = <strong>new</strong> <a href="../../../../../org/apache/jackrabbit/test/observation/EventResult.html">EventResult</a>(log);
 <a name="46" href="#46">46</a>          addEventListener(result, Event.PROPERTY_REMOVED);
-<a name="47" href="#47">47</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>, NT_UNSTRUCTURED);
+<a name="47" href="#47">47</a>          Node foo = testRootNode.addNode(<span class="string">"foo"</span>);
 <a name="48" href="#48">48</a>          Property prop1 = foo.setProperty(<span class="string">"prop1"</span>, <strong>new</strong> String[]{<span class="string">"foo"</span>});
 <a name="49" href="#49">49</a>          Property prop2 = foo.setProperty(<span class="string">"prop2"</span>, <strong>new</strong> String[]{<span class="string">"bar"</span>});
 <a name="50" href="#50">50</a>          testRootNode.save();



Mime
View raw message