chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1379333 - /chemistry/site/trunk/content/java/examples/example-create-update.mdtext
Date Fri, 31 Aug 2012 07:35:08 GMT
Author: fmui
Date: Fri Aug 31 07:35:07 2012
New Revision: 1379333

URL: http://svn.apache.org/viewvc?rev=1379333&view=rev
Log:
Improved update properties example

Modified:
    chemistry/site/trunk/content/java/examples/example-create-update.mdtext

Modified: chemistry/site/trunk/content/java/examples/example-create-update.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/example-create-update.mdtext?rev=1379333&r1=1379332&r2=1379333&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/example-create-update.mdtext (original)
+++ chemistry/site/trunk/content/java/examples/example-create-update.mdtext Fri Aug 31 07:35:07
2012
@@ -44,13 +44,21 @@ This example creates a document in the f
 
 ## Updating properties
 
-This example updates two properties of a CMIS object
+This example updates five properties of a CMIS object
 
     CmisObject cmisobject = ....
 
-    Map<String, Object> updateproperties = new HashMap<String, Object>();
-    updateproperties.put("my:property", "new value");
-    updateproperties.put("my:other.property", 42);
+    Map<String, Object> updateProperties = new HashMap<String, Object>();
 
-    cmisobject.updateProperties(updateproperties);
+    updateProperties.put("my:property", "new value"); // single-value property
+    updateProperties.put("my:int.property", 42);
+    updateProperties.put("my:date.property", new GregorianCalendar());
+    updateProperties.put("my:bool.property", true);
+
+    List<String> shoppingList = new ArrayList<String>();
+    shoppingList.add("milk");
+    shoppingList.add("bread");
+    shoppingList.add("cheese");
+    updateProperties.put("my:shopping.list", shoppingList); // multi-value property
 
+    cmisobject.updateProperties(updateProperties);



Mime
View raw message