You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by bu...@apache.org on 2012/04/03 07:20:58 UTC

svn commit: r811237 [12/17] - in /websites/staging/chemistry/trunk/content: ./ java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/ java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/css/ java/0.7.0/maven/chem...

Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/JcrVersionBase.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/JcrVersionBase.html (added)
+++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/JcrVersionBase.html Tue Apr  3 05:20:54 2012
@@ -0,0 +1,323 @@
+<!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>JcrVersionBase xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file</em>
+<a name="4" href="#4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file</em>
+<a name="6" href="#6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a>   <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="jxr_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="11" href="#11">11</a>  <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the</em>
+<a name="16" href="#16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a>  <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a>  <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong class="jxr_keyword">package</strong> org.apache.chemistry.opencmis.jcr;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.ContentStream;
+<a name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.Properties;
+<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.enums.Action;
+<a name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
+<a name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
+<a name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+<a name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException;
+<a name="29" href="#29">29</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertiesImpl;
+<a name="30" href="#30">30</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl;
+<a name="31" href="#31">31</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.jcr.type.JcrTypeHandlerManager;
+<a name="32" href="#32">32</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.logging.Log;
+<a name="33" href="#33">33</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.logging.LogFactory;
+<a name="34" href="#34">34</a>  
+<a name="35" href="#35">35</a>  <strong class="jxr_keyword">import</strong> javax.jcr.Node;
+<a name="36" href="#36">36</a>  <strong class="jxr_keyword">import</strong> javax.jcr.RepositoryException;
+<a name="37" href="#37">37</a>  <strong class="jxr_keyword">import</strong> javax.jcr.UnsupportedRepositoryOperationException;
+<a name="38" href="#38">38</a>  <strong class="jxr_keyword">import</strong> javax.jcr.version.Version;
+<a name="39" href="#39">39</a>  <strong class="jxr_keyword">import</strong> javax.jcr.version.VersionException;
+<a name="40" href="#40">40</a>  <strong class="jxr_keyword">import</strong> javax.jcr.version.VersionHistory;
+<a name="41" href="#41">41</a>  <strong class="jxr_keyword">import</strong> javax.jcr.version.VersionIterator;
+<a name="42" href="#42">42</a>  <strong class="jxr_keyword">import</strong> java.util.Iterator;
+<a name="43" href="#43">43</a>  <strong class="jxr_keyword">import</strong> java.util.Set;
+<a name="44" href="#44">44</a>  
+<a name="45" href="#45">45</a>  <em class="jxr_javadoccomment">/**</em>
+<a name="46" href="#46">46</a>  <em class="jxr_javadoccomment"> * Instances of this class represent a versionable cmis:document and its versions backed by an underlying</em>
+<a name="47" href="#47">47</a>  <em class="jxr_javadoccomment"> * JCR &lt;code&gt;Node&lt;/code&gt;. </em>
+<a name="48" href="#48">48</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="49" href="#49">49</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">abstract</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersionBase.html">JcrVersionBase</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrDocument.html">JcrDocument</a> {
+<a name="50" href="#50">50</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Log log = LogFactory.getLog(JcrVersionBase.<strong class="jxr_keyword">class</strong>);
+<a name="51" href="#51">51</a>  
+<a name="52" href="#52">52</a>      <strong class="jxr_keyword">protected</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersionBase.html">JcrVersionBase</a>(Node node, <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrTypeManager.html">JcrTypeManager</a> typeManager, <a href="../../../../../org/apache/chemistry/opencmis/jcr/PathManager.html">PathManager</a> pathManager, <a href="../../../../../org/apache/chemistry/opencmis/jcr/type/JcrTypeHandlerManager.html">JcrTypeHandlerManager</a> typeHandlerManager) {
+<a name="53" href="#53">53</a>          <strong class="jxr_keyword">super</strong>(node, typeManager, pathManager, typeHandlerManager);
+<a name="54" href="#54">54</a>      }
+<a name="55" href="#55">55</a>  
+<a name="56" href="#56">56</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="57" href="#57">57</a>  <em class="jxr_javadoccomment">     * See CMIS 1.0 section 2.2.7.6 getAllVersions</em>
+<a name="58" href="#58">58</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="59" href="#59">59</a>      <strong class="jxr_keyword">public</strong> Iterator&lt;JcrVersion&gt; getVersions() {
+<a name="60" href="#60">60</a>          <strong class="jxr_keyword">try</strong> {
+<a name="61" href="#61">61</a>              VersionHistory versionHistory = getVersionHistory(getNode());
+<a name="62" href="#62">62</a>              <strong class="jxr_keyword">final</strong> VersionIterator versions = versionHistory.getAllLinearVersions();
+<a name="63" href="#63">63</a>  
+<a name="64" href="#64">64</a>              <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> Iterator&lt;JcrVersion&gt;() {
+<a name="65" href="#65">65</a>                  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> hasNext() {
+<a name="66" href="#66">66</a>                      <strong class="jxr_keyword">return</strong> versions.hasNext();
+<a name="67" href="#67">67</a>                  }
+<a name="68" href="#68">68</a>  
+<a name="69" href="#69">69</a>                  <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersion.html">JcrVersion</a> next() {
+<a name="70" href="#70">70</a>                      <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersion.html">JcrVersion</a>(getNode(), versions.nextVersion(), typeManager, pathManager, typeHandlerManager);
+<a name="71" href="#71">71</a>                  }
+<a name="72" href="#72">72</a>  
+<a name="73" href="#73">73</a>                  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove() {
+<a name="74" href="#74">74</a>                      <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> UnsupportedOperationException();
+<a name="75" href="#75">75</a>                  }
+<a name="76" href="#76">76</a>              };
+<a name="77" href="#77">77</a>          }
+<a name="78" href="#78">78</a>          <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="79" href="#79">79</a>              log.debug(e.getMessage(), e);
+<a name="80" href="#80">80</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="81" href="#81">81</a>          }
+<a name="82" href="#82">82</a>      }
+<a name="83" href="#83">83</a>      
+<a name="84" href="#84">84</a>      @Override
+<a name="85" href="#85">85</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> delete(<strong class="jxr_keyword">boolean</strong> allVersions, <strong class="jxr_keyword">boolean</strong> isPwc) {
+<a name="86" href="#86">86</a>          Node node = getNode();
+<a name="87" href="#87">87</a>          <strong class="jxr_keyword">try</strong> {
+<a name="88" href="#88">88</a>              <strong class="jxr_keyword">if</strong> (node.isCheckedOut()) {
+<a name="89" href="#89">89</a>                  <strong class="jxr_keyword">if</strong> (isPwc) {
+<a name="90" href="#90">90</a>                      cancelCheckout(node);
+<a name="91" href="#91">91</a>                  }
+<a name="92" href="#92">92</a>                  <strong class="jxr_keyword">else</strong> {
+<a name="93" href="#93">93</a>                      <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisStorageException(<span class="jxr_string">"Cannot delete checked out document: "</span> + getId());
+<a name="94" href="#94">94</a>                  }
+<a name="95" href="#95">95</a>              }
+<a name="96" href="#96">96</a>              <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (allVersions) {
+<a name="97" href="#97">97</a>                  checkout(node);
+<a name="98" href="#98">98</a>                  node.remove();
+<a name="99" href="#99">99</a>                  node.getSession().save();
+<a name="100" href="#100">100</a>             }
+<a name="101" href="#101">101</a>             <strong class="jxr_keyword">else</strong> {
+<a name="102" href="#102">102</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(<span class="jxr_string">"Cannot delete a single version"</span>);
+<a name="103" href="#103">103</a>             }
+<a name="104" href="#104">104</a>         }
+<a name="105" href="#105">105</a>         <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="106" href="#106">106</a>             log.debug(e.getMessage(), e);
+<a name="107" href="#107">107</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="108" href="#108">108</a>         }
+<a name="109" href="#109">109</a>     }
+<a name="110" href="#110">110</a> 
+<a name="111" href="#111">111</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="112" href="#112">112</a> <em class="jxr_javadoccomment">     * See CMIS 1.0 section 2.2.7.1 checkOut</em>
+<a name="113" href="#113">113</a> <em class="jxr_javadoccomment">     *</em>
+<a name="114" href="#114">114</a> <em class="jxr_javadoccomment">     * @throws CmisRuntimeException</em>
+<a name="115" href="#115">115</a> <em class="jxr_javadoccomment">     */</em>
+<a name="116" href="#116">116</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.html">JcrPrivateWorkingCopy</a> checkout() {
+<a name="117" href="#117">117</a>         Node node = getNode();
+<a name="118" href="#118">118</a>         <strong class="jxr_keyword">try</strong> {
+<a name="119" href="#119">119</a>             <strong class="jxr_keyword">if</strong> (node.isCheckedOut()) {
+<a name="120" href="#120">120</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisConstraintException(<span class="jxr_string">"Document is already checked out "</span> + getId());
+<a name="121" href="#121">121</a>             }
+<a name="122" href="#122">122</a> 
+<a name="123" href="#123">123</a>             checkout(node);
+<a name="124" href="#124">124</a>             <strong class="jxr_keyword">return</strong> getPwc();
+<a name="125" href="#125">125</a>         }
+<a name="126" href="#126">126</a>         <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="127" href="#127">127</a>             log.debug(e.getMessage(), e);
+<a name="128" href="#128">128</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="129" href="#129">129</a>         }
+<a name="130" href="#130">130</a>     }
+<a name="131" href="#131">131</a> 
+<a name="132" href="#132">132</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="133" href="#133">133</a> <em class="jxr_javadoccomment">     * See CMIS 1.0 section 2.2.7.3 checkedIn</em>
+<a name="134" href="#134">134</a> <em class="jxr_javadoccomment">     *</em>
+<a name="135" href="#135">135</a> <em class="jxr_javadoccomment">     * @throws CmisRuntimeException</em>
+<a name="136" href="#136">136</a> <em class="jxr_javadoccomment">     */</em>
+<a name="137" href="#137">137</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersion.html">JcrVersion</a> checkin(Properties properties, ContentStream contentStream, String checkinComment) {
+<a name="138" href="#138">138</a>         Node node = getNode();
+<a name="139" href="#139">139</a> 
+<a name="140" href="#140">140</a>         <strong class="jxr_keyword">try</strong> {
+<a name="141" href="#141">141</a>             <strong class="jxr_keyword">if</strong> (!node.isCheckedOut()) {
+<a name="142" href="#142">142</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisStorageException(<span class="jxr_string">"Not checked out: "</span> + getId());
+<a name="143" href="#143">143</a>             }
+<a name="144" href="#144">144</a> 
+<a name="145" href="#145">145</a>             <strong class="jxr_keyword">if</strong> (properties != <strong class="jxr_keyword">null</strong> &amp;&amp; !properties.getPropertyList().isEmpty()) {
+<a name="146" href="#146">146</a>                 updateProperties(properties);
+<a name="147" href="#147">147</a>             }
+<a name="148" href="#148">148</a> 
+<a name="149" href="#149">149</a>             <strong class="jxr_keyword">if</strong> (contentStream != <strong class="jxr_keyword">null</strong>) {
+<a name="150" href="#150">150</a>                 setContentStream(contentStream, <strong class="jxr_keyword">true</strong>);
+<a name="151" href="#151">151</a>             }
+<a name="152" href="#152">152</a> 
+<a name="153" href="#153">153</a>             <em class="jxr_comment">// todo handle checkinComment</em>
+<a name="154" href="#154">154</a>             checkin(node);
+<a name="155" href="#155">155</a>             <strong class="jxr_keyword">return</strong> (JcrVersion) create(node);
+<a name="156" href="#156">156</a>         }
+<a name="157" href="#157">157</a>         <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="158" href="#158">158</a>             log.debug(e.getMessage(), e);
+<a name="159" href="#159">159</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="160" href="#160">160</a>         }
+<a name="161" href="#161">161</a>     }
+<a name="162" href="#162">162</a> 
+<a name="163" href="#163">163</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="164" href="#164">164</a> <em class="jxr_javadoccomment">     * See CMIS 1.0 section 2.2.7.2 cancelCheckout</em>
+<a name="165" href="#165">165</a> <em class="jxr_javadoccomment">     *</em>
+<a name="166" href="#166">166</a> <em class="jxr_javadoccomment">     * @throws CmisRuntimeException</em>
+<a name="167" href="#167">167</a> <em class="jxr_javadoccomment">     */</em>
+<a name="168" href="#168">168</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> cancelCheckout() {
+<a name="169" href="#169">169</a>         Node node = getNode();
+<a name="170" href="#170">170</a>         <strong class="jxr_keyword">try</strong> {
+<a name="171" href="#171">171</a>             cancelCheckout(node);
+<a name="172" href="#172">172</a>         }
+<a name="173" href="#173">173</a>         <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="174" href="#174">174</a>             log.debug(e.getMessage(), e);
+<a name="175" href="#175">175</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="176" href="#176">176</a>         }
+<a name="177" href="#177">177</a>     }
+<a name="178" href="#178">178</a> 
+<a name="179" href="#179">179</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="180" href="#180">180</a> <em class="jxr_javadoccomment">     * Get the private working copy of the versions series or throw an exception if not checked out.</em>
+<a name="181" href="#181">181</a> <em class="jxr_javadoccomment">     *</em>
+<a name="182" href="#182">182</a> <em class="jxr_javadoccomment">     * @return  a {@link JcrPrivateWorkingCopy} instance</em>
+<a name="183" href="#183">183</a> <em class="jxr_javadoccomment">     * @throws CmisObjectNotFoundException  if not checked out</em>
+<a name="184" href="#184">184</a> <em class="jxr_javadoccomment">     * @throws CmisRuntimeException</em>
+<a name="185" href="#185">185</a> <em class="jxr_javadoccomment">     */</em>
+<a name="186" href="#186">186</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.html">JcrPrivateWorkingCopy</a> getPwc() {
+<a name="187" href="#187">187</a>         <strong class="jxr_keyword">try</strong> {
+<a name="188" href="#188">188</a>             Node node = getNode();
+<a name="189" href="#189">189</a>             <strong class="jxr_keyword">if</strong> (node.isCheckedOut()) {
+<a name="190" href="#190">190</a>                 <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.html">JcrPrivateWorkingCopy</a>(getNode(), typeManager, pathManager, typeHandlerManager);
+<a name="191" href="#191">191</a>             }
+<a name="192" href="#192">192</a>             <strong class="jxr_keyword">else</strong> {
+<a name="193" href="#193">193</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisObjectNotFoundException(<span class="jxr_string">"Not checked out document has no private working copy"</span>);
+<a name="194" href="#194">194</a>             }
+<a name="195" href="#195">195</a>         }
+<a name="196" href="#196">196</a>         <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="197" href="#197">197</a>             log.debug(e.getMessage(), e);
+<a name="198" href="#198">198</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<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 class="jxr_javadoccomment">/**</em>
+<a name="203" href="#203">203</a> <em class="jxr_javadoccomment">     * Get a specific version by name</em>
+<a name="204" href="#204">204</a> <em class="jxr_javadoccomment">     * @param name  name of the version to get</em>
+<a name="205" href="#205">205</a> <em class="jxr_javadoccomment">     * @return  a {@link JcrVersion} instance for &lt;code&gt;name&lt;/code&gt;</em>
+<a name="206" href="#206">206</a> <em class="jxr_javadoccomment">     * @throws CmisObjectNotFoundException  if a version &lt;code&gt;name&lt;/code&gt; does not exist</em>
+<a name="207" href="#207">207</a> <em class="jxr_javadoccomment">     * @throws CmisRuntimeException</em>
+<a name="208" href="#208">208</a> <em class="jxr_javadoccomment">     */</em>
+<a name="209" href="#209">209</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersion.html">JcrVersion</a> getVersion(String name) {
+<a name="210" href="#210">210</a>         <strong class="jxr_keyword">try</strong> {
+<a name="211" href="#211">211</a>             Node node = getNode();
+<a name="212" href="#212">212</a>             VersionHistory versionHistory = getVersionHistory(node);
+<a name="213" href="#213">213</a>             Version version = versionHistory.getVersion(name);
+<a name="214" href="#214">214</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersion.html">JcrVersion</a>(node, version, typeManager, pathManager, typeHandlerManager);
+<a name="215" href="#215">215</a>         }
+<a name="216" href="#216">216</a>         <strong class="jxr_keyword">catch</strong> (UnsupportedRepositoryOperationException e) {
+<a name="217" href="#217">217</a>             log.debug(e.getMessage(), e);
+<a name="218" href="#218">218</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisObjectNotFoundException(e.getMessage(), e);
+<a name="219" href="#219">219</a>         }
+<a name="220" href="#220">220</a>         <strong class="jxr_keyword">catch</strong> (VersionException e) {
+<a name="221" href="#221">221</a>             log.debug(e.getMessage(), e);
+<a name="222" href="#222">222</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisObjectNotFoundException(e.getMessage(), e);
+<a name="223" href="#223">223</a>         }
+<a name="224" href="#224">224</a>         <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="225" href="#225">225</a>             log.debug(e.getMessage(), e);
+<a name="226" href="#226">226</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="227" href="#227">227</a>         }
+<a name="228" href="#228">228</a>     }
+<a name="229" href="#229">229</a> 
+<a name="230" href="#230">230</a>     <em class="jxr_comment">//------------------------------------------&lt; protected &gt;---</em>
+<a name="231" href="#231">231</a> 
+<a name="232" href="#232">232</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="233" href="#233">233</a> <em class="jxr_javadoccomment">     * @return  Id of the version representing the base of this versions series</em>
+<a name="234" href="#234">234</a> <em class="jxr_javadoccomment">     * @throws RepositoryException</em>
+<a name="235" href="#235">235</a> <em class="jxr_javadoccomment">     */</em>
+<a name="236" href="#236">236</a>     <strong class="jxr_keyword">protected</strong> String getBaseNodeId() <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="237" href="#237">237</a>         Version baseVersion = getBaseVersion(getNode());
+<a name="238" href="#238">238</a>         <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrNode.html">JcrNode</a> baseNode = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/JcrVersion.html">JcrVersion</a>(getNode(), baseVersion, typeManager, pathManager, typeHandlerManager);
+<a name="239" href="#239">239</a>         <strong class="jxr_keyword">return</strong> baseNode.getId();
+<a name="240" href="#240">240</a>     }
+<a name="241" href="#241">241</a> 
+<a name="242" href="#242">242</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="243" href="#243">243</a> <em class="jxr_javadoccomment">     * @return  Id of the private working copy of this version series</em>
+<a name="244" href="#244">244</a> <em class="jxr_javadoccomment">     * @throws RepositoryException</em>
+<a name="245" href="#245">245</a> <em class="jxr_javadoccomment">     */</em>
+<a name="246" href="#246">246</a>     <strong class="jxr_keyword">protected</strong> String getPwcId() <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="247" href="#247">247</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a name="248" href="#248">248</a>     }
+<a name="249" href="#249">249</a>     
+<a name="250" href="#250">250</a>     @Override
+<a name="251" href="#251">251</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> compileProperties(PropertiesImpl properties, Set&lt;String&gt; filter, ObjectInfoImpl objectInfo)
+<a name="252" href="#252">252</a>             <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="253" href="#253">253</a> 
+<a name="254" href="#254">254</a>         <strong class="jxr_keyword">super</strong>.compileProperties(properties, filter, objectInfo);
+<a name="255" href="#255">255</a> 
+<a name="256" href="#256">256</a>         objectInfo.setWorkingCopyOriginalId(getBaseNodeId());
+<a name="257" href="#257">257</a>         objectInfo.setWorkingCopyId(getPwcId());
+<a name="258" href="#258">258</a>     }
+<a name="259" href="#259">259</a> 
+<a name="260" href="#260">260</a>     @Override
+<a name="261" href="#261">261</a>     <strong class="jxr_keyword">protected</strong> Set&lt;Action&gt; compileAllowableActions(Set&lt;Action&gt; aas) {
+<a name="262" href="#262">262</a>         Set&lt;Action&gt; result = <strong class="jxr_keyword">super</strong>.compileAllowableActions(aas);
+<a name="263" href="#263">263</a>         setAction(result, Action.CAN_GET_ALL_VERSIONS, <strong class="jxr_keyword">true</strong>);
+<a name="264" href="#264">264</a>         setAction(result, Action.CAN_CHECK_OUT, <strong class="jxr_keyword">true</strong>);
+<a name="265" href="#265">265</a>         setAction(result, Action.CAN_CANCEL_CHECK_OUT, <strong class="jxr_keyword">true</strong>);
+<a name="266" href="#266">266</a>         setAction(result, Action.CAN_CHECK_IN, <strong class="jxr_keyword">true</strong>);
+<a name="267" href="#267">267</a>         <strong class="jxr_keyword">return</strong> result;
+<a name="268" href="#268">268</a>     }
+<a name="269" href="#269">269</a>     
+<a name="270" href="#270">270</a>     @Override
+<a name="271" href="#271">271</a>     <strong class="jxr_keyword">protected</strong> String getTypeIdInternal() {
+<a name="272" href="#272">272</a>         <strong class="jxr_keyword">return</strong> JcrTypeManager.DOCUMENT_TYPE_ID;
+<a name="273" href="#273">273</a>     }
+<a name="274" href="#274">274</a> 
+<a name="275" href="#275">275</a>     @Override
+<a name="276" href="#276">276</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">boolean</strong> isCheckedOut() <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="277" href="#277">277</a>         <strong class="jxr_keyword">return</strong> getNode().isCheckedOut();
+<a name="278" href="#278">278</a>     }
+<a name="279" href="#279">279</a> 
+<a name="280" href="#280">280</a>     @Override
+<a name="281" href="#281">281</a>     <strong class="jxr_keyword">protected</strong> String getCheckedOutId() <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="282" href="#282">282</a>         <strong class="jxr_keyword">return</strong> isCheckedOut()
+<a name="283" href="#283">283</a>                 ? getVersionSeriesId() + <span class="jxr_string">"/pwc"</span>
+<a name="284" href="#284">284</a>                 : <strong class="jxr_keyword">null</strong>;
+<a name="285" href="#285">285</a>     }
+<a name="286" href="#286">286</a> 
+<a name="287" href="#287">287</a>     @Override
+<a name="288" href="#288">288</a>     <strong class="jxr_keyword">protected</strong> String getCheckedOutBy() <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="289" href="#289">289</a>         <strong class="jxr_keyword">return</strong> isCheckedOut()
+<a name="290" href="#290">290</a>                 ? getNode().getSession().getUserID()
+<a name="291" href="#291">291</a>                 : <strong class="jxr_keyword">null</strong>;
+<a name="292" href="#292">292</a>     }
+<a name="293" href="#293">293</a>     
+<a name="294" href="#294">294</a>     <em class="jxr_comment">//------------------------------------------&lt; private &gt;---</em>
+<a name="295" href="#295">295</a> 
+<a name="296" href="#296">296</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> checkout(Node node) <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="297" href="#297">297</a>         getVersionManager(node).checkout(node.getPath());
+<a name="298" href="#298">298</a>     }
+<a name="299" href="#299">299</a> 
+<a name="300" href="#300">300</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> checkin(Node node) <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="301" href="#301">301</a>         getVersionManager(node).checkin(node.getPath());
+<a name="302" href="#302">302</a>     }
+<a name="303" href="#303">303</a> 
+<a name="304" href="#304">304</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> cancelCheckout(Node node) <strong class="jxr_keyword">throws</strong> RepositoryException {
+<a name="305" href="#305">305</a>         Version base = getBaseVersion(node);
+<a name="306" href="#306">306</a>         getVersionManager(node).restore(base, <strong class="jxr_keyword">true</strong>);
+<a name="307" href="#307">307</a>     }
+<a name="308" href="#308">308</a>     
+<a name="309" href="#309">309</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/PathManager.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/PathManager.html (added)
+++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/PathManager.html Tue Apr  3 05:20:54 2012
@@ -0,0 +1,178 @@
+<!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>PathManager xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file</em>
+<a name="4" href="#4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file</em>
+<a name="6" href="#6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a>   <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="jxr_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="11" href="#11">11</a>  <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the</em>
+<a name="16" href="#16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a>  <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a>  <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong class="jxr_keyword">package</strong> org.apache.chemistry.opencmis.jcr;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+<a name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.logging.Log;
+<a name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.logging.LogFactory;
+<a name="26" href="#26">26</a>  
+<a name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> javax.jcr.Node;
+<a name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> javax.jcr.RepositoryException;
+<a name="29" href="#29">29</a>  
+<a name="30" href="#30">30</a>  <em class="jxr_javadoccomment">/**</em>
+<a name="31" href="#31">31</a>  <em class="jxr_javadoccomment"> * Utility class for mapping JCR paths to CMIS paths</em>
+<a name="32" href="#32">32</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="33" href="#33">33</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/PathManager.html">PathManager</a> {
+<a name="34" href="#34">34</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Log log = LogFactory.getLog(PathManager.<strong class="jxr_keyword">class</strong>);
+<a name="35" href="#35">35</a>  
+<a name="36" href="#36">36</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="37" href="#37">37</a>  <em class="jxr_javadoccomment">     * Identifier of the root folder</em>
+<a name="38" href="#38">38</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="39" href="#39">39</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String CMIS_ROOT_ID = <span class="jxr_string">"[root]"</span>;
+<a name="40" href="#40">40</a>  
+<a name="41" href="#41">41</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="42" href="#42">42</a>  <em class="jxr_javadoccomment">     * Root path</em>
+<a name="43" href="#43">43</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="44" href="#44">44</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String CMIS_ROOT_PATH = <span class="jxr_string">"/"</span>;
+<a name="45" href="#45">45</a>  
+<a name="46" href="#46">46</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> String jcrRootPath;
+<a name="47" href="#47">47</a>  
+<a name="48" href="#48">48</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="49" href="#49">49</a>  <em class="jxr_javadoccomment">     * Create a new &lt;code&gt;PathManager&lt;/code&gt; instance for the given JCR root path.</em>
+<a name="50" href="#50">50</a>  <em class="jxr_javadoccomment">     * @param jcrRootPath</em>
+<a name="51" href="#51">51</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="52" href="#52">52</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/PathManager.html">PathManager</a>(String jcrRootPath) {
+<a name="53" href="#53">53</a>          <strong class="jxr_keyword">this</strong>.jcrRootPath = normalize(jcrRootPath);
+<a name="54" href="#54">54</a>      }
+<a name="55" href="#55">55</a>  
+<a name="56" href="#56">56</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="57" href="#57">57</a>  <em class="jxr_javadoccomment">     * @return  the JCR root path</em>
+<a name="58" href="#58">58</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="59" href="#59">59</a>      <strong class="jxr_keyword">public</strong> String getJcrRootPath() {
+<a name="60" href="#60">60</a>          <strong class="jxr_keyword">return</strong> jcrRootPath;
+<a name="61" href="#61">61</a>      }
+<a name="62" href="#62">62</a>  
+<a name="63" href="#63">63</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="64" href="#64">64</a>  <em class="jxr_javadoccomment">     * Determines whether a JCR &lt;code&gt;Node&lt;/code&gt; is the root node wrt. to this</em>
+<a name="65" href="#65">65</a>  <em class="jxr_javadoccomment">     * &lt;code&gt;PathManager&lt;/code&gt; instance. That is, whether the path of the node is</em>
+<a name="66" href="#66">66</a>  <em class="jxr_javadoccomment">     * equal to this instance's JCR root path.</em>
+<a name="67" href="#67">67</a>  <em class="jxr_javadoccomment">     * </em>
+<a name="68" href="#68">68</a>  <em class="jxr_javadoccomment">     * @param node</em>
+<a name="69" href="#69">69</a>  <em class="jxr_javadoccomment">     * @return  &lt;code&gt;true&lt;/code&gt; iff &lt;code&gt;node&lt;/code&gt; is the root node wrt. to</em>
+<a name="70" href="#70">70</a>  <em class="jxr_javadoccomment">     *      this &lt;code&gt;PathManager&lt;/code&gt; instance.</em>
+<a name="71" href="#71">71</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="72" href="#72">72</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isRoot(Node node) {
+<a name="73" href="#73">73</a>          <strong class="jxr_keyword">try</strong> {
+<a name="74" href="#74">74</a>              <strong class="jxr_keyword">return</strong> node.getPath().equals(jcrRootPath);
+<a name="75" href="#75">75</a>          }
+<a name="76" href="#76">76</a>          <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="77" href="#77">77</a>              log.debug(e.getMessage(), e);
+<a name="78" href="#78">78</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="79" href="#79">79</a>          }
+<a name="80" href="#80">80</a>      }
+<a name="81" href="#81">81</a>  
+<a name="82" href="#82">82</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="83" href="#83">83</a>  <em class="jxr_javadoccomment">     * Determine the CMIS path given a JCR &lt;code&gt;Node&lt;/code&gt;.</em>
+<a name="84" href="#84">84</a>  <em class="jxr_javadoccomment">     *</em>
+<a name="85" href="#85">85</a>  <em class="jxr_javadoccomment">     * @param node</em>
+<a name="86" href="#86">86</a>  <em class="jxr_javadoccomment">     * @return</em>
+<a name="87" href="#87">87</a>  <em class="jxr_javadoccomment">     * @throws IllegalArgumentException  when &lt;code&gt;node&lt;/code&gt; is not part of the hierarchy</em>
+<a name="88" href="#88">88</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="89" href="#89">89</a>      <strong class="jxr_keyword">public</strong> String getPath(Node node) {
+<a name="90" href="#90">90</a>          <strong class="jxr_keyword">try</strong> {
+<a name="91" href="#91">91</a>              <strong class="jxr_keyword">if</strong> (jcrRootPath.length() &gt; node.getPath().length()) {
+<a name="92" href="#92">92</a>                  <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalArgumentException(<span class="jxr_string">"Node is not part of the hierarchy: "</span> + node.getPath());
+<a name="93" href="#93">93</a>              }
+<a name="94" href="#94">94</a>  
+<a name="95" href="#95">95</a>              String path = node.getPath().substring(jcrRootPath.length());
+<a name="96" href="#96">96</a>              <strong class="jxr_keyword">return</strong> path.startsWith(<span class="jxr_string">"/"</span>) ? path : '/' + path;
+<a name="97" href="#97">97</a>          }
+<a name="98" href="#98">98</a>          <strong class="jxr_keyword">catch</strong> (RepositoryException e) {
+<a name="99" href="#99">99</a>              log.debug(e.getMessage(), e);
+<a name="100" href="#100">100</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(e.getMessage(), e);
+<a name="101" href="#101">101</a>         }
+<a name="102" href="#102">102</a>     }
+<a name="103" href="#103">103</a> 
+<a name="104" href="#104">104</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="105" href="#105">105</a> <em class="jxr_javadoccomment">     * @param cmisPath</em>
+<a name="106" href="#106">106</a> <em class="jxr_javadoccomment">     * @return  &lt;code&gt;true&lt;/code&gt; iff &lt;code&gt;cmisPath&lt;/code&gt; equals {@link PathManager#CMIS_ROOT_PATH}</em>
+<a name="107" href="#107">107</a> <em class="jxr_javadoccomment">     */</em>
+<a name="108" href="#108">108</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">boolean</strong> isRoot(String cmisPath) {
+<a name="109" href="#109">109</a>         <strong class="jxr_keyword">return</strong> CMIS_ROOT_PATH.equals(cmisPath);
+<a name="110" href="#110">110</a>     }
+<a name="111" href="#111">111</a> 
+<a name="112" href="#112">112</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="113" href="#113">113</a> <em class="jxr_javadoccomment">     * @param cmisPath</em>
+<a name="114" href="#114">114</a> <em class="jxr_javadoccomment">     * @return  &lt;code&gt;true&lt;/code&gt; iff &lt;code&gt;cmisPath&lt;/code&gt;</em>
+<a name="115" href="#115">115</a> <em class="jxr_javadoccomment">     */</em>
+<a name="116" href="#116">116</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">boolean</strong> isAbsolute(String cmisPath) {
+<a name="117" href="#117">117</a>         <strong class="jxr_keyword">return</strong> cmisPath.startsWith(CMIS_ROOT_PATH);
+<a name="118" href="#118">118</a>     }
+<a name="119" href="#119">119</a> 
+<a name="120" href="#120">120</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="121" href="#121">121</a> <em class="jxr_javadoccomment">     * Create a CMIS path from a parent path and a child element</em>
+<a name="122" href="#122">122</a> <em class="jxr_javadoccomment">     * @param cmisPath  parent path</em>
+<a name="123" href="#123">123</a> <em class="jxr_javadoccomment">     * @param child  child element</em>
+<a name="124" href="#124">124</a> <em class="jxr_javadoccomment">     * @return</em>
+<a name="125" href="#125">125</a> <em class="jxr_javadoccomment">     */</em>
+<a name="126" href="#126">126</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> String createCmisPath(String cmisPath, String child) {
+<a name="127" href="#127">127</a>         <strong class="jxr_keyword">return</strong> cmisPath.length() &gt; 0 &amp;&amp; cmisPath.charAt(cmisPath.length() - 1) == '/'
+<a name="128" href="#128">128</a>                 ? cmisPath + child
+<a name="129" href="#129">129</a>                 : cmisPath + '/' + child;
+<a name="130" href="#130">130</a>     }
+<a name="131" href="#131">131</a> 
+<a name="132" href="#132">132</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="133" href="#133">133</a> <em class="jxr_javadoccomment">     * Relativize an CMIS path wrt. to a prefix.  </em>
+<a name="134" href="#134">134</a> <em class="jxr_javadoccomment">     * @param prefix</em>
+<a name="135" href="#135">135</a> <em class="jxr_javadoccomment">     * @param cmisPath</em>
+<a name="136" href="#136">136</a> <em class="jxr_javadoccomment">     * @return  a string &lt;code&gt;r&lt;/code&gt; such that &lt;code&gt;prefix&lt;/code&gt; + &lt;code&gt;r&lt;/code&gt; = &lt;code&gt;cmisPath&lt;/code&gt; </em>
+<a name="137" href="#137">137</a> <em class="jxr_javadoccomment">     * @throws IllegalArgumentException  if &lt;code&gt;prefix&lt;/code&gt; is not a prefix of &lt;code&gt;cmisPath&lt;/code&gt;</em>
+<a name="138" href="#138">138</a> <em class="jxr_javadoccomment">     */</em>
+<a name="139" href="#139">139</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> String relativize(String prefix, String cmisPath) {
+<a name="140" href="#140">140</a>         <strong class="jxr_keyword">if</strong> (cmisPath.startsWith(prefix)) {
+<a name="141" href="#141">141</a>             <strong class="jxr_keyword">return</strong> cmisPath.substring(prefix.length());
+<a name="142" href="#142">142</a>         }
+<a name="143" href="#143">143</a>         <strong class="jxr_keyword">else</strong> {
+<a name="144" href="#144">144</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalArgumentException(prefix + <span class="jxr_string">" is not a prefix of "</span> + cmisPath);
+<a name="145" href="#145">145</a>         }
+<a name="146" href="#146">146</a>     }
+<a name="147" href="#147">147</a> 
+<a name="148" href="#148">148</a>     <em class="jxr_comment">//------------------------------------------&lt; private &gt;---</em>
+<a name="149" href="#149">149</a> 
+<a name="150" href="#150">150</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> String normalize(String path) {
+<a name="151" href="#151">151</a>         <strong class="jxr_keyword">if</strong> (path == <strong class="jxr_keyword">null</strong> || path.length() == 0) {
+<a name="152" href="#152">152</a>             <strong class="jxr_keyword">return</strong> <span class="jxr_string">"/"</span>;
+<a name="153" href="#153">153</a>         }
+<a name="154" href="#154">154</a> 
+<a name="155" href="#155">155</a>         <strong class="jxr_keyword">if</strong> (!path.startsWith(<span class="jxr_string">"/"</span>)) {
+<a name="156" href="#156">156</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisInvalidArgumentException(<span class="jxr_string">"Root path must be absolute. Got: "</span> + path);
+<a name="157" href="#157">157</a>         }
+<a name="158" href="#158">158</a> 
+<a name="159" href="#159">159</a>         <strong class="jxr_keyword">while</strong> (path.length() &gt; 1 &amp;&amp; path.endsWith(<span class="jxr_string">"/"</span>)) {
+<a name="160" href="#160">160</a>             path = path.substring(0, path.length() - 1);
+<a name="161" href="#161">161</a>         }
+<a name="162" href="#162">162</a>         <strong class="jxr_keyword">return</strong> path;
+<a name="163" href="#163">163</a>     }
+<a name="164" href="#164">164</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/PropertyHelper.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/PropertyHelper.html (added)
+++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/PropertyHelper.html Tue Apr  3 05:20:54 2012
@@ -0,0 +1,145 @@
+<!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>PropertyHelper xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file</em>
+<a name="4" href="#4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file</em>
+<a name="6" href="#6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a>   <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="jxr_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="11" href="#11">11</a>  <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the</em>
+<a name="16" href="#16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a>  <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a>  <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong class="jxr_keyword">package</strong> org.apache.chemistry.opencmis.jcr;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.PropertyIds;
+<a name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.Properties;
+<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.PropertyData;
+<a name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.PropertyId;
+<a name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.PropertyString;
+<a name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
+<a name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+<a name="29" href="#29">29</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+<a name="30" href="#30">30</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyBooleanImpl;
+<a name="31" href="#31">31</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyDateTimeImpl;
+<a name="32" href="#32">32</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyDecimalImpl;
+<a name="33" href="#33">33</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyHtmlImpl;
+<a name="34" href="#34">34</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyIdImpl;
+<a name="35" href="#35">35</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyIntegerImpl;
+<a name="36" href="#36">36</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyStringImpl;
+<a name="37" href="#37">37</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyUriImpl;
+<a name="38" href="#38">38</a>  
+<a name="39" href="#39">39</a>  <strong class="jxr_keyword">import</strong> java.math.BigDecimal;
+<a name="40" href="#40">40</a>  <strong class="jxr_keyword">import</strong> java.math.BigInteger;
+<a name="41" href="#41">41</a>  <strong class="jxr_keyword">import</strong> java.util.GregorianCalendar;
+<a name="42" href="#42">42</a>  <strong class="jxr_keyword">import</strong> java.util.List;
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>  <em class="jxr_javadoccomment">/**</em>
+<a name="45" href="#45">45</a>  <em class="jxr_javadoccomment"> * Helper class with utility functions for handling {@link Properties}.</em>
+<a name="46" href="#46">46</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="47" href="#47">47</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/PropertyHelper.html">PropertyHelper</a> {
+<a name="48" href="#48">48</a>      <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/chemistry/opencmis/jcr/PropertyHelper.html">PropertyHelper</a>() {
+<a name="49" href="#49">49</a>      }
+<a name="50" href="#50">50</a>  
+<a name="51" href="#51">51</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="52" href="#52">52</a>  <em class="jxr_javadoccomment">     * Retrieve a string value.</em>
+<a name="53" href="#53">53</a>  <em class="jxr_javadoccomment">     *</em>
+<a name="54" href="#54">54</a>  <em class="jxr_javadoccomment">     * @param properties</em>
+<a name="55" href="#55">55</a>  <em class="jxr_javadoccomment">     * @param name  the name of the value to retrieve</em>
+<a name="56" href="#56">56</a>  <em class="jxr_javadoccomment">     * @return  the first value of the given &lt;code&gt;name&lt;/code&gt; or &lt;code&gt;null&lt;/code&gt; if either</em>
+<a name="57" href="#57">57</a>  <em class="jxr_javadoccomment">     *      these are no string properties or no property of &lt;code&gt;name&lt;/code&gt; exists. </em>
+<a name="58" href="#58">58</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="59" href="#59">59</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> String getStringProperty(Properties properties, String name) {
+<a name="60" href="#60">60</a>          PropertyData&lt;?&gt; property = properties.getProperties().get(name);
+<a name="61" href="#61">61</a>          <strong class="jxr_keyword">if</strong> (!(property instanceof PropertyString)) {
+<a name="62" href="#62">62</a>              <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a name="63" href="#63">63</a>          }
+<a name="64" href="#64">64</a>  
+<a name="65" href="#65">65</a>          <strong class="jxr_keyword">return</strong> ((PropertyString) property).getFirstValue();
+<a name="66" href="#66">66</a>      }
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="69" href="#69">69</a>  <em class="jxr_javadoccomment">     * Gets the type id from a set of properties.</em>
+<a name="70" href="#70">70</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="71" href="#71">71</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> String getTypeId(Properties properties) {
+<a name="72" href="#72">72</a>          PropertyData&lt;?&gt; typeProperty = properties.getProperties().get(PropertyIds.OBJECT_TYPE_ID);
+<a name="73" href="#73">73</a>          <strong class="jxr_keyword">if</strong> (!(typeProperty instanceof PropertyId)) {
+<a name="74" href="#74">74</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisInvalidArgumentException(<span class="jxr_string">"Type id must be set!"</span>);
+<a name="75" href="#75">75</a>          }
+<a name="76" href="#76">76</a>  
+<a name="77" href="#77">77</a>          String typeId = ((PropertyId) typeProperty).getFirstValue();
+<a name="78" href="#78">78</a>          <strong class="jxr_keyword">if</strong> (typeId == <strong class="jxr_keyword">null</strong>) {
+<a name="79" href="#79">79</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisInvalidArgumentException(<span class="jxr_string">"Type id must be set!"</span>);
+<a name="80" href="#80">80</a>          }
+<a name="81" href="#81">81</a>  
+<a name="82" href="#82">82</a>          <strong class="jxr_keyword">return</strong> typeId;
+<a name="83" href="#83">83</a>      }
+<a name="84" href="#84">84</a>  
+<a name="85" href="#85">85</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="86" href="#86">86</a>  <em class="jxr_javadoccomment">     * @param prop</em>
+<a name="87" href="#87">87</a>  <em class="jxr_javadoccomment">     * @return  &lt;code&gt;true&lt;/code&gt; iff &lt;code&gt;prop&lt;/code&gt; denotes an empty property data value</em>
+<a name="88" href="#88">88</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="89" href="#89">89</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">boolean</strong> isPropertyEmpty(PropertyData&lt;?&gt; prop) {
+<a name="90" href="#90">90</a>          <strong class="jxr_keyword">return</strong> prop == <strong class="jxr_keyword">null</strong> || prop.getValues() == <strong class="jxr_keyword">null</strong> || prop.getValues().isEmpty();
+<a name="91" href="#91">91</a>      }
+<a name="92" href="#92">92</a>  
+<a name="93" href="#93">93</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="94" href="#94">94</a>  <em class="jxr_javadoccomment">     * Determine the default property data value for a given property definition.</em>
+<a name="95" href="#95">95</a>  <em class="jxr_javadoccomment">     * @param propDef</em>
+<a name="96" href="#96">96</a>  <em class="jxr_javadoccomment">     * @return</em>
+<a name="97" href="#97">97</a>  <em class="jxr_javadoccomment">     * @throws CmisRuntimeException  if &lt;code&gt;propDef&lt;/code&gt; is invalid or unknown.</em>
+<a name="98" href="#98">98</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="99" href="#99">99</a>      @SuppressWarnings(<span class="jxr_string">"unchecked"</span>)
+<a name="100" href="#100">100</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> PropertyData&lt;?&gt; getDefaultValue(PropertyDefinition&lt;?&gt; propDef) {
+<a name="101" href="#101">101</a>         <strong class="jxr_keyword">if</strong> (propDef == <strong class="jxr_keyword">null</strong>) {
+<a name="102" href="#102">102</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a name="103" href="#103">103</a>         }
+<a name="104" href="#104">104</a> 
+<a name="105" href="#105">105</a>         List&lt;?&gt; defaultValue = propDef.getDefaultValue();
+<a name="106" href="#106">106</a>         <strong class="jxr_keyword">if</strong> (defaultValue != <strong class="jxr_keyword">null</strong> &amp;&amp; !defaultValue.isEmpty()) {
+<a name="107" href="#107">107</a>             <strong class="jxr_keyword">switch</strong> (propDef.getPropertyType()) {
+<a name="108" href="#108">108</a>                 <strong class="jxr_keyword">case</strong> BOOLEAN:
+<a name="109" href="#109">109</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyBooleanImpl(propDef.getId(), (List&lt;Boolean&gt;) defaultValue);
+<a name="110" href="#110">110</a>                 <strong class="jxr_keyword">case</strong> DATETIME:
+<a name="111" href="#111">111</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyDateTimeImpl(propDef.getId(), (List&lt;GregorianCalendar&gt;) defaultValue);
+<a name="112" href="#112">112</a>                 <strong class="jxr_keyword">case</strong> DECIMAL:
+<a name="113" href="#113">113</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyDecimalImpl(propDef.getId(), (List&lt;BigDecimal&gt;) defaultValue);
+<a name="114" href="#114">114</a>                 <strong class="jxr_keyword">case</strong> HTML:
+<a name="115" href="#115">115</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyHtmlImpl(propDef.getId(), (List&lt;String&gt;) defaultValue);
+<a name="116" href="#116">116</a>                 <strong class="jxr_keyword">case</strong> ID:
+<a name="117" href="#117">117</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyIdImpl(propDef.getId(), (List&lt;String&gt;) defaultValue);
+<a name="118" href="#118">118</a>                 <strong class="jxr_keyword">case</strong> INTEGER:
+<a name="119" href="#119">119</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyIntegerImpl(propDef.getId(), (List&lt;BigInteger&gt;) defaultValue);
+<a name="120" href="#120">120</a>                 <strong class="jxr_keyword">case</strong> STRING:
+<a name="121" href="#121">121</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyStringImpl(propDef.getId(), (List&lt;String&gt;) defaultValue);
+<a name="122" href="#122">122</a>                 <strong class="jxr_keyword">case</strong> URI:
+<a name="123" href="#123">123</a>                     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> PropertyUriImpl(propDef.getId(), (List&lt;String&gt;) defaultValue);
+<a name="124" href="#124">124</a>                 <strong class="jxr_keyword">default</strong>:
+<a name="125" href="#125">125</a>                     <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> CmisRuntimeException(<span class="jxr_string">"Unknown datatype: "</span> + propDef.getPropertyType());
+<a name="126" href="#126">126</a>             }
+<a name="127" href="#127">127</a>         }
+<a name="128" href="#128">128</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a name="129" href="#129">129</a>     }
+<a name="130" href="#130">130</a> 
+<a name="131" href="#131">131</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/impl/AbstractJcrTypeHandler.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/impl/AbstractJcrTypeHandler.html (added)
+++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/impl/AbstractJcrTypeHandler.html Tue Apr  3 05:20:54 2012
@@ -0,0 +1,55 @@
+<!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>AbstractJcrTypeHandler xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file</em>
+<a name="4" href="#4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file</em>
+<a name="6" href="#6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a>   <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="jxr_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="11" href="#11">11</a>  <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the</em>
+<a name="16" href="#16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a>  <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a>  <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.chemistry.opencmis.jcr.impl;
+<a name="20" href="#20">20</a>  
+<a name="21" href="#21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.jcr.JcrTypeManager;
+<a name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.jcr.PathManager;
+<a name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.jcr.type.JcrTypeHandler;
+<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.jcr.type.JcrTypeHandlerManager;
+<a name="25" href="#25">25</a>  
+<a name="26" href="#26">26</a>  <em class="jxr_javadoccomment">/**</em>
+<a name="27" href="#27">27</a>  <em class="jxr_javadoccomment"> * This abstract class takes care of collecting references set when the handler is added to</em>
+<a name="28" href="#28">28</a>  <em class="jxr_javadoccomment"> * {@link JcrTypeHandlerManager}.</em>
+<a name="29" href="#29">29</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="30" href="#30">30</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">abstract</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/chemistry/opencmis/jcr/impl/AbstractJcrTypeHandler.html">AbstractJcrTypeHandler</a> implements <a href="../../../../../../org/apache/chemistry/opencmis/jcr/type/JcrTypeHandler.html">JcrTypeHandler</a> {
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>      <strong class="jxr_keyword">protected</strong> <a href="../../../../../../org/apache/chemistry/opencmis/jcr/JcrTypeManager.html">JcrTypeManager</a> typeManager;
+<a name="33" href="#33">33</a>      <strong class="jxr_keyword">protected</strong> <a href="../../../../../../org/apache/chemistry/opencmis/jcr/PathManager.html">PathManager</a> pathManager;
+<a name="34" href="#34">34</a>      <strong class="jxr_keyword">protected</strong> <a href="../../../../../../org/apache/chemistry/opencmis/jcr/type/JcrTypeHandlerManager.html">JcrTypeHandlerManager</a> typeHandlerManager;
+<a name="35" href="#35">35</a>  
+<a name="36" href="#36">36</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> initialize(<a href="../../../../../../org/apache/chemistry/opencmis/jcr/PathManager.html">PathManager</a> pathManager, <a href="../../../../../../org/apache/chemistry/opencmis/jcr/JcrTypeManager.html">JcrTypeManager</a> typeManager, <a href="../../../../../../org/apache/chemistry/opencmis/jcr/type/JcrTypeHandlerManager.html">JcrTypeHandlerManager</a> typeHandlerManager) {
+<a name="37" href="#37">37</a>          <strong class="jxr_keyword">this</strong>.typeManager = typeManager;
+<a name="38" href="#38">38</a>          <strong class="jxr_keyword">this</strong>.pathManager = pathManager;
+<a name="39" href="#39">39</a>          <strong class="jxr_keyword">this</strong>.typeHandlerManager = typeHandlerManager;
+<a name="40" href="#40">40</a>      }
+<a name="41" href="#41">41</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/impl/DefaultDocumentIdentifierMap.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/impl/DefaultDocumentIdentifierMap.html (added)
+++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-jcr/xref/org/apache/chemistry/opencmis/jcr/impl/DefaultDocumentIdentifierMap.html Tue Apr  3 05:20:54 2012
@@ -0,0 +1,63 @@
+<!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>DefaultDocumentIdentifierMap xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a>   <em class="jxr_comment"> * or more contributor license agreements.  See the NOTICE file</em>
+<a name="4" href="#4">4</a>   <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a>   <em class="jxr_comment"> * regarding copyright ownership.  The ASF licenses this file</em>
+<a name="6" href="#6">6</a>   <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a>   <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a>   <em class="jxr_comment"> * with the License.  You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a>   <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="jxr_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="11" href="#11">11</a>  <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a>  <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a>  <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a>  <em class="jxr_comment"> * KIND, either express or implied.  See the License for the</em>
+<a name="16" href="#16">16</a>  <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a>  <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a>  <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a>  <strong class="jxr_keyword">package</strong> org.apache.chemistry.opencmis.jcr.impl;
+<a name="20" href="#20">20</a>  
+<a name="21" href="#21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.PropertyIds;
+<a name="22" href="#22">22</a>  
+<a name="23" href="#23">23</a>  <em class="jxr_javadoccomment">/**</em>
+<a name="24" href="#24">24</a>  <em class="jxr_javadoccomment"> * Provides mappings to standard jcr properties for documents.</em>
+<a name="25" href="#25">25</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="26" href="#26">26</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/chemistry/opencmis/jcr/impl/DefaultDocumentIdentifierMap.html">DefaultDocumentIdentifierMap</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../../org/apache/chemistry/opencmis/jcr/impl/DefaultIdentifierMapBase.html">DefaultIdentifierMapBase</a> {
+<a name="27" href="#27">27</a>  
+<a name="28" href="#28">28</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">boolean</strong> isVersionable;
+<a name="29" href="#29">29</a>  
+<a name="30" href="#30">30</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/chemistry/opencmis/jcr/impl/DefaultDocumentIdentifierMap.html">DefaultDocumentIdentifierMap</a>(<strong class="jxr_keyword">boolean</strong> isVersionable) {
+<a name="31" href="#31">31</a>          <strong class="jxr_keyword">super</strong>(<span class="jxr_string">"nt:file"</span>);
+<a name="32" href="#32">32</a>          <strong class="jxr_keyword">this</strong>.isVersionable = isVersionable;
+<a name="33" href="#33">33</a>          cmis2Jcr.put(PropertyIds.CREATED_BY, <span class="jxr_string">"jcr:content/@jcr:createdBy"</span>);
+<a name="34" href="#34">34</a>          cmis2Jcr.put(PropertyIds.CREATION_DATE, <span class="jxr_string">"jcr:content/@jcr:created"</span>);
+<a name="35" href="#35">35</a>          cmis2Jcr.put(PropertyIds.LAST_MODIFIED_BY, <span class="jxr_string">"jcr:content/@jcr:lastModifiedBy"</span>);
+<a name="36" href="#36">36</a>          cmis2Jcr.put(PropertyIds.LAST_MODIFICATION_DATE, <span class="jxr_string">"jcr:content/@jcr:lastModified"</span>);
+<a name="37" href="#37">37</a>          cmis2Jcr.put(PropertyIds.CONTENT_STREAM_MIME_TYPE, <span class="jxr_string">"jcr:content/@jcr:mimeType"</span>);
+<a name="38" href="#38">38</a>          cmis2Jcr.put(PropertyIds.CONTENT_STREAM_FILE_NAME, <span class="jxr_string">"fn:name()"</span>);
+<a name="39" href="#39">39</a>          <em class="jxr_comment">// xxx not supported: IS_IMMUTABLE, IS_LATEST_VERSION, IS_MAJOR_VERSION, IS_LATEST_MAJOR_VERSION,</em>
+<a name="40" href="#40">40</a>          <em class="jxr_comment">// VERSION_LABEL, VERSION_SERIES_ID, IS_VERSION_SERIES_CHECKED_OUT, VERSION_SERIES_CHECKED_OUT_ID</em>
+<a name="41" href="#41">41</a>          <em class="jxr_comment">// VERSION_SERIES_CHECKED_OUT_BY, CHECKIN_COMMENT, CONTENT_STREAM_ID, CONTENT_STREAM_LENGTH</em>
+<a name="42" href="#42">42</a>      }
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>      @Override
+<a name="45" href="#45">45</a>      <strong class="jxr_keyword">public</strong> String jcrTypeCondition() {
+<a name="46" href="#46">46</a>          <strong class="jxr_keyword">return</strong> (isVersionable ? <span class="jxr_string">""</span> : <span class="jxr_string">"not"</span>) +
+<a name="47" href="#47">47</a>                  <span class="jxr_string">"(@jcr:mixinTypes = 'mix:simpleVersionable')"</span>;
+<a name="48" href="#48">48</a>      }
+<a name="49" href="#49">49</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+