You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by fi...@apache.org on 2005/02/02 23:41:18 UTC
svn commit: r151075 [9/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/
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/AbstractVersionTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/AbstractVersionTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/AbstractVersionTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/AbstractVersionTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,161 @@
+<!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>AbstractVersionTest 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.AbstractJCRTest;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.nodetype.NodeTypeManager;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.nodetype.NoSuchNodeTypeException;
+<a name="23" href="#23">23</a> <strong>import</strong> javax.jcr.nodetype.NodeType;
+<a name="24" href="#24">24</a> <strong>import</strong> javax.jcr.Node;
+<a name="25" href="#25">25</a> <strong>import</strong> javax.jcr.RepositoryException;
+<a name="26" href="#26">26</a> <strong>import</strong> javax.jcr.version.VersionHistory;
+<a name="27" href="#27">27</a> <strong>import</strong> javax.jcr.version.VersionIterator;
+<a name="28" href="#28">28</a>
+<a name="29" href="#29">29</a> <em>/**<em>*</em></em>
+<a name="30" href="#30">30</a> <em> * <code>AbstractVersionTest</code> is the abstract base class for all</em>
+<a name="31" href="#31">31</a> <em> * versioning related test classes.</em>
+<a name="32" href="#32">32</a> <em> */</em>
+<a name="33" href="#33">33</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractVersionTest.html">AbstractVersionTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/AbstractJCRTest.html">AbstractJCRTest</a> {
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <strong>protected</strong> NodeType versionableNodeType;
+<a name="36" href="#36">36</a> <strong>protected</strong> NodeType nonVersionableNodeType;
+<a name="37" href="#37">37</a>
+<a name="38" href="#38">38</a> <strong>protected</strong> Node versionableNode;
+<a name="39" href="#39">39</a> <strong>protected</strong> Node nonVersionableNode;
+<a name="40" href="#40">40</a>
+<a name="41" href="#41">41</a> <strong>protected</strong> String propertyValue;
+<a name="42" href="#42">42</a>
+<a name="43" href="#43">43</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="44" href="#44">44</a> <strong>super</strong>.setUp();
+<a name="45" href="#45">45</a>
+<a name="46" href="#46">46</a> NodeTypeManager ntMgr = superuser.getWorkspace().getNodeTypeManager();
+<a name="47" href="#47">47</a>
+<a name="48" href="#48">48</a> <em class="comment">// assert that this repository support versioning</em>
+<a name="49" href="#49">49</a> <strong>try</strong> {
+<a name="50" href="#50">50</a> NodeType versionableNt = ntMgr.getNodeType(mixVersionable);
+<a name="51" href="#51">51</a> <strong>if</strong> (versionableNt == <strong>null</strong>) {
+<a name="52" href="#52">52</a> fail(<span class="string">"Repository does not support Versioning: mixin nodetype 'mix:versionable' is missing."</span>);
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a> } <strong>catch</strong> (NoSuchNodeTypeException e) {
+<a name="55" href="#55">55</a> fail(<span class="string">"Repository does not support Versioning: mixin nodetype 'mix:versionable' is missing."</span>);
+<a name="56" href="#56">56</a> }
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> <em class="comment">// retrieve versionable nodetype</em>
+<a name="59" href="#59">59</a> String versionableNodeTypeName = getProperty(<span class="string">"versionableNodeType"</span>);
+<a name="60" href="#60">60</a> <strong>try</strong> {
+<a name="61" href="#61">61</a> versionableNodeType = ntMgr.getNodeType(versionableNodeTypeName);
+<a name="62" href="#62">62</a> <strong>if</strong> (versionableNodeType == <strong>null</strong>) {
+<a name="63" href="#63">63</a> fail(<span class="string">"Property 'versionableNodeType' does not define a valid nodetype: '"</span>+versionableNodeTypeName+<span class="string">"'"</span>);
+<a name="64" href="#64">64</a> }
+<a name="65" href="#65">65</a> } <strong>catch</strong> (NoSuchNodeTypeException e) {
+<a name="66" href="#66">66</a> fail(<span class="string">"Property 'versionableNodeType' does not define an existing nodetype: '"</span>+versionableNodeTypeName+<span class="string">"'"</span>);
+<a name="67" href="#67">67</a> }
+<a name="68" href="#68">68</a>
+<a name="69" href="#69">69</a> <em class="comment">// make sure 'non-versionable' nodetype is properly defined</em>
+<a name="70" href="#70">70</a> <strong>try</strong> {
+<a name="71" href="#71">71</a> nonVersionableNodeType = ntMgr.getNodeType(testNodeType);
+<a name="72" href="#72">72</a> <strong>if</strong> (nonVersionableNodeType == <strong>null</strong> || nonVersionableNodeType.isNodeType(mixVersionable)) {
+<a name="73" href="#73">73</a> fail(<span class="string">"Property 'testNodeType' does define a versionable nodetype: '"</span>+testNodeType+<span class="string">"'"</span>);
+<a name="74" href="#74">74</a> }
+<a name="75" href="#75">75</a> } <strong>catch</strong> (NoSuchNodeTypeException e) {
+<a name="76" href="#76">76</a> fail(<span class="string">"Property 'testNodeType' does not define an existing nodetype: '"</span>+testNodeType+<span class="string">"'"</span>);
+<a name="77" href="#77">77</a> }
+<a name="78" href="#78">78</a>
+<a name="79" href="#79">79</a> <em class="comment">// build persistent versionable and non-versionable nodes</em>
+<a name="80" href="#80">80</a> <strong>try</strong> {
+<a name="81" href="#81">81</a> versionableNode = createVersionableNode(testRootNode, nodeName1, versionableNodeType);
+<a name="82" href="#82">82</a> } <strong>catch</strong> (RepositoryException e) {
+<a name="83" href="#83">83</a> fail(<span class="string">"Failed to create versionable test node."</span> + e.getMessage());
+<a name="84" href="#84">84</a> }
+<a name="85" href="#85">85</a> <strong>try</strong> {
+<a name="86" href="#86">86</a> nonVersionableNode = testRootNode.addNode(nodeName3, nonVersionableNodeType.getName());
+<a name="87" href="#87">87</a> testRootNode.save();
+<a name="88" href="#88">88</a> } <strong>catch</strong> (RepositoryException e) {
+<a name="89" href="#89">89</a> fail(<span class="string">"Failed to create non-versionable test node."</span> + e.getMessage());
+<a name="90" href="#90">90</a> }
+<a name="91" href="#91">91</a>
+<a name="92" href="#92">92</a> propertyValue = getProperty(<span class="string">"propertyValue"</span>);
+<a name="93" href="#93">93</a> <strong>if</strong> (propertyValue == <strong>null</strong>) {
+<a name="94" href="#94">94</a> fail(<span class="string">"Property 'propertyValue' is not defined."</span>);
+<a name="95" href="#95">95</a> }
+<a name="96" href="#96">96</a> }
+<a name="97" href="#97">97</a>
+<a name="98" href="#98">98</a> <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="99" href="#99">99</a> <em class="comment">// remove versionable nodes</em>
+<a name="100" href="#100">100</a> <strong>try</strong> {
+<a name="101" href="#101">101</a> versionableNode.remove();
+<a name="102" href="#102">102</a> testRootNode.save();
+<a name="103" href="#103">103</a> } <strong>finally</strong> {
+<a name="104" href="#104">104</a> <strong>super</strong>.tearDown();
+<a name="105" href="#105">105</a> }
+<a name="106" href="#106">106</a> }
+<a name="107" href="#107">107</a>
+<a name="108" href="#108">108</a> <em>/**<em>*</em></em>
+<a name="109" href="#109">109</a> <em> * Retrieve the number of versions present in the given version history.</em>
+<a name="110" href="#110">110</a> <em> *</em>
+<a name="111" href="#111">111</a> <em> * @param vHistory</em>
+<a name="112" href="#112">112</a> <em> * @return number of versions</em>
+<a name="113" href="#113">113</a> <em> * @throws RepositoryException</em>
+<a name="114" href="#114">114</a> <em> */</em>
+<a name="115" href="#115">115</a> <strong>protected</strong> <strong>long</strong> getNumberOfVersions(VersionHistory vHistory) throws RepositoryException {
+<a name="116" href="#116">116</a> VersionIterator vIter = vHistory.getAllVersions();
+<a name="117" href="#117">117</a> <strong>long</strong> numOfVersions = vIter.getSize();
+<a name="118" href="#118">118</a> <strong>if</strong> (numOfVersions == -1) {
+<a name="119" href="#119">119</a> numOfVersions = 0;
+<a name="120" href="#120">120</a> <strong>while</strong> (vIter.hasNext()) {
+<a name="121" href="#121">121</a> vIter.nextVersion();
+<a name="122" href="#122">122</a> numOfVersions++;
+<a name="123" href="#123">123</a> }
+<a name="124" href="#124">124</a> }
+<a name="125" href="#125">125</a> <strong>return</strong> numOfVersions;
+<a name="126" href="#126">126</a> }
+<a name="127" href="#127">127</a>
+<a name="128" href="#128">128</a> <em>/**<em>*</em></em>
+<a name="129" href="#129">129</a> <em> * Create a versionable node below the given parent node. If the specified</em>
+<a name="130" href="#130">130</a> <em> * nodetype name is not mix:versionable an attempt is made to add the</em>
+<a name="131" href="#131">131</a> <em> * mix:versionable mixin type to the created child node.</em>
+<a name="132" href="#132">132</a> <em> *</em>
+<a name="133" href="#133">133</a> <em> * @param parent</em>
+<a name="134" href="#134">134</a> <em> * @param name</em>
+<a name="135" href="#135">135</a> <em> * @param nodetype</em>
+<a name="136" href="#136">136</a> <em> * @return versionable node.</em>
+<a name="137" href="#137">137</a> <em> * @throws RepositoryException</em>
+<a name="138" href="#138">138</a> <em> */</em>
+<a name="139" href="#139">139</a> <strong>protected</strong> Node createVersionableNode(Node parent, String name, NodeType nodetype) throws RepositoryException {
+<a name="140" href="#140">140</a> Node versionableNode = parent.addNode(name, nodetype.getName());
+<a name="141" href="#141">141</a> <strong>if</strong> (!nodetype.isNodeType(mixVersionable)) {
+<a name="142" href="#142">142</a> versionableNode.addMixin(mixVersionable);
+<a name="143" href="#143">143</a> }
+<a name="144" href="#144">144</a> parent.save();
+<a name="145" href="#145">145</a>
+<a name="146" href="#146">146</a> <strong>return</strong> versionableNode;
+<a name="147" href="#147">147</a> }
+<a name="148" href="#148">148</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/AbstractVersionTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckinTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckinTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckinTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckinTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,183 @@
+<!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>CheckinTest 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.version.Version;
+<a name="20" href="#20">20</a> <strong>import</strong> javax.jcr.RepositoryException;
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.Value;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.ReferenceValue;
+<a name="23" href="#23">23</a> <strong>import</strong> javax.jcr.InvalidItemStateException;
+<a name="24" href="#24">24</a> <strong>import</strong> javax.jcr.UnsupportedRepositoryOperationException;
+<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> * <code>CheckinTest</code> covers tests related to {@link javax.jcr.Node#checkin()}.</em>
+<a name="29" href="#29">29</a> <em> *</em>
+<a name="30" href="#30">30</a> <em> * @test</em>
+<a name="31" href="#31">31</a> <em> * @sources CheckinTest.java</em>
+<a name="32" href="#32">32</a> <em> * @executeClass org.apache.jackrabbit.test.api.version.CheckinTest</em>
+<a name="33" href="#33">33</a> <em> * @keywords versioning</em>
+<a name="34" href="#34">34</a> <em> */</em>
+<a name="35" href="#35">35</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/CheckinTest.html">CheckinTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractVersionTest.html">AbstractVersionTest</a> {
+<a name="36" href="#36">36</a>
+<a name="37" href="#37">37</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="38" href="#38">38</a> <strong>super</strong>.setUp();
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> versionableNode.checkout();
+<a name="41" href="#41">41</a> }
+<a name="42" href="#42">42</a>
+<a name="43" href="#43">43</a> <em>/**<em>*</em></em>
+<a name="44" href="#44">44</a> <em> * Test if Node.isCheckedOut() return false after calling Node.checkin()</em>
+<a name="45" href="#45">45</a> <em> *</em>
+<a name="46" href="#46">46</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="47" href="#47">47</a> <em> */</em>
+<a name="48" href="#48">48</a> <strong>public</strong> <strong>void</strong> testIsCheckedOut() throws RepositoryException {
+<a name="49" href="#49">49</a> versionableNode.checkin();
+<a name="50" href="#50">50</a> assertTrue(<span class="string">"After calling Node.checkin() on a versionable node N, N.isCheckedOut() must return false"</span>, versionableNode.isCheckedOut() == false);
+<a name="51" href="#51">51</a> }
+<a name="52" href="#52">52</a>
+<a name="53" href="#53">53</a> <em>/**<em>*</em></em>
+<a name="54" href="#54">54</a> <em> * Test if the node's jcr:predecessors property contains an empty value array</em>
+<a name="55" href="#55">55</a> <em> * after checkin.</em>
+<a name="56" href="#56">56</a> <em> *</em>
+<a name="57" href="#57">57</a> <em> * @throws RepositoryException</em>
+<a name="58" href="#58">58</a> <em> */</em>
+<a name="59" href="#59">59</a> <strong>public</strong> <strong>void</strong> testCheckinRemovesPredecessorProperty() throws RepositoryException {
+<a name="60" href="#60">60</a>
+<a name="61" href="#61">61</a> versionableNode.checkin();
+<a name="62" href="#62">62</a> Value[] predecessorsValue = versionableNode.getProperty(jcrPredecessors).getValues();
+<a name="63" href="#63">63</a>
+<a name="64" href="#64">64</a> assertTrue(<span class="string">"Checkin must set the node's jcr:predecessors property to the empty array"</span>, predecessorsValue.length == 0);
+<a name="65" href="#65">65</a> }
+<a name="66" href="#66">66</a>
+<a name="67" href="#67">67</a> <em>/**<em>*</em></em>
+<a name="68" href="#68">68</a> <em> * Test if the nodes jcr:predecessors property is copied to the new version</em>
+<a name="69" href="#69">69</a> <em> * on Node.checkin().</em>
+<a name="70" href="#70">70</a> <em> *</em>
+<a name="71" href="#71">71</a> <em> * @throws RepositoryException</em>
+<a name="72" href="#72">72</a> <em> */</em>
+<a name="73" href="#73">73</a> <strong>public</strong> <strong>void</strong> testPredecessorIsCopiedToNewVersion() throws RepositoryException {
+<a name="74" href="#74">74</a>
+<a name="75" href="#75">75</a> Value[] nPredecessorsValue = versionableNode.getProperty(jcrPredecessors).getValues();
+<a name="76" href="#76">76</a>
+<a name="77" href="#77">77</a> Version v = versionableNode.checkin();
+<a name="78" href="#78">78</a> Value[] vPredecessorsValue = v.getProperty(jcrPredecessors).getValues();
+<a name="79" href="#79">79</a>
+<a name="80" href="#80">80</a> assertEquals(<span class="string">"The versionable checked-out nodes jcr:predecessors property is copied to the new version on checkin."</span>, Arrays.asList(nPredecessorsValue), Arrays.asList(vPredecessorsValue));
+<a name="81" href="#81">81</a> }
+<a name="82" href="#82">82</a>
+<a name="83" href="#83">83</a> <em>/**<em>*</em></em>
+<a name="84" href="#84">84</a> <em> * Test if Node.checkin() on a checked-in node has no effect.</em>
+<a name="85" href="#85">85</a> <em> *</em>
+<a name="86" href="#86">86</a> <em> * @throws RepositoryException</em>
+<a name="87" href="#87">87</a> <em> */</em>
+<a name="88" href="#88">88</a> <strong>public</strong> <strong>void</strong> testMultipleCheckinHasNoEffect() throws RepositoryException {
+<a name="89" href="#89">89</a>
+<a name="90" href="#90">90</a> Version v = versionableNode.checkin();
+<a name="91" href="#91">91</a> <strong>try</strong> {
+<a name="92" href="#92">92</a> Version v2 = versionableNode.checkin();
+<a name="93" href="#93">93</a>
+<a name="94" href="#94">94</a> assertTrue(<span class="string">"Calling checkin() on a node that is already checked-in must not have an effect."</span>, v.equals(v2));
+<a name="95" href="#95">95</a> } <strong>catch</strong> (RepositoryException e) {
+<a name="96" href="#96">96</a> fail(<span class="string">"Calling checkin() on a node that is already checked-in must not throw an exception."</span>);
+<a name="97" href="#97">97</a> }
+<a name="98" href="#98">98</a> }
+<a name="99" href="#99">99</a>
+<a name="100" href="#100">100</a> <em>/**<em>*</em></em>
+<a name="101" href="#101">101</a> <em> * Test if versionable node N's jcr:baseVersion property is set to refer to</em>
+<a name="102" href="#102">102</a> <em> * the new version after checkin.</em>
+<a name="103" href="#103">103</a> <em> *</em>
+<a name="104" href="#104">104</a> <em> * @throws RepositoryException</em>
+<a name="105" href="#105">105</a> <em> */</em>
+<a name="106" href="#106">106</a> <strong>public</strong> <strong>void</strong> testBaseVersionAfterCheckin() throws RepositoryException {
+<a name="107" href="#107">107</a> Version v = versionableNode.checkin();
+<a name="108" href="#108">108</a> ReferenceValue baseVersionRef = (ReferenceValue) versionableNode.getProperty(jcrBaseVersion).getValue();
+<a name="109" href="#109">109</a>
+<a name="110" href="#110">110</a> assertEquals(<span class="string">"Checked-in node's jcr:baseVersion property is set to refer to the version created on checkin."</span>, <strong>new</strong> ReferenceValue(v), baseVersionRef);
+<a name="111" href="#111">111</a> }
+<a name="112" href="#112">112</a>
+<a name="113" href="#113">113</a> <em>/**<em>*</em></em>
+<a name="114" href="#114">114</a> <em> * Test if Node.checkin() throws InvalidItemStateException if the node</em>
+<a name="115" href="#115">115</a> <em> * has unsaved changes pending.</em>
+<a name="116" href="#116">116</a> <em> *</em>
+<a name="117" href="#117">117</a> <em> * @throws RepositoryException</em>
+<a name="118" href="#118">118</a> <em> */</em>
+<a name="119" href="#119">119</a> <strong>public</strong> <strong>void</strong> testCheckinWithPendingChanges() throws RepositoryException {
+<a name="120" href="#120">120</a> <strong>try</strong> {
+<a name="121" href="#121">121</a> <em class="comment">// modify node without calling save()</em>
+<a name="122" href="#122">122</a> versionableNode.setProperty(propertyName1, propertyValue);
+<a name="123" href="#123">123</a> versionableNode.checkin();
+<a name="124" href="#124">124</a>
+<a name="125" href="#125">125</a> fail(<span class="string">"InvalidItemStateException must be thrown on attempt to checkin a node having any unsaved changes pending."</span>);
+<a name="126" href="#126">126</a> } <strong>catch</strong> (InvalidItemStateException e) {
+<a name="127" href="#127">127</a> <em class="comment">// ok</em>
+<a name="128" href="#128">128</a> }
+<a name="129" href="#129">129</a> }
+<a name="130" href="#130">130</a>
+<a name="131" href="#131">131</a> <em>/**<em>*</em></em>
+<a name="132" href="#132">132</a> <em> * Test if Node.isCheckedOut() returns false after Node.checkin().</em>
+<a name="133" href="#133">133</a> <em> *</em>
+<a name="134" href="#134">134</a> <em> * @throws RepositoryException</em>
+<a name="135" href="#135">135</a> <em> */</em>
+<a name="136" href="#136">136</a> <strong>public</strong> <strong>void</strong> testIsNotCheckedOut() throws RepositoryException {
+<a name="137" href="#137">137</a> versionableNode.checkin();
+<a name="138" href="#138">138</a> <strong>boolean</strong> isCheckedOut = versionableNode.isCheckedOut();
+<a name="139" href="#139">139</a>
+<a name="140" href="#140">140</a> assertFalse(<span class="string">"Node.isCheckedOut() must return false after Node.checkin()."</span>, isCheckedOut);
+<a name="141" href="#141">141</a> }
+<a name="142" href="#142">142</a>
+<a name="143" href="#143">143</a> <em>/**<em>*</em></em>
+<a name="144" href="#144">144</a> <em> * Test if Node.checkin() adds another version to the VersionHistory</em>
+<a name="145" href="#145">145</a> <em> *</em>
+<a name="146" href="#146">146</a> <em> * @throws RepositoryException</em>
+<a name="147" href="#147">147</a> <em> */</em>
+<a name="148" href="#148">148</a> <strong>public</strong> <strong>void</strong> testCheckinCreatesNewVersion() throws RepositoryException {
+<a name="149" href="#149">149</a>
+<a name="150" href="#150">150</a> <strong>long</strong> initialNumberOfVersions = getNumberOfVersions(versionableNode.getVersionHistory());
+<a name="151" href="#151">151</a> versionableNode.checkin();
+<a name="152" href="#152">152</a> <strong>long</strong> numberOfVersions = getNumberOfVersions(versionableNode.getVersionHistory());
+<a name="153" href="#153">153</a>
+<a name="154" href="#154">154</a> assertTrue(<span class="string">"Checkin must create a new Version in the VersionHistory."</span>, numberOfVersions == initialNumberOfVersions + 1);
+<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 calling Node.checkin() on a non-versionable node.</em>
+<a name="159" href="#159">159</a> <em> *</em>
+<a name="160" href="#160">160</a> <em> * @throws RepositoryException</em>
+<a name="161" href="#161">161</a> <em> */</em>
+<a name="162" href="#162">162</a> <strong>public</strong> <strong>void</strong> testCheckinNonVersionableNode() throws RepositoryException {
+<a name="163" href="#163">163</a> <strong>try</strong> {
+<a name="164" href="#164">164</a> nonVersionableNode.checkin();
+<a name="165" href="#165">165</a> fail(<span class="string">"Node.checkin() on a non versionable node must throw UnsupportedRepositoryOperationException"</span>);
+<a name="166" href="#166">166</a> } <strong>catch</strong> (UnsupportedRepositoryOperationException e) {
+<a name="167" href="#167">167</a> <em class="comment">//success</em>
+<a name="168" href="#168">168</a> }
+<a name="169" href="#169">169</a> }
+<a name="170" href="#170">170</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/CheckinTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckoutTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckoutTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckoutTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/CheckoutTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,109 @@
+<!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>CheckoutTest 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.Node;
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.ItemNotFoundException;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.UnsupportedRepositoryOperationException;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <em>/**<em>*</em></em>
+<a name="25" href="#25">25</a> <em> * <code>CheckoutTest</code> covers tests related to {@link javax.jcr.Node#checkout()}</em>
+<a name="26" href="#26">26</a> <em> * and {@link javax.jcr.Node#isCheckedOut()}.</em>
+<a name="27" href="#27">27</a> <em> *</em>
+<a name="28" href="#28">28</a> <em> * @test</em>
+<a name="29" href="#29">29</a> <em> * @sources CheckoutTest.java</em>
+<a name="30" href="#30">30</a> <em> * @executeClass org.apache.jackrabbit.test.api.version.CheckoutTest</em>
+<a name="31" href="#31">31</a> <em> * @keywords versioning</em>
+<a name="32" href="#32">32</a> <em> */</em>
+<a name="33" href="#33">33</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/CheckoutTest.html">CheckoutTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractVersionTest.html">AbstractVersionTest</a> {
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="36" href="#36">36</a> <strong>super</strong>.setUp();
+<a name="37" href="#37">37</a>
+<a name="38" href="#38">38</a> <strong>if</strong> (!versionableNode.isCheckedOut()) {
+<a name="39" href="#39">39</a> fail(<span class="string">"A versionable node must be checked-out after persistent creation."</span>);
+<a name="40" href="#40">40</a> }
+<a name="41" href="#41">41</a> versionableNode.checkin();
+<a name="42" href="#42">42</a> }
+<a name="43" href="#43">43</a>
+<a name="44" href="#44">44</a> <em>/**<em>*</em></em>
+<a name="45" href="#45">45</a> <em> * Test if Node.isCheckedOut() returns true, if the versionable node has</em>
+<a name="46" href="#46">46</a> <em> * been checked out before.</em>
+<a name="47" href="#47">47</a> <em> *</em>
+<a name="48" href="#48">48</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="49" href="#49">49</a> <em> */</em>
+<a name="50" href="#50">50</a> <strong>public</strong> <strong>void</strong> testIsCheckedOut() throws RepositoryException {
+<a name="51" href="#51">51</a> versionableNode.checkout();
+<a name="52" href="#52">52</a> assertTrue(<span class="string">"After calling Node.checkout() a versionable node N, N.isCheckedOut() must return true."</span>, versionableNode.isCheckedOut());
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> <em>/**<em>*</em></em>
+<a name="56" href="#56">56</a> <em> * Test calling Node.isCheckedOut() on a non-versionable.</em>
+<a name="57" href="#57">57</a> <em> *</em>
+<a name="58" href="#58">58</a> <em> * @throws RepositoryException</em>
+<a name="59" href="#59">59</a> <em> */</em>
+<a name="60" href="#60">60</a> <strong>public</strong> <strong>void</strong> testIsCheckedOutNonVersionableNode() throws RepositoryException {
+<a name="61" href="#61">61</a> <strong>boolean</strong> isCheckedOut = nonVersionableNode.isCheckedOut();
+<a name="62" href="#62">62</a> Node vParent = <strong>null</strong>;
+<a name="63" href="#63">63</a> <strong>try</strong> {
+<a name="64" href="#64">64</a> vParent = nonVersionableNode.getParent();
+<a name="65" href="#65">65</a> <strong>while</strong> (!vParent.isNodeType(mixVersionable)) {
+<a name="66" href="#66">66</a> vParent = vParent.getParent();
+<a name="67" href="#67">67</a> }
+<a name="68" href="#68">68</a> } <strong>catch</strong> (ItemNotFoundException e) {
+<a name="69" href="#69">69</a> <em class="comment">// root reached.</em>
+<a name="70" href="#70">70</a> }
+<a name="71" href="#71">71</a>
+<a name="72" href="#72">72</a> <strong>if</strong> (vParent != <strong>null</strong> && vParent.isNodeType(mixVersionable)) {
+<a name="73" href="#73">73</a> <strong>if</strong> (vParent.isCheckedOut()) {
+<a name="74" href="#74">74</a> assertTrue(<span class="string">"Node.isCheckedOut() must return true if the node is non-versionable and its nearest versionable ancestor is checked-out."</span>, isCheckedOut);
+<a name="75" href="#75">75</a> } <strong>else</strong> {
+<a name="76" href="#76">76</a> assertFalse(<span class="string">"Node.isCheckedOut() must return false if the node is non-versionable and its nearest versionable ancestor is checked-in."</span>, isCheckedOut);
+<a name="77" href="#77">77</a> }
+<a name="78" href="#78">78</a> } <strong>else</strong> {
+<a name="79" href="#79">79</a> assertTrue(<span class="string">"Node.isCheckedOut() must return true if the node is non-versionable and has no versionable ancestor"</span>, isCheckedOut);
+<a name="80" href="#80">80</a> }
+<a name="81" href="#81">81</a> }
+<a name="82" href="#82">82</a>
+<a name="83" href="#83">83</a> <em>/**<em>*</em></em>
+<a name="84" href="#84">84</a> <em> * Test calling Node.checkout() on a non-versionable node.</em>
+<a name="85" href="#85">85</a> <em> * </em>
+<a name="86" href="#86">86</a> <em> * @throws RepositoryException</em>
+<a name="87" href="#87">87</a> <em> */</em>
+<a name="88" href="#88">88</a> <strong>public</strong> <strong>void</strong> testCheckoutNonVersionableNode() throws RepositoryException {
+<a name="89" href="#89">89</a> <strong>try</strong> {
+<a name="90" href="#90">90</a> nonVersionableNode.checkout();
+<a name="91" href="#91">91</a> fail(<span class="string">"Node.checkout() on a non versionable node must throw UnsupportedRepositoryOperationException"</span>);
+<a name="92" href="#92">92</a> } <strong>catch</strong> (UnsupportedRepositoryOperationException e) {
+<a name="93" href="#93">93</a> <em class="comment">//success</em>
+<a name="94" href="#94">94</a> }
+<a name="95" href="#95">95</a> }
+<a name="96" href="#96">96</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/CheckoutTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionAbortTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionAbortTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionAbortTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionAbortTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,86 @@
+<!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>OnParentVersionAbortTest 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.RepositoryException;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.version.OnParentVersionAction;
+<a name="23" href="#23">23</a> <strong>import</strong> javax.jcr.version.VersionException;
+<a name="24" href="#24">24</a>
+<a name="25" href="#25">25</a> <em>/**<em>*</em></em>
+<a name="26" href="#26">26</a> <em> * <code>OnParentVersionAbortTest</code> tests the OnParentVersion {@link OnParentVersionAction#ABORT ABORT}</em>
+<a name="27" href="#27">27</a> <em> * behaviour.</em>
+<a name="28" href="#28">28</a> <em> *</em>
+<a name="29" href="#29">29</a> <em> * @test</em>
+<a name="30" href="#30">30</a> <em> * @sources OnParentVersionAbortTest.java</em>
+<a name="31" href="#31">31</a> <em> * @executeClass org.apache.jackrabbit.test.api.version.OnParentVersionComputeTest</em>
+<a name="32" href="#32">32</a> <em> * @keywords versioning</em>
+<a name="33" href="#33">33</a> <em> */</em>
+<a name="34" href="#34">34</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/OnParentVersionAbortTest.html">OnParentVersionAbortTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.html">AbstractOnParentVersionTest</a> {
+<a name="35" href="#35">35</a>
+<a name="36" href="#36">36</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="37" href="#37">37</a> OPVAction = OnParentVersionAction.ABORT;
+<a name="38" href="#38">38</a> <strong>super</strong>.setUp();
+<a name="39" href="#39">39</a> }
+<a name="40" href="#40">40</a>
+<a name="41" href="#41">41</a> <em>/**<em>*</em></em>
+<a name="42" href="#42">42</a> <em> * Test the restore of a OnParentVersion-ABORT property</em>
+<a name="43" href="#43">43</a> <em> *</em>
+<a name="44" href="#44">44</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="45" href="#45">45</a> <em> */</em>
+<a name="46" href="#46">46</a> <strong>public</strong> <strong>void</strong> testRestoreProp() throws RepositoryException {
+<a name="47" href="#47">47</a> <strong>try</strong> {
+<a name="48" href="#48">48</a> p.getParent().checkout();
+<a name="49" href="#49">49</a> p.getParent().checkin();
+<a name="50" href="#50">50</a> fail(<span class="string">"On checkin of N which has a property with OnParentVersion ABORT defined, an UnsupportedRepositoryOperationException must be thrown."</span>);
+<a name="51" href="#51">51</a> } <strong>catch</strong> (VersionException e) {
+<a name="52" href="#52">52</a> <em class="comment">// success</em>
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a> }
+<a name="55" href="#55">55</a>
+<a name="56" href="#56">56</a> <em>/**<em>*</em></em>
+<a name="57" href="#57">57</a> <em> * Test the restore of a OnParentVersion-ABORT node</em>
+<a name="58" href="#58">58</a> <em> * </em>
+<a name="59" href="#59">59</a> <em> * @throws RepositoryException</em>
+<a name="60" href="#60">60</a> <em> * @throws NotExecutableException</em>
+<a name="61" href="#61">61</a> <em> */</em>
+<a name="62" href="#62">62</a> <strong>public</strong> <strong>void</strong> testRestoreNode() throws RepositoryException, NotExecutableException {
+<a name="63" href="#63">63</a> <em class="comment">// create child node with OPV-ABORT behaviour</em>
+<a name="64" href="#64">64</a> addChildNode(OPVAction);
+<a name="65" href="#65">65</a> testRootNode.save();
+<a name="66" href="#66">66</a> <strong>try</strong> {
+<a name="67" href="#67">67</a> versionableNode.checkin();
+<a name="68" href="#68">68</a> fail(<span class="string">"On checkin of N which has a child node with OnParentVersion ABORT defined, an UnsupportedRepositoryOperationException must be thrown."</span>);
+<a name="69" href="#69">69</a> } <strong>catch</strong> (VersionException e) {
+<a name="70" href="#70">70</a> <em class="comment">// success</em>
+<a name="71" href="#71">71</a> }
+<a name="72" href="#72">72</a> }
+<a name="73" href="#73">73</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/OnParentVersionAbortTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionComputeTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionComputeTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionComputeTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionComputeTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,72 @@
+<!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>OnParentVersionComputeTest 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.Node;
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.version.OnParentVersionAction;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.version.Version;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <em>/**<em>*</em></em>
+<a name="25" href="#25">25</a> <em> * <code>OnParentVersionComputeTest</code> tests the OnParentVersion {@link OnParentVersionAction#COMPUTE COMPUTE}</em>
+<a name="26" href="#26">26</a> <em> * behaviour.</em>
+<a name="27" href="#27">27</a> <em> *</em>
+<a name="28" href="#28">28</a> <em> * @test</em>
+<a name="29" href="#29">29</a> <em> * @sources OnParentVersionComputeTest.java</em>
+<a name="30" href="#30">30</a> <em> * @executeClass org.apache.jackrabbit.test.api.version.OnParentVersionComputeTest</em>
+<a name="31" href="#31">31</a> <em> * @keywords versioning</em>
+<a name="32" href="#32">32</a> <em> */</em>
+<a name="33" href="#33">33</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/OnParentVersionComputeTest.html">OnParentVersionComputeTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.html">AbstractOnParentVersionTest</a> {
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="36" href="#36">36</a> OPVAction = OnParentVersionAction.COMPUTE;
+<a name="37" href="#37">37</a> <strong>super</strong>.setUp();
+<a name="38" href="#38">38</a> }
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> <em>/**<em>*</em></em>
+<a name="41" href="#41">41</a> <em> * Test the restore of a OnParentVersion-COMPUTE property</em>
+<a name="42" href="#42">42</a> <em> *</em>
+<a name="43" href="#43">43</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="44" href="#44">44</a> <em> */</em>
+<a name="45" href="#45">45</a> <strong>public</strong> <strong>void</strong> testRestoreProp() throws RepositoryException {
+<a name="46" href="#46">46</a>
+<a name="47" href="#47">47</a> Node propParent = p.getParent();
+<a name="48" href="#48">48</a> propParent.checkout();
+<a name="49" href="#49">49</a> Version v = propParent.checkin();
+<a name="50" href="#50">50</a> propParent.checkout();
+<a name="51" href="#51">51</a>
+<a name="52" href="#52">52</a> p.setValue(newPropValue);
+<a name="53" href="#53">53</a> p.save();
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> propParent.restore(v, false);
+<a name="56" href="#56">56</a>
+<a name="57" href="#57">57</a> assertEquals(<span class="string">"On restore of a OnParentVersion-COMPUTE property P, the current P in the workspace will be left unchanged."</span>, p.getString(), newPropValue);
+<a name="58" href="#58">58</a> }
+<a name="59" href="#59">59</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/OnParentVersionComputeTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,90 @@
+<!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>OnParentVersionCopyTest 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.Node;
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.version.OnParentVersionAction;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.version.Version;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <em>/**<em>*</em></em>
+<a name="25" href="#25">25</a> <em> * <code>OnParentVersionCopyTest</code> tests the OnParentVersion {@link OnParentVersionAction#COPY COPY}</em>
+<a name="26" href="#26">26</a> <em> * behaviour.</em>
+<a name="27" href="#27">27</a> <em> *</em>
+<a name="28" href="#28">28</a> <em> * @test</em>
+<a name="29" href="#29">29</a> <em> * @sources OnParentVersionCopyTest.java</em>
+<a name="30" href="#30">30</a> <em> * @executeClass org.apache.jackrabbit.test.api.version.OnParentVersionCopyTest</em>
+<a name="31" href="#31">31</a> <em> * @keywords versioning</em>
+<a name="32" href="#32">32</a> <em> */</em>
+<a name="33" href="#33">33</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.html">OnParentVersionCopyTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.html">AbstractOnParentVersionTest</a> {
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> String initialNodePath;
+<a name="36" href="#36">36</a>
+<a name="37" href="#37">37</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="38" href="#38">38</a> OPVAction = OnParentVersionAction.COPY;
+<a name="39" href="#39">39</a> <strong>super</strong>.setUp();
+<a name="40" href="#40">40</a> }
+<a name="41" href="#41">41</a>
+<a name="42" href="#42">42</a> <em>/**<em>*</em></em>
+<a name="43" href="#43">43</a> <em> * Test the restore of a OnParentVersion-COPY property</em>
+<a name="44" href="#44">44</a> <em> *</em>
+<a name="45" href="#45">45</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="46" href="#46">46</a> <em> */</em>
+<a name="47" href="#47">47</a> <strong>public</strong> <strong>void</strong> testRestoreProp() throws RepositoryException {
+<a name="48" href="#48">48</a> assertEquals(<span class="string">"On restore of a OnParentVersion-COPY property P the copy of P stored will be restored, replacing the current P in the workspace."</span>, p.getString(), initialPropValue);
+<a name="49" href="#49">49</a> }
+<a name="50" href="#50">50</a>
+<a name="51" href="#51">51</a> <em>/**<em>*</em></em>
+<a name="52" href="#52">52</a> <em> * Test the restore of a OnParentVersion-COPY node</em>
+<a name="53" href="#53">53</a> <em> *</em>
+<a name="54" href="#54">54</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="55" href="#55">55</a> <em> */</em>
+<a name="56" href="#56">56</a> <strong>public</strong> <strong>void</strong> testRestoreNode() throws RepositoryException {
+<a name="57" href="#57">57</a> <em class="comment">// prepare for node test</em>
+<a name="58" href="#58">58</a> Node childNode = addChildNode(OPVAction);
+<a name="59" href="#59">59</a> Node nodeParent = childNode.getParent();
+<a name="60" href="#60">60</a> <em class="comment">// todo: added next line. correct? -> angela</em>
+<a name="61" href="#61">61</a> nodeParent.save();
+<a name="62" href="#62">62</a>
+<a name="63" href="#63">63</a> nodeParent.checkout();
+<a name="64" href="#64">64</a> Version v = nodeParent.checkin();
+<a name="65" href="#65">65</a>
+<a name="66" href="#66">66</a> initialNodePath = childNode.getPath();
+<a name="67" href="#67">67</a> childNode.remove();
+<a name="68" href="#68">68</a> nodeParent.save();
+<a name="69" href="#69">69</a>
+<a name="70" href="#70">70</a> nodeParent.restore(v, false);
+<a name="71" href="#71">71</a>
+<a name="72" href="#72">72</a> <strong>if</strong> (!superuser.itemExists(initialNodePath)) {
+<a name="73" href="#73">73</a> fail(<span class="string">"On restore of a OnParentVersion-COPY child node, the node needs to be restored, replacing the current node in the workspace."</span>);
+<a name="74" href="#74">74</a> }
+<a name="75" href="#75">75</a> assertEquals(<span class="string">"On restore of a OnParentVersion-COPY child node, the node needs to be restored, replacing the current node in the workspace."</span>, childNode, superuser.getItem(initialNodePath));
+<a name="76" href="#76">76</a> }
+<a name="77" href="#77">77</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/OnParentVersionCopyTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionIgnoreTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionIgnoreTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionIgnoreTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionIgnoreTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,72 @@
+<!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>OnParentVersionIgnoreTest 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.Node;
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.version.OnParentVersionAction;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.version.Version;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <em>/**<em>*</em></em>
+<a name="25" href="#25">25</a> <em> * <code>OnParentVersionIgnoreTest</code> tests the OnParentVersion {@link OnParentVersionAction#IGNORE IGNORE}</em>
+<a name="26" href="#26">26</a> <em> * behaviour.</em>
+<a name="27" href="#27">27</a> <em> *</em>
+<a name="28" href="#28">28</a> <em> * @test</em>
+<a name="29" href="#29">29</a> <em> * @sources OnParentVersionIgnoreTest.java</em>
+<a name="30" href="#30">30</a> <em> * @executeClass org.apache.jackrabbit.test.api.version.OnParentVersionIgnoreTest</em>
+<a name="31" href="#31">31</a> <em> * @keywords versioning</em>
+<a name="32" href="#32">32</a> <em> */</em>
+<a name="33" href="#33">33</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/OnParentVersionIgnoreTest.html">OnParentVersionIgnoreTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.html">AbstractOnParentVersionTest</a> {
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="36" href="#36">36</a> OPVAction = OnParentVersionAction.IGNORE;
+<a name="37" href="#37">37</a> <strong>super</strong>.setUp();
+<a name="38" href="#38">38</a> }
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> <em>/**<em>*</em></em>
+<a name="41" href="#41">41</a> <em> * Test the restore of a OnParentVersion-IGNORE property</em>
+<a name="42" href="#42">42</a> <em> *</em>
+<a name="43" href="#43">43</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="44" href="#44">44</a> <em> */</em>
+<a name="45" href="#45">45</a> <strong>public</strong> <strong>void</strong> testRestoreProp() throws RepositoryException {
+<a name="46" href="#46">46</a>
+<a name="47" href="#47">47</a> Node propParent = p.getParent();
+<a name="48" href="#48">48</a> propParent.checkout();
+<a name="49" href="#49">49</a> Version v = propParent.checkin();
+<a name="50" href="#50">50</a> propParent.checkout();
+<a name="51" href="#51">51</a>
+<a name="52" href="#52">52</a> p.setValue(newPropValue);
+<a name="53" href="#53">53</a> p.save();
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> propParent.restore(v, false);
+<a name="56" href="#56">56</a>
+<a name="57" href="#57">57</a> assertEquals(<span class="string">"On restore of a OnParentVersion-IGNORE property P, the current value of P must be left unchanged."</span>, p.getString(), newPropValue);
+<a name="58" href="#58">58</a> }
+<a name="59" href="#59">59</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/OnParentVersionIgnoreTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionInitializeTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionInitializeTest.html?view=auto&rev=151075
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionInitializeTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/version/OnParentVersionInitializeTest.html Wed Feb 2 14:40:59 2005
@@ -0,0 +1,72 @@
+<!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>OnParentVersionInitializeTest 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.Node;
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.version.OnParentVersionAction;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.version.Version;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <em>/**<em>*</em></em>
+<a name="25" href="#25">25</a> <em> * <code>OnParentVersionInitializeTest</code> tests the {@link OnParentVersionAction#INITIALIZE INITIALIZE}</em>
+<a name="26" href="#26">26</a> <em> * behaviour.</em>
+<a name="27" href="#27">27</a> <em> *</em>
+<a name="28" href="#28">28</a> <em> * @test</em>
+<a name="29" href="#29">29</a> <em> * @sources OnParentVersionInitializeTest.java</em>
+<a name="30" href="#30">30</a> <em> * @executeClass org.apache.jackrabbit.test.api.version.OnParentVersionInitializeTest</em>
+<a name="31" href="#31">31</a> <em> * @keywords versioning</em>
+<a name="32" href="#32">32</a> <em> */</em>
+<a name="33" href="#33">33</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/OnParentVersionInitializeTest.html">OnParentVersionInitializeTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.html">AbstractOnParentVersionTest</a> {
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="36" href="#36">36</a> OPVAction = OnParentVersionAction.INITIALIZE;
+<a name="37" href="#37">37</a> <strong>super</strong>.setUp();
+<a name="38" href="#38">38</a> }
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> <em>/**<em>*</em></em>
+<a name="41" href="#41">41</a> <em> * Test the restore of a OnParentVersion-INITIALIZE property</em>
+<a name="42" href="#42">42</a> <em> *</em>
+<a name="43" href="#43">43</a> <em> * @throws javax.jcr.RepositoryException</em>
+<a name="44" href="#44">44</a> <em> */</em>
+<a name="45" href="#45">45</a> <strong>public</strong> <strong>void</strong> testRestoreProp() throws RepositoryException {
+<a name="46" href="#46">46</a>
+<a name="47" href="#47">47</a> Node propParent = p.getParent();
+<a name="48" href="#48">48</a> propParent.checkout();
+<a name="49" href="#49">49</a> Version v = propParent.checkin();
+<a name="50" href="#50">50</a> propParent.checkout();
+<a name="51" href="#51">51</a>
+<a name="52" href="#52">52</a> p.setValue(newPropValue);
+<a name="53" href="#53">53</a> p.save();
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> propParent.restore(v, false);
+<a name="56" href="#56">56</a>
+<a name="57" href="#57">57</a> assertEquals(<span class="string">"On restore of a OnParentVersion-INITIALIZE property P, the current value of P must be left unchanged."</span>, p.getString(), newPropValue);
+<a name="58" href="#58">58</a> }
+<a name="59" href="#59">59</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/OnParentVersionInitializeTest.html
------------------------------------------------------------------------------
svn:eol-style = native