chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r830627 - in /websites/staging/chemistry/trunk/content: ./ java/examples/example-create-update.html
Date Fri, 31 Aug 2012 07:35:38 GMT
Author: buildbot
Date: Fri Aug 31 07:35:37 2012
New Revision: 830627

Log:
Staging update by buildbot for chemistry

Modified:
    websites/staging/chemistry/trunk/content/   (props changed)
    websites/staging/chemistry/trunk/content/java/examples/example-create-update.html

Propchange: websites/staging/chemistry/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Aug 31 07:35:37 2012
@@ -1 +1 @@
-1352797
+1379333

Modified: websites/staging/chemistry/trunk/content/java/examples/example-create-update.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/examples/example-create-update.html (original)
+++ websites/staging/chemistry/trunk/content/java/examples/example-create-update.html Fri
Aug 31 07:35:37 2012
@@ -222,14 +222,23 @@ Apache Chemistry - Creating and updating
 
 
 <h2 id="updating-properties">Updating properties</h2>
-<p>This example updates two properties of a CMIS object</p>
+<p>This example updates five properties of a CMIS object</p>
 <div class="codehilite"><pre><span class="n">CmisObject</span> <span
class="n">cmisobject</span> <span class="o">=</span> <span class="o">....</span>
 
-<span class="n">Map</span><span class="o">&lt;</span><span
class="n">String</span><span class="p">,</span> <span class="n">Object</span><span
class="o">&gt;</span> <span class="n">updateproperties</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span
class="o">&lt;</span><span class="n">String</span><span class="p">,</span>
<span class="n">Object</span><span class="o">&gt;</span><span
class="p">();</span>
-<span class="n">updateproperties</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;my:property&quot;</span><span
class="p">,</span> <span class="s">&quot;new value&quot;</span><span
class="p">);</span>
-<span class="n">updateproperties</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;my:other.property&quot;</span><span
class="p">,</span> <span class="mi">42</span><span class="p">);</span>
+<span class="n">Map</span><span class="o">&lt;</span><span
class="n">String</span><span class="p">,</span> <span class="n">Object</span><span
class="o">&gt;</span> <span class="n">updateProperties</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span
class="o">&lt;</span><span class="n">String</span><span class="p">,</span>
<span class="n">Object</span><span class="o">&gt;</span><span
class="p">();</span>
 
-<span class="n">cmisobject</span><span class="o">.</span><span
class="n">updateProperties</span><span class="p">(</span><span class="n">updateproperties</span><span
class="p">);</span>
+<span class="n">updateProperties</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;my:property&quot;</span><span
class="p">,</span> <span class="s">&quot;new value&quot;</span><span
class="p">);</span> <span class="sr">//</span> <span class="n">single</span><span
class="o">-</span><span class="n">value</span> <span class="n">property</span>
+<span class="n">updateProperties</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;my:int.property&quot;</span><span
class="p">,</span> <span class="mi">42</span><span class="p">);</span>
+<span class="n">updateProperties</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;my:date.property&quot;</span><span
class="p">,</span> <span class="k">new</span> <span class="n">GregorianCalendar</span><span
class="p">());</span>
+<span class="n">updateProperties</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;my:bool.property&quot;</span><span
class="p">,</span> <span class="n">true</span><span class="p">);</span>
+
+<span class="n">List</span><span class="sr">&lt;String&gt;</span>
<span class="n">shoppingList</span> <span class="o">=</span> <span
class="k">new</span> <span class="n">ArrayList</span><span class="sr">&lt;String&gt;</span><span
class="p">();</span>
+<span class="n">shoppingList</span><span class="o">.</span><span
class="n">add</span><span class="p">(</span><span class="s">&quot;milk&quot;</span><span
class="p">);</span>
+<span class="n">shoppingList</span><span class="o">.</span><span
class="n">add</span><span class="p">(</span><span class="s">&quot;bread&quot;</span><span
class="p">);</span>
+<span class="n">shoppingList</span><span class="o">.</span><span
class="n">add</span><span class="p">(</span><span class="s">&quot;cheese&quot;</span><span
class="p">);</span>
+<span class="n">updateProperties</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;my:shopping.list&quot;</span><span
class="p">,</span> <span class="n">shoppingList</span><span class="p">);</span>
<span class="sr">//</span> <span class="n">multi</span><span class="o">-</span><span
class="n">value</span> <span class="n">property</span>
+
+<span class="n">cmisobject</span><span class="o">.</span><span
class="n">updateProperties</span><span class="p">(</span><span class="n">updateProperties</span><span
class="p">);</span>
 </pre></div></div>
              <!-- Content -->
            </td>



Mime
View raw message