You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by ga...@apache.org on 2012/04/03 06:51:57 UTC
svn commit: r1308684 [4/34] - in
/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings:
./ css/ images/ images/logos/ xref-test/ xref-test/org/
xref-test/org/apache/ xref-test/org/apache/chemistry/ ...
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,156 @@
+<!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>AclMergeTest 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.client.bindings.atompub;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> java.util.ArrayList;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> java.util.HashMap;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> java.util.List;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="25" href="#25">25</a>
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService;
+<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.Ace;
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.data.Acl;
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlEntryImpl;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlListImpl;
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlPrincipalDataImpl;
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment">/**</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * Test for the ACL merging that is necessary in the AtomPub binding</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> * implementation.</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">class</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html">AclMergeTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="40" href="#40">40</a>
+<a name="41" href="#41">41</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testIsACLMergeRequired() {
+<a name="42" href="#42">42</a> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html">AtomPubService</a> service = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html">AtomPubService</a>();
+<a name="43" href="#43">43</a>
+<a name="44" href="#44">44</a> assertFalse(service.publicIsACLMergeRequired(<strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>));
+<a name="45" href="#45">45</a> assertFalse(service.publicIsACLMergeRequired(<strong class="jxr_keyword">new</strong> AccessControlListImpl(), <strong class="jxr_keyword">null</strong>));
+<a name="46" href="#46">46</a> assertFalse(service.publicIsACLMergeRequired(<strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">new</strong> AccessControlListImpl()));
+<a name="47" href="#47">47</a> assertFalse(service.publicIsACLMergeRequired(<strong class="jxr_keyword">new</strong> AccessControlListImpl(), <strong class="jxr_keyword">new</strong> AccessControlListImpl()));
+<a name="48" href="#48">48</a> }
+<a name="49" href="#49">49</a>
+<a name="50" href="#50">50</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testAclMerge() {
+<a name="51" href="#51">51</a> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html">AtomPubService</a> service = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html">AtomPubService</a>();
+<a name="52" href="#52">52</a>
+<a name="53" href="#53">53</a> <em class="jxr_comment">// original</em>
+<a name="54" href="#54">54</a> Map<String, String[]> originalAceData = <strong class="jxr_keyword">new</strong> HashMap<String, String[]>();
+<a name="55" href="#55">55</a>
+<a name="56" href="#56">56</a> originalAceData.put(<span class="jxr_string">"p1"</span>, <strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"perm:read"</span>, <span class="jxr_string">"perm:write"</span>, <span class="jxr_string">"perm:delete"</span> });
+<a name="57" href="#57">57</a> originalAceData.put(<span class="jxr_string">"p2"</span>, <strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"perm:read"</span> });
+<a name="58" href="#58">58</a> originalAceData.put(<span class="jxr_string">"p3"</span>, <strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"perm:all"</span> });
+<a name="59" href="#59">59</a>
+<a name="60" href="#60">60</a> Acl originalACEs = createACL(originalAceData);
+<a name="61" href="#61">61</a>
+<a name="62" href="#62">62</a> <em class="jxr_comment">// add</em>
+<a name="63" href="#63">63</a> Map<String, String[]> addAceData = <strong class="jxr_keyword">new</strong> HashMap<String, String[]>();
+<a name="64" href="#64">64</a>
+<a name="65" href="#65">65</a> addAceData.put(<span class="jxr_string">"p2"</span>, <strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"perm:write"</span> });
+<a name="66" href="#66">66</a> addAceData.put(<span class="jxr_string">"p4"</span>, <strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"perm:all"</span> });
+<a name="67" href="#67">67</a>
+<a name="68" href="#68">68</a> Acl addACEs = createACL(addAceData);
+<a name="69" href="#69">69</a>
+<a name="70" href="#70">70</a> <em class="jxr_comment">// remove</em>
+<a name="71" href="#71">71</a> Map<String, String[]> removeAceData = <strong class="jxr_keyword">new</strong> HashMap<String, String[]>();
+<a name="72" href="#72">72</a>
+<a name="73" href="#73">73</a> removeAceData.put(<span class="jxr_string">"p1"</span>, <strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"perm:write"</span> });
+<a name="74" href="#74">74</a> removeAceData.put(<span class="jxr_string">"p3"</span>, <strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"perm:all"</span> });
+<a name="75" href="#75">75</a>
+<a name="76" href="#76">76</a> Acl removeACEs = createACL(removeAceData);
+<a name="77" href="#77">77</a>
+<a name="78" href="#78">78</a> Acl newACL = service.publicMergeACLs(originalACEs, addACEs, removeACEs);
+<a name="79" href="#79">79</a>
+<a name="80" href="#80">80</a> assertEquals(3, newACL.getAces().size());
+<a name="81" href="#81">81</a>
+<a name="82" href="#82">82</a> <strong class="jxr_keyword">for</strong> (Ace ace : newACL.getAces()) {
+<a name="83" href="#83">83</a> String principal = ace.getPrincipal().getId();
+<a name="84" href="#84">84</a> assertNotNull(principal);
+<a name="85" href="#85">85</a>
+<a name="86" href="#86">86</a> <strong class="jxr_keyword">if</strong> (principal.equals(<span class="jxr_string">"p1"</span>)) {
+<a name="87" href="#87">87</a> assertEquals(2, ace.getPermissions().size());
+<a name="88" href="#88">88</a> assertTrue(ace.getPermissions().contains(<span class="jxr_string">"perm:read"</span>));
+<a name="89" href="#89">89</a> assertTrue(ace.getPermissions().contains(<span class="jxr_string">"perm:delete"</span>));
+<a name="90" href="#90">90</a> assertFalse(ace.getPermissions().contains(<span class="jxr_string">"perm:write"</span>));
+<a name="91" href="#91">91</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (principal.equals(<span class="jxr_string">"p2"</span>)) {
+<a name="92" href="#92">92</a> assertEquals(2, ace.getPermissions().size());
+<a name="93" href="#93">93</a> assertTrue(ace.getPermissions().contains(<span class="jxr_string">"perm:read"</span>));
+<a name="94" href="#94">94</a> assertTrue(ace.getPermissions().contains(<span class="jxr_string">"perm:write"</span>));
+<a name="95" href="#95">95</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (principal.equals(<span class="jxr_string">"p3"</span>)) {
+<a name="96" href="#96">96</a> fail(<span class="jxr_string">"Principal should be deleted!"</span>);
+<a name="97" href="#97">97</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (principal.equals(<span class="jxr_string">"p4"</span>)) {
+<a name="98" href="#98">98</a> assertEquals(1, ace.getPermissions().size());
+<a name="99" href="#99">99</a> assertTrue(ace.getPermissions().contains(<span class="jxr_string">"perm:all"</span>));
+<a name="100" href="#100">100</a> }
+<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"> * Creates an ACL structure from a Map.</em>
+<a name="106" href="#106">106</a> <em class="jxr_javadoccomment"> */</em>
+<a name="107" href="#107">107</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> Acl createACL(Map<String, String[]> aceData) {
+<a name="108" href="#108">108</a> AccessControlListImpl result = <strong class="jxr_keyword">new</strong> AccessControlListImpl();
+<a name="109" href="#109">109</a>
+<a name="110" href="#110">110</a> List<Ace> aces = <strong class="jxr_keyword">new</strong> ArrayList<Ace>();
+<a name="111" href="#111">111</a>
+<a name="112" href="#112">112</a> <strong class="jxr_keyword">for</strong> (Map.Entry<String, String[]> e : aceData.entrySet()) {
+<a name="113" href="#113">113</a> ArrayList<String> permissions = <strong class="jxr_keyword">new</strong> ArrayList<String>();
+<a name="114" href="#114">114</a>
+<a name="115" href="#115">115</a> <strong class="jxr_keyword">for</strong> (String s : e.getValue()) {
+<a name="116" href="#116">116</a> permissions.add(s);
+<a name="117" href="#117">117</a> }
+<a name="118" href="#118">118</a>
+<a name="119" href="#119">119</a> AccessControlEntryImpl ace = <strong class="jxr_keyword">new</strong> AccessControlEntryImpl(<strong class="jxr_keyword">new</strong> AccessControlPrincipalDataImpl(e.getKey()),
+<a name="120" href="#120">120</a> permissions);
+<a name="121" href="#121">121</a>
+<a name="122" href="#122">122</a> aces.add(ace);
+<a name="123" href="#123">123</a> }
+<a name="124" href="#124">124</a>
+<a name="125" href="#125">125</a> result.setAces(aces);
+<a name="126" href="#126">126</a>
+<a name="127" href="#127">127</a> <strong class="jxr_keyword">return</strong> result;
+<a name="128" href="#128">128</a> }
+<a name="129" href="#129">129</a>
+<a name="130" href="#130">130</a> <em class="jxr_javadoccomment">/**</em>
+<a name="131" href="#131">131</a> <em class="jxr_javadoccomment"> * A class to make a few protected methods publicly available.</em>
+<a name="132" href="#132">132</a> <em class="jxr_javadoccomment"> */</em>
+<a name="133" href="#133">133</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AclMergeTest.html">AtomPubService</a> <strong class="jxr_keyword">extends</strong> AbstractAtomPubService {
+<a name="134" href="#134">134</a> <strong class="jxr_keyword">public</strong> Acl publicMergeACLs(Acl originalACEs, Acl addACEs, Acl removeACEs) {
+<a name="135" href="#135">135</a> <strong class="jxr_keyword">return</strong> mergeAcls(originalACEs, addACEs, removeACEs);
+<a name="136" href="#136">136</a> }
+<a name="137" href="#137">137</a>
+<a name="138" href="#138">138</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> publicIsACLMergeRequired(Acl addACEs, Acl removeACEs) {
+<a name="139" href="#139">139</a> <strong class="jxr_keyword">return</strong> isAclMergeRequired(addACEs, removeACEs);
+<a name="140" href="#140">140</a> }
+<a name="141" href="#141">141</a> }
+<a name="142" href="#142">142</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomParserTest.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomParserTest.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomParserTest.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomParserTest.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,171 @@
+<!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>AtomParserTest 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.client.bindings.atompub;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> java.io.ByteArrayInputStream;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> java.io.ByteArrayOutputStream;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> java.lang.reflect.Method;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> java.math.BigDecimal;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> java.math.BigInteger;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> java.util.List;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="29" href="#29">29</a>
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AtomEntryWriter;
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AtomPubParser;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomBase;
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement;
+<a name="34" href="#34">34</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomEntry;
+<a name="35" href="#35">35</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.PropertyIds;
+<a name="36" href="#36">36</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType;
+<a name="37" href="#37">37</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType;
+<a name="38" href="#38">38</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.jaxb.CmisProperty;
+<a name="39" href="#39">39</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertyDecimal;
+<a name="40" href="#40">40</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertyInteger;
+<a name="41" href="#41">41</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertyString;
+<a name="42" href="#42">42</a>
+<a name="43" href="#43">43</a> <em class="jxr_javadoccomment">/**</em>
+<a name="44" href="#44">44</a> <em class="jxr_javadoccomment"> * Minimal test for AtomEntryWriter and AtomPubParser.</em>
+<a name="45" href="#45">45</a> <em class="jxr_javadoccomment"> *</em>
+<a name="46" href="#46">46</a> <em class="jxr_javadoccomment"> * @author <a href="<a href="mailto:fmueller@opentext.com" target="alexandria_uri">mailto:fmueller@opentext.com</a>">Florian M&uuml;ller</a></em>
+<a name="47" href="#47">47</a> <em class="jxr_javadoccomment"> *</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">class</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AtomParserTest.html">AtomParserTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="50" href="#50">50</a>
+<a name="51" href="#51">51</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> byte[] CONTENT = <span class="jxr_string">"This is my test content!"</span>.getBytes();
+<a name="52" href="#52">52</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String CONTENT_TYPE = <span class="jxr_string">"text/plain"</span>;
+<a name="53" href="#53">53</a>
+<a name="54" href="#54">54</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testParser() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="55" href="#55">55</a> ByteArrayOutputStream bao = <strong class="jxr_keyword">new</strong> ByteArrayOutputStream();
+<a name="56" href="#56">56</a>
+<a name="57" href="#57">57</a> <em class="jxr_comment">// set up an object</em>
+<a name="58" href="#58">58</a> CmisPropertiesType properties = <strong class="jxr_keyword">new</strong> CmisPropertiesType();
+<a name="59" href="#59">59</a>
+<a name="60" href="#60">60</a> CmisPropertyString propName = <strong class="jxr_keyword">new</strong> CmisPropertyString();
+<a name="61" href="#61">61</a> propName.setPropertyDefinitionId(PropertyIds.NAME);
+<a name="62" href="#62">62</a> propName.getValue().add(<span class="jxr_string">"TestName"</span>);
+<a name="63" href="#63">63</a> properties.getProperty().add(propName);
+<a name="64" href="#64">64</a>
+<a name="65" href="#65">65</a> CmisPropertyInteger propInt = <strong class="jxr_keyword">new</strong> CmisPropertyInteger();
+<a name="66" href="#66">66</a> propInt.setPropertyDefinitionId(<span class="jxr_string">"IntProp"</span>);
+<a name="67" href="#67">67</a> propInt.getValue().add(BigInteger.valueOf(1));
+<a name="68" href="#68">68</a> propInt.getValue().add(BigInteger.valueOf(2));
+<a name="69" href="#69">69</a> propInt.getValue().add(BigInteger.valueOf(3));
+<a name="70" href="#70">70</a> properties.getProperty().add(propInt);
+<a name="71" href="#71">71</a>
+<a name="72" href="#72">72</a> CmisPropertyDecimal propDec = <strong class="jxr_keyword">new</strong> CmisPropertyDecimal();
+<a name="73" href="#73">73</a> propDec.setPropertyDefinitionId(<span class="jxr_string">"DecProp"</span>);
+<a name="74" href="#74">74</a> propDec.getValue().add(
+<a name="75" href="#75">75</a> <strong class="jxr_keyword">new</strong> BigDecimal(<span class="jxr_string">"3.14159253589793238462643383279502884197"</span>
+<a name="76" href="#76">76</a> + <span class="jxr_string">"169399375105820974944592307816406286208998628034825342117067982148086513"</span>));
+<a name="77" href="#77">77</a> properties.getProperty().add(propDec);
+<a name="78" href="#78">78</a>
+<a name="79" href="#79">79</a> CmisObjectType object1 = <strong class="jxr_keyword">new</strong> CmisObjectType();
+<a name="80" href="#80">80</a> object1.setProperties(properties);
+<a name="81" href="#81">81</a>
+<a name="82" href="#82">82</a> <em class="jxr_comment">// write the entry</em>
+<a name="83" href="#83">83</a> AtomEntryWriter aew = <strong class="jxr_keyword">new</strong> AtomEntryWriter(object1, CONTENT_TYPE, <strong class="jxr_keyword">new</strong> ByteArrayInputStream(CONTENT));
+<a name="84" href="#84">84</a> aew.write(bao);
+<a name="85" href="#85">85</a>
+<a name="86" href="#86">86</a> byte[] entryContent = bao.toByteArray();
+<a name="87" href="#87">87</a> assertTrue(entryContent.length > 0);
+<a name="88" href="#88">88</a>
+<a name="89" href="#89">89</a> <em class="jxr_comment">// parse it</em>
+<a name="90" href="#90">90</a> AtomPubParser parser = <strong class="jxr_keyword">new</strong> AtomPubParser(<strong class="jxr_keyword">new</strong> ByteArrayInputStream(entryContent));
+<a name="91" href="#91">91</a> parser.parse();
+<a name="92" href="#92">92</a> AtomBase parseResult = parser.getResults();
+<a name="93" href="#93">93</a>
+<a name="94" href="#94">94</a> assertTrue(parseResult instanceof AtomEntry);
+<a name="95" href="#95">95</a> AtomEntry entry = (AtomEntry) parseResult;
+<a name="96" href="#96">96</a>
+<a name="97" href="#97">97</a> assertNotNull(entry);
+<a name="98" href="#98">98</a> assertTrue(entry.getElements().size() > 0);
+<a name="99" href="#99">99</a>
+<a name="100" href="#100">100</a> <em class="jxr_comment">// find the object</em>
+<a name="101" href="#101">101</a> CmisObjectType object2 = <strong class="jxr_keyword">null</strong>;
+<a name="102" href="#102">102</a> <strong class="jxr_keyword">for</strong> (AtomElement element : entry.getElements()) {
+<a name="103" href="#103">103</a> <strong class="jxr_keyword">if</strong> (element.getObject() instanceof CmisObjectType) {
+<a name="104" href="#104">104</a> assertNull(object2);
+<a name="105" href="#105">105</a> object2 = (CmisObjectType) element.getObject();
+<a name="106" href="#106">106</a> }
+<a name="107" href="#107">107</a> }
+<a name="108" href="#108">108</a>
+<a name="109" href="#109">109</a> assertNotNull(object2);
+<a name="110" href="#110">110</a> assertNotNull(object2.getProperties());
+<a name="111" href="#111">111</a>
+<a name="112" href="#112">112</a> <em class="jxr_comment">// compare properteis</em>
+<a name="113" href="#113">113</a> <strong class="jxr_keyword">for</strong> (CmisProperty property1 : object1.getProperties().getProperty()) {
+<a name="114" href="#114">114</a> <strong class="jxr_keyword">boolean</strong> found = false;
+<a name="115" href="#115">115</a>
+<a name="116" href="#116">116</a> <strong class="jxr_keyword">for</strong> (CmisProperty property2 : object2.getProperties().getProperty()) {
+<a name="117" href="#117">117</a> <strong class="jxr_keyword">if</strong> (property1.getPropertyDefinitionId().equals(property2.getPropertyDefinitionId())) {
+<a name="118" href="#118">118</a> found = <strong class="jxr_keyword">true</strong>;
+<a name="119" href="#119">119</a>
+<a name="120" href="#120">120</a> assertEquals(property1, property2);
+<a name="121" href="#121">121</a> <strong class="jxr_keyword">break</strong>;
+<a name="122" href="#122">122</a> }
+<a name="123" href="#123">123</a> }
+<a name="124" href="#124">124</a>
+<a name="125" href="#125">125</a> assertTrue(found);
+<a name="126" href="#126">126</a> }
+<a name="127" href="#127">127</a> }
+<a name="128" href="#128">128</a>
+<a name="129" href="#129">129</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> assertEquals(CmisProperty expected, CmisProperty actual) <strong class="jxr_keyword">throws</strong> Exception {
+<a name="130" href="#130">130</a> <strong class="jxr_keyword">if</strong> (expected == <strong class="jxr_keyword">null</strong> && actual == <strong class="jxr_keyword">null</strong>) {
+<a name="131" href="#131">131</a> <strong class="jxr_keyword">return</strong>;
+<a name="132" href="#132">132</a> }
+<a name="133" href="#133">133</a>
+<a name="134" href="#134">134</a> <strong class="jxr_keyword">if</strong> (expected == <strong class="jxr_keyword">null</strong> || actual == <strong class="jxr_keyword">null</strong>) {
+<a name="135" href="#135">135</a> fail(<span class="jxr_string">"Property is null!"</span>);
+<a name="136" href="#136">136</a> }
+<a name="137" href="#137">137</a>
+<a name="138" href="#138">138</a> assertEquals(expected.getPropertyDefinitionId(), actual.getPropertyDefinitionId());
+<a name="139" href="#139">139</a> assertSame(expected.getClass(), actual.getClass());
+<a name="140" href="#140">140</a>
+<a name="141" href="#141">141</a> Method m1 = expected.getClass().getMethod(<span class="jxr_string">"getValue"</span>);
+<a name="142" href="#142">142</a> List<?> values1 = (List<?>) m1.invoke(expected);
+<a name="143" href="#143">143</a> assertNotNull(values1);
+<a name="144" href="#144">144</a> assertFalse(values1.isEmpty());
+<a name="145" href="#145">145</a>
+<a name="146" href="#146">146</a> Method m2 = actual.getClass().getMethod(<span class="jxr_string">"getValue"</span>);
+<a name="147" href="#147">147</a> List<?> values2 = (List<?>) m2.invoke(actual);
+<a name="148" href="#148">148</a> assertNotNull(values2);
+<a name="149" href="#149">149</a> assertFalse(values2.isEmpty());
+<a name="150" href="#150">150</a>
+<a name="151" href="#151">151</a> assertEquals(values1.size(), values2.size());
+<a name="152" href="#152">152</a>
+<a name="153" href="#153">153</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < values1.size(); i++) {
+<a name="154" href="#154">154</a> assertEquals(values1.get(i), values2.get(i));
+<a name="155" href="#155">155</a> }
+<a name="156" href="#156">156</a> }
+<a name="157" href="#157">157</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomPubTestBindingFactory.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomPubTestBindingFactory.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomPubTestBindingFactory.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/AtomPubTestBindingFactory.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,65 @@
+<!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>AtomPubTestBindingFactory 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.client.bindings.atompub;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> java.util.HashMap;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.CmisBindingFactory;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.SessionParameter;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.spi.CmisBinding;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <em class="jxr_javadoccomment">/**</em>
+<a name="29" href="#29">29</a> <em class="jxr_javadoccomment"> * @author <a href="<a href="mailto:fmueller@opentext.com" target="alexandria_uri">mailto:fmueller@opentext.com</a>">Florian M&uuml;ller</a></em>
+<a name="30" href="#30">30</a> <em class="jxr_javadoccomment"> * </em>
+<a name="31" href="#31">31</a> <em class="jxr_javadoccomment"> */</em>
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AtomPubTestBindingFactory.html">AtomPubTestBindingFactory</a> {
+<a name="33" href="#33">33</a>
+<a name="34" href="#34">34</a> <strong class="jxr_keyword">private</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/AtomPubTestBindingFactory.html">AtomPubTestBindingFactory</a>() {
+<a name="35" href="#35">35</a> }
+<a name="36" href="#36">36</a>
+<a name="37" href="#37">37</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> CmisBinding createBinding(String atomPubUrl, String user, String password) {
+<a name="38" href="#38">38</a> <em class="jxr_comment">// gather parameters</em>
+<a name="39" href="#39">39</a> Map<String, String> parameters = <strong class="jxr_keyword">new</strong> HashMap<String, String>();
+<a name="40" href="#40">40</a> parameters.put(SessionParameter.USER, user);
+<a name="41" href="#41">41</a> parameters.put(SessionParameter.PASSWORD, password);
+<a name="42" href="#42">42</a>
+<a name="43" href="#43">43</a> parameters.put(SessionParameter.ATOMPUB_URL, atomPubUrl);
+<a name="44" href="#44">44</a>
+<a name="45" href="#45">45</a> <em class="jxr_comment">// get factory and create provider</em>
+<a name="46" href="#46">46</a> CmisBindingFactory factory = CmisBindingFactory.newInstance();
+<a name="47" href="#47">47</a> CmisBinding binding = factory.createCmisAtomPubBinding(parameters);
+<a name="48" href="#48">48</a>
+<a name="49" href="#49">49</a> <strong class="jxr_keyword">return</strong> binding;
+<a name="50" href="#50">50</a> }
+<a name="51" href="#51">51</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadOnlyTests.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadOnlyTests.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadOnlyTests.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadOnlyTests.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,79 @@
+<!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>SimpleReadOnlyTests 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.client.bindings.atompub;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> java.util.HashSet;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> java.util.Set;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.framework.AbstractSimpleReadOnlyTests;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.spi.CmisBinding;
+<a name="26" href="#26">26</a>
+<a name="27" href="#27">27</a> <em class="jxr_javadoccomment">/**</em>
+<a name="28" href="#28">28</a> <em class="jxr_javadoccomment"> * @author <a href="<a href="mailto:fmueller@opentext.com" target="alexandria_uri">mailto:fmueller@opentext.com</a>">Florian M&uuml;ller</a></em>
+<a name="29" href="#29">29</a> <em class="jxr_javadoccomment"> * </em>
+<a name="30" href="#30">30</a> <em class="jxr_javadoccomment"> */</em>
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadOnlyTests.html">SimpleReadOnlyTests</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.html">AbstractSimpleReadOnlyTests</a> {
+<a name="32" href="#32">32</a>
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> Set<String> fTests;
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <strong class="jxr_keyword">public</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadOnlyTests.html">SimpleReadOnlyTests</a>() {
+<a name="36" href="#36">36</a> fTests = <strong class="jxr_keyword">new</strong> HashSet<String>();
+<a name="37" href="#37">37</a> fTests.add(TEST_REPOSITORY_INFO);
+<a name="38" href="#38">38</a> fTests.add(TEST_TYPES);
+<a name="39" href="#39">39</a> fTests.add(TEST_NAVIGATION);
+<a name="40" href="#40">40</a> fTests.add(TEST_CONTENT_STREAM);
+<a name="41" href="#41">41</a> fTests.add(TEST_QUERY);
+<a name="42" href="#42">42</a> fTests.add(TEST_CHECKEDOUT);
+<a name="43" href="#43">43</a> fTests.add(TEST_CONTENT_CHANGES);
+<a name="44" href="#44">44</a> }
+<a name="45" href="#45">45</a>
+<a name="46" href="#46">46</a> @Override
+<a name="47" href="#47">47</a> <strong class="jxr_keyword">protected</strong> CmisBinding createBinding() {
+<a name="48" href="#48">48</a> <em class="jxr_comment">// Add the default Java cookie manager from Java 1.6 to optimize</em>
+<a name="49" href="#49">49</a> <em class="jxr_comment">// authentication</em>
+<a name="50" href="#50">50</a> <em class="jxr_comment">// by reusing the common case where a token is stored in a cookie.</em>
+<a name="51" href="#51">51</a> <em class="jxr_comment">// Note: Enable cookie management requires Java 1.6, uncomment the</em>
+<a name="52" href="#52">52</a> <em class="jxr_comment">// following two lines to</em>
+<a name="53" href="#53">53</a> <em class="jxr_comment">// enable cookie management for the tests.</em>
+<a name="54" href="#54">54</a> <em class="jxr_comment">// java.net.CookieManager cm = new java.net.CookieManager(null,</em>
+<a name="55" href="#55">55</a> <em class="jxr_comment">// CookiePolicy.ACCEPT_ALL);</em>
+<a name="56" href="#56">56</a> <em class="jxr_comment">// java.net.CookieHandler.setDefault(cm);</em>
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> <strong class="jxr_keyword">return</strong> AtomPubTestBindingFactory.createBinding(getAtomPubURL(), getUsername(), getPassword());
+<a name="59" href="#59">59</a> }
+<a name="60" href="#60">60</a>
+<a name="61" href="#61">61</a> @Override
+<a name="62" href="#62">62</a> <strong class="jxr_keyword">protected</strong> Set<String> getEnabledTests() {
+<a name="63" href="#63">63</a> <strong class="jxr_keyword">return</strong> fTests;
+<a name="64" href="#64">64</a> }
+<a name="65" href="#65">65</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadWriteTests.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadWriteTests.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadWriteTests.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadWriteTests.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,79 @@
+<!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>SimpleReadWriteTests 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.client.bindings.atompub;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> java.util.HashSet;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> java.util.Set;
+<a name="23" href="#23">23</a>
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.framework.AbstractSimpleReadWriteTests;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.commons.spi.CmisBinding;
+<a name="26" href="#26">26</a>
+<a name="27" href="#27">27</a> <em class="jxr_javadoccomment">/**</em>
+<a name="28" href="#28">28</a> <em class="jxr_javadoccomment"> * @author <a href="<a href="mailto:fmueller@opentext.com" target="alexandria_uri">mailto:fmueller@opentext.com</a>">Florian M&uuml;ller</a></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">class</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadWriteTests.html">SimpleReadWriteTests</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadWriteTests.html">AbstractSimpleReadWriteTests</a> {
+<a name="31" href="#31">31</a>
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> Set<String> fTests;
+<a name="33" href="#33">33</a>
+<a name="34" href="#34">34</a> <strong class="jxr_keyword">public</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadWriteTests.html">SimpleReadWriteTests</a>() {
+<a name="35" href="#35">35</a> fTests = <strong class="jxr_keyword">new</strong> HashSet<String>();
+<a name="36" href="#36">36</a> fTests.add(TEST_CREATE_FOLDER);
+<a name="37" href="#37">37</a> fTests.add(TEST_CREATE_DOCUMENT);
+<a name="38" href="#38">38</a> fTests.add(TEST_SET_AND_DELETE_CONTENT);
+<a name="39" href="#39">39</a> fTests.add(TEST_UPDATE_PROPERTIES);
+<a name="40" href="#40">40</a> fTests.add(TEST_DELETE_TREE);
+<a name="41" href="#41">41</a> fTests.add(TEST_MOVE_OBJECT);
+<a name="42" href="#42">42</a> <em class="jxr_comment">// fTests.add(TEST_COPY_OBJECT);</em>
+<a name="43" href="#43">43</a> fTests.add(TEST_VERSIONING);
+<a name="44" href="#44">44</a> }
+<a name="45" href="#45">45</a>
+<a name="46" href="#46">46</a> @Override
+<a name="47" href="#47">47</a> <strong class="jxr_keyword">protected</strong> CmisBinding createBinding() {
+<a name="48" href="#48">48</a> <em class="jxr_comment">// Add the default Java cookie manager from Java 1.6 to optimize</em>
+<a name="49" href="#49">49</a> <em class="jxr_comment">// authentication</em>
+<a name="50" href="#50">50</a> <em class="jxr_comment">// by reusing the common case where a token is stored in a cookie.</em>
+<a name="51" href="#51">51</a> <em class="jxr_comment">// Note: Enable cookie management requires Java 1.6, uncomment the</em>
+<a name="52" href="#52">52</a> <em class="jxr_comment">// following two lines to</em>
+<a name="53" href="#53">53</a> <em class="jxr_comment">// enable cookie management for the tests.</em>
+<a name="54" href="#54">54</a> <em class="jxr_comment">// java.net.CookieManager cm = new java.net.CookieManager(null,</em>
+<a name="55" href="#55">55</a> <em class="jxr_comment">// CookiePolicy.ACCEPT_ALL);</em>
+<a name="56" href="#56">56</a> <em class="jxr_comment">// java.net.CookieHandler.setDefault(cm);</em>
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> <strong class="jxr_keyword">return</strong> AtomPubTestBindingFactory.createBinding(getAtomPubURL(), getUsername(), getPassword());
+<a name="59" href="#59">59</a> }
+<a name="60" href="#60">60</a>
+<a name="61" href="#61">61</a> @Override
+<a name="62" href="#62">62</a> <strong class="jxr_keyword">protected</strong> Set<String> getEnabledTests() {
+<a name="63" href="#63">63</a> <strong class="jxr_keyword">return</strong> fTests;
+<a name="64" href="#64">64</a> }
+<a name="65" href="#65">65</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-frame.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-frame.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-frame.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-frame.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,39 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>OpenCMIS Client Bindings Implementation 0.7.0 Reference Package org.apache.chemistry.opencmis.client.bindings.atompub</title>
+ <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="style" />
+ </head>
+ <body>
+
+ <h3>
+ <a href="package-summary.html" target="classFrame">org.apache.chemistry.opencmis.client.bindings.atompub</a>
+ </h3>
+
+ <h3>Classes</h3>
+
+ <ul>
+ <li>
+ <a href="AclMergeTest.html" target="classFrame">AclMergeTest</a>
+ </li>
+ <li>
+ <a href="AtomParserTest.html" target="classFrame">AtomParserTest</a>
+ </li>
+ <li>
+ <a href="AclMergeTest.html" target="classFrame">AtomPubService</a>
+ </li>
+ <li>
+ <a href="AtomPubTestBindingFactory.html" target="classFrame">AtomPubTestBindingFactory</a>
+ </li>
+ <li>
+ <a href="SimpleReadOnlyTests.html" target="classFrame">SimpleReadOnlyTests</a>
+ </li>
+ <li>
+ <a href="SimpleReadWriteTests.html" target="classFrame">SimpleReadWriteTests</a>
+ </li>
+ </ul>
+
+ </body>
+</html>
\ No newline at end of file
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-summary.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-summary.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-summary.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/atompub/package-summary.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,92 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>OpenCMIS Client Bindings Implementation 0.7.0 Reference Package org.apache.chemistry.opencmis.client.bindings.atompub</title>
+ <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="style" />
+ </head>
+ <body>
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../../../../../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../../../../../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+
+ <h2>Package org.apache.chemistry.opencmis.client.bindings.atompub</h2>
+
+ <table class="summary">
+ <thead>
+ <tr>
+ <th>Class Summary</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <a href="AclMergeTest.html" target="classFrame">AclMergeTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="AtomParserTest.html" target="classFrame">AtomParserTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="AclMergeTest.html" target="classFrame">AtomPubService</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="AtomPubTestBindingFactory.html" target="classFrame">AtomPubTestBindingFactory</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="SimpleReadOnlyTests.html" target="classFrame">SimpleReadOnlyTests</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="SimpleReadWriteTests.html" target="classFrame">SimpleReadWriteTests</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../../../../../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../../../../../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+ <hr />
+ Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.
+ </body>
+</html>
\ No newline at end of file
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/CacheTest.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/CacheTest.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/CacheTest.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/CacheTest.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,226 @@
+<!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>CacheTest 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.client.bindings.cache;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="22" href="#22">22</a>
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.cache.impl.ContentTypeCacheLevelImpl;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.cache.impl.LruCacheLevelImpl;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.apache.chemistry.opencmis.client.bindings.cache.impl.MapCacheLevelImpl;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <em class="jxr_javadoccomment">/**</em>
+<a name="29" href="#29">29</a> <em class="jxr_javadoccomment"> * Tests the cache implementation.</em>
+<a name="30" href="#30">30</a> <em class="jxr_javadoccomment"> * </em>
+<a name="31" href="#31">31</a> <em class="jxr_javadoccomment"> * @author <a href="<a href="mailto:fmueller@opentext.com" target="alexandria_uri">mailto:fmueller@opentext.com</a>">Florian M&uuml;ller</a></em>
+<a name="32" href="#32">32</a> <em class="jxr_javadoccomment"> * </em>
+<a name="33" href="#33">33</a> <em class="jxr_javadoccomment"> */</em>
+<a name="34" href="#34">34</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../org/apache/chemistry/opencmis/client/bindings/cache/CacheTest.html">CacheTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="35" href="#35">35</a>
+<a name="36" href="#36">36</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String MAP_CACHE_LEVEL = <span class="jxr_string">"org.apache.chemistry.opencmis.client.bindings.cache.impl.MapCacheLevelImpl"</span>;
+<a name="37" href="#37">37</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String LRU_CACHE_LEVEL = <span class="jxr_string">"org.apache.chemistry.opencmis.client.bindings.cache.impl.LruCacheLevelImpl"</span>;
+<a name="38" href="#38">38</a>
+<a name="39" href="#39">39</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testCache() {
+<a name="40" href="#40">40</a> Cache cache;
+<a name="41" href="#41">41</a>
+<a name="42" href="#42">42</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="43" href="#43">43</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] { MAP_CACHE_LEVEL, LRU_CACHE_LEVEL, MAP_CACHE_LEVEL, MAP_CACHE_LEVEL });
+<a name="44" href="#44">44</a>
+<a name="45" href="#45">45</a> String value1 = <span class="jxr_string">"value1"</span>;
+<a name="46" href="#46">46</a> String value2 = <span class="jxr_string">"value2"</span>;
+<a name="47" href="#47">47</a> String value3 = <span class="jxr_string">"value3"</span>;
+<a name="48" href="#48">48</a> Object valueObj;
+<a name="49" href="#49">49</a>
+<a name="50" href="#50">50</a> <em class="jxr_comment">// put and get</em>
+<a name="51" href="#51">51</a> cache.put(value1, <span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2a"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="52" href="#52">52</a> cache.put(value2, <span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2b"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="53" href="#53">53</a> cache.put(value3, <span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2c"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> valueObj = cache.get(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2a"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="56" href="#56">56</a> assertTrue(valueObj instanceof String);
+<a name="57" href="#57">57</a> assertSame(value1, valueObj);
+<a name="58" href="#58">58</a>
+<a name="59" href="#59">59</a> valueObj = cache.get(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2b"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="60" href="#60">60</a> assertTrue(valueObj instanceof String);
+<a name="61" href="#61">61</a> assertSame(value2, valueObj);
+<a name="62" href="#62">62</a>
+<a name="63" href="#63">63</a> valueObj = cache.get(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2c"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="64" href="#64">64</a> assertTrue(valueObj instanceof String);
+<a name="65" href="#65">65</a> assertSame(value3, valueObj);
+<a name="66" href="#66">66</a>
+<a name="67" href="#67">67</a> <em class="jxr_comment">// remove leaf</em>
+<a name="68" href="#68">68</a> cache.remove(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="69" href="#69">69</a> valueObj = cache.get(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="70" href="#70">70</a> assertNull(valueObj);
+<a name="71" href="#71">71</a>
+<a name="72" href="#72">72</a> <em class="jxr_comment">// put and get</em>
+<a name="73" href="#73">73</a> cache.put(value1, <span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="74" href="#74">74</a> valueObj = cache.get(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="75" href="#75">75</a> assertTrue(valueObj instanceof String);
+<a name="76" href="#76">76</a> assertSame(value1, valueObj);
+<a name="77" href="#77">77</a>
+<a name="78" href="#78">78</a> <em class="jxr_comment">// remove branch</em>
+<a name="79" href="#79">79</a> cache.remove(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>);
+<a name="80" href="#80">80</a> valueObj = cache.get(<span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>);
+<a name="81" href="#81">81</a> assertNull(valueObj);
+<a name="82" href="#82">82</a> }
+<a name="83" href="#83">83</a>
+<a name="84" href="#84">84</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testCacheBadUsage() {
+<a name="85" href="#85">85</a> Cache cache;
+<a name="86" href="#86">86</a>
+<a name="87" href="#87">87</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="88" href="#88">88</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] { MAP_CACHE_LEVEL, LRU_CACHE_LEVEL, MAP_CACHE_LEVEL, MAP_CACHE_LEVEL });
+<a name="89" href="#89">89</a>
+<a name="90" href="#90">90</a> <em class="jxr_comment">// insufficient number of keys</em>
+<a name="91" href="#91">91</a> <strong class="jxr_keyword">try</strong> {
+<a name="92" href="#92">92</a> cache.put(<span class="jxr_string">"value"</span>, <span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>, <span class="jxr_string">"l3"</span>);
+<a name="93" href="#93">93</a> } <strong class="jxr_keyword">catch</strong> (IllegalArgumentException e) {
+<a name="94" href="#94">94</a> }
+<a name="95" href="#95">95</a>
+<a name="96" href="#96">96</a> <em class="jxr_comment">// too many number of keys</em>
+<a name="97" href="#97">97</a> <strong class="jxr_keyword">try</strong> {
+<a name="98" href="#98">98</a> cache.put(<span class="jxr_string">"value"</span>, <span class="jxr_string">"l1"</span>, <span class="jxr_string">"l2"</span>, <span class="jxr_string">"l3"</span>, <span class="jxr_string">"l4"</span>, <span class="jxr_string">"l5"</span>);
+<a name="99" href="#99">99</a> } <strong class="jxr_keyword">catch</strong> (IllegalArgumentException e) {
+<a name="100" href="#100">100</a> }
+<a name="101" href="#101">101</a>
+<a name="102" href="#102">102</a> <em class="jxr_comment">// no keys</em>
+<a name="103" href="#103">103</a> assertNull(cache.get((String[]) <strong class="jxr_keyword">null</strong>));
+<a name="104" href="#104">104</a> }
+<a name="105" href="#105">105</a>
+<a name="106" href="#106">106</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testCacheConfig() {
+<a name="107" href="#107">107</a> Cache cache;
+<a name="108" href="#108">108</a>
+<a name="109" href="#109">109</a> <em class="jxr_comment">// empty config</em>
+<a name="110" href="#110">110</a> <strong class="jxr_keyword">try</strong> {
+<a name="111" href="#111">111</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="112" href="#112">112</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] {});
+<a name="113" href="#113">113</a> } <strong class="jxr_keyword">catch</strong> (IllegalArgumentException e) {
+<a name="114" href="#114">114</a> }
+<a name="115" href="#115">115</a>
+<a name="116" href="#116">116</a> <em class="jxr_comment">// null config</em>
+<a name="117" href="#117">117</a> <strong class="jxr_keyword">try</strong> {
+<a name="118" href="#118">118</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="119" href="#119">119</a> cache.initialize(<strong class="jxr_keyword">null</strong>);
+<a name="120" href="#120">120</a> } <strong class="jxr_keyword">catch</strong> (IllegalArgumentException e) {
+<a name="121" href="#121">121</a> }
+<a name="122" href="#122">122</a>
+<a name="123" href="#123">123</a> <em class="jxr_comment">// unknown class</em>
+<a name="124" href="#124">124</a> <strong class="jxr_keyword">try</strong> {
+<a name="125" href="#125">125</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="126" href="#126">126</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"this.is.not.a.valid.class"</span> });
+<a name="127" href="#127">127</a> } <strong class="jxr_keyword">catch</strong> (IllegalArgumentException e) {
+<a name="128" href="#128">128</a> }
+<a name="129" href="#129">129</a>
+<a name="130" href="#130">130</a> <em class="jxr_comment">// not a CacheLevel class</em>
+<a name="131" href="#131">131</a> <strong class="jxr_keyword">try</strong> {
+<a name="132" href="#132">132</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="133" href="#133">133</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] { <span class="jxr_string">"org.apache.chemistry.opencmis.client.provider.cache.CacheTest"</span> });
+<a name="134" href="#134">134</a> } <strong class="jxr_keyword">catch</strong> (IllegalArgumentException e) {
+<a name="135" href="#135">135</a> }
+<a name="136" href="#136">136</a> }
+<a name="137" href="#137">137</a>
+<a name="138" href="#138">138</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMapCache() {
+<a name="139" href="#139">139</a> Cache cache;
+<a name="140" href="#140">140</a>
+<a name="141" href="#141">141</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="142" href="#142">142</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] { MAP_CACHE_LEVEL + <span class="jxr_string">" "</span> + MapCacheLevelImpl.CAPACITY + <span class="jxr_string">"=10,"</span>
+<a name="143" href="#143">143</a> + MapCacheLevelImpl.LOAD_FACTOR + <span class="jxr_string">"=0.5"</span> });
+<a name="144" href="#144">144</a>
+<a name="145" href="#145">145</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < 100; i++) {
+<a name="146" href="#146">146</a> cache.put(<span class="jxr_string">"value"</span> + i, <span class="jxr_string">"key"</span> + i);
+<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">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < 100; i++) {
+<a name="150" href="#150">150</a> Object valueObj = cache.get(<span class="jxr_string">"key"</span> + i);
+<a name="151" href="#151">151</a> assertTrue(valueObj instanceof String);
+<a name="152" href="#152">152</a> assertEquals(<span class="jxr_string">"value"</span> + i, valueObj);
+<a name="153" href="#153">153</a> }
+<a name="154" href="#154">154</a> }
+<a name="155" href="#155">155</a>
+<a name="156" href="#156">156</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testURLCache() {
+<a name="157" href="#157">157</a> Cache cache;
+<a name="158" href="#158">158</a>
+<a name="159" href="#159">159</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="160" href="#160">160</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] { LRU_CACHE_LEVEL + <span class="jxr_string">" "</span> + LruCacheLevelImpl.MAX_ENTRIES + <span class="jxr_string">"=10"</span> });
+<a name="161" href="#161">161</a>
+<a name="162" href="#162">162</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < 100; i++) {
+<a name="163" href="#163">163</a> cache.put(<span class="jxr_string">"value"</span> + i, <span class="jxr_string">"key"</span> + i);
+<a name="164" href="#164">164</a> }
+<a name="165" href="#165">165</a>
+<a name="166" href="#166">166</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < 90; i++) {
+<a name="167" href="#167">167</a> Object valueObj = cache.get(<span class="jxr_string">"key"</span> + i);
+<a name="168" href="#168">168</a> assertNull(valueObj);
+<a name="169" href="#169">169</a> }
+<a name="170" href="#170">170</a>
+<a name="171" href="#171">171</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 90; i < 100; i++) {
+<a name="172" href="#172">172</a> Object valueObj = cache.get(<span class="jxr_string">"key"</span> + i);
+<a name="173" href="#173">173</a> assertTrue(valueObj instanceof String);
+<a name="174" href="#174">174</a> assertEquals(<span class="jxr_string">"value"</span> + i, valueObj);
+<a name="175" href="#175">175</a> }
+<a name="176" href="#176">176</a> }
+<a name="177" href="#177">177</a>
+<a name="178" href="#178">178</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> XtestFallback() {
+<a name="179" href="#179">179</a> Cache cache;
+<a name="180" href="#180">180</a>
+<a name="181" href="#181">181</a> cache = <strong class="jxr_keyword">new</strong> CacheImpl();
+<a name="182" href="#182">182</a> cache.initialize(<strong class="jxr_keyword">new</strong> String[] { MAP_CACHE_LEVEL + <span class="jxr_string">" "</span> + MapCacheLevelImpl.CAPACITY + <span class="jxr_string">"=10,"</span>
+<a name="183" href="#183">183</a> + MapCacheLevelImpl.LOAD_FACTOR + <span class="jxr_string">"=0.5"</span> });
+<a name="184" href="#184">184</a>
+<a name="185" href="#185">185</a> cache.put(<span class="jxr_string">"value1"</span>, <strong class="jxr_keyword">new</strong> String[] { <strong class="jxr_keyword">null</strong> });
+<a name="186" href="#186">186</a> cache.put(<span class="jxr_string">"value2"</span>, <span class="jxr_string">"key2"</span>);
+<a name="187" href="#187">187</a>
+<a name="188" href="#188">188</a> assertEquals(<span class="jxr_string">"value1"</span>, cache.get(<strong class="jxr_keyword">new</strong> String[] { <strong class="jxr_keyword">null</strong> }));
+<a name="189" href="#189">189</a> assertEquals(<span class="jxr_string">"value2"</span>, cache.get(<span class="jxr_string">"key2"</span>));
+<a name="190" href="#190">190</a> assertEquals(<span class="jxr_string">"value1"</span>, cache.get(<span class="jxr_string">"key3"</span>));
+<a name="191" href="#191">191</a> }
+<a name="192" href="#192">192</a>
+<a name="193" href="#193">193</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testContentTypeCache() {
+<a name="194" href="#194">194</a> ContentTypeCacheLevelImpl cl = <strong class="jxr_keyword">new</strong> ContentTypeCacheLevelImpl();
+<a name="195" href="#195">195</a> cl.initialize(<strong class="jxr_keyword">null</strong>);
+<a name="196" href="#196">196</a>
+<a name="197" href="#197">197</a> String type1 = <span class="jxr_string">"type1"</span>;
+<a name="198" href="#198">198</a>
+<a name="199" href="#199">199</a> cl.put(type1, <span class="jxr_string">"text/plain; param1=test; charset=UTF-8"</span>);
+<a name="200" href="#200">200</a>
+<a name="201" href="#201">201</a> assertEquals(type1, cl.get(<span class="jxr_string">"text/plain; param1=test; charset=UTF-8"</span>));
+<a name="202" href="#202">202</a> assertEquals(type1, cl.get(<span class="jxr_string">"text/plain; param1=test; charset=utf-8"</span>));
+<a name="203" href="#203">203</a> assertEquals(type1, cl.get(<span class="jxr_string">"text/plain; charset=utf-8; param1=test"</span>));
+<a name="204" href="#204">204</a> assertEquals(type1, cl.get(<span class="jxr_string">"text/plain; charset=utf-8; param1=test;"</span>));
+<a name="205" href="#205">205</a> assertEquals(type1, cl.get(<span class="jxr_string">"text/plain;charset=utf-8;param1=test"</span>));
+<a name="206" href="#206">206</a> assertEquals(type1, cl.get(<span class="jxr_string">"text/plain;\tcharset=utf-8; param1=test"</span>));
+<a name="207" href="#207">207</a> assertEquals(type1, cl.get(<span class="jxr_string">"text/plain; charset=\"utf-8\"; param1=test;"</span>));
+<a name="208" href="#208">208</a>
+<a name="209" href="#209">209</a> assertNull(cl.get(<span class="jxr_string">"text/plain; param1=blah; charset=UTF-8"</span>));
+<a name="210" href="#210">210</a> assertNull(cl.get(<span class="jxr_string">"text/plain; param1=test; charset=us-ascii"</span>));
+<a name="211" href="#211">211</a> }
+<a name="212" href="#212">212</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/package-frame.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/package-frame.html?rev=1308684&view=auto
==============================================================================
--- chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/package-frame.html (added)
+++ chemistry/site/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-bindings/xref-test/org/apache/chemistry/opencmis/client/bindings/cache/package-frame.html Tue Apr 3 04:51:51 2012
@@ -0,0 +1,24 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>OpenCMIS Client Bindings Implementation 0.7.0 Reference Package org.apache.chemistry.opencmis.client.bindings.cache</title>
+ <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="style" />
+ </head>
+ <body>
+
+ <h3>
+ <a href="package-summary.html" target="classFrame">org.apache.chemistry.opencmis.client.bindings.cache</a>
+ </h3>
+
+ <h3>Classes</h3>
+
+ <ul>
+ <li>
+ <a href="CacheTest.html" target="classFrame">CacheTest</a>
+ </li>
+ </ul>
+
+ </body>
+</html>
\ No newline at end of file