chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpo...@apache.org
Subject svn commit: r1595094 - /chemistry/cmislib/trunk/src/cmislib/browser/binding.py
Date Fri, 16 May 2014 03:12:09 GMT
Author: jpotts
Date: Fri May 16 03:12:09 2014
New Revision: 1595094

URL: http://svn.apache.org/r1595094
Log:
Implemented updateProperties in cmislib

Modified:
    chemistry/cmislib/trunk/src/cmislib/browser/binding.py

Modified: chemistry/cmislib/trunk/src/cmislib/browser/binding.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib/browser/binding.py?rev=1595094&r1=1595093&r2=1595094&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib/browser/binding.py (original)
+++ chemistry/cmislib/trunk/src/cmislib/browser/binding.py Fri May 16 03:12:09 2014
@@ -323,7 +323,27 @@ class BrowserCmisObject(object):
 
         """
 
-        pass
+        # get the root folder URL
+        updateUrl = self._repository.getRootFolderUrl() + "?objectId=" + self.id
+
+        props = {"cmisaction" : "update"}
+
+        propCount = 0
+        for prop in properties:
+            props["propertyId[%s]" % propCount] = prop
+            props["propertyValue[%s]" % propCount] = properties[prop]
+            propCount += 1
+
+        # invoke the URL
+        result = self._cmisClient.binding.post(updateUrl.encode('utf-8'),
+                                               urlencode(props),
+                                               'application/x-www-form-urlencoded',
+                                               self._cmisClient.username,
+                                               self._cmisClient.password)
+
+        self.data = result
+        self._initData()
+        return self
 
     def move(self, sourceFolder, targetFolder):
 



Mime
View raw message