Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

{
   "properties":{
      "cmis:name":{
         "cardinality":"single",
         "displayName":"CMIS Name Property",
         "id":"cmis:name",
         "localName":"cmis:name",
         "queryName":"cmis:name",
         "type":"STRING",
         "value":"Erics Doc"
      {color:#666666}},
   
   "cmis:objectTypeId":{
         "cardinality":"single",
         "displayName":"CMIS Object Type Id Property",
         "id":"cmis:objectTypeId",
         "localName":"cmis:objectTypeId",
         "queryName":"cmis:objectTypeId",
         "type":"ID",
         "value":"cmis:document"
      {color:#666666}}
   {color:#666666}}
}
}

PUT http://localhost:8080/social/rest/documents/john.doe/@self/1?documentId=136

  • Updates a document, identified by documentId.  The PUT body is the same as the POST body above, but with updated fields.

GET http://localhost:8080/social/rest/documents/john.doe/@self/1

...

  • Deletes John Doe's documents with IDs 136 and 137.

Folders API

Notes

  • I used Apache Chemistry's InMemory Repository to build this patch.  It's appropriate because it's lightweight and resets all data on each restart, like Shindig's JSON DB.
  • The CMIS repository is currently hardcoded to point to http://localhost:8081/repository/atom in JsonDbOpensocialService.java.  To change the repository, change this hardcoding (near the bottom of the file).
  • The OpenSocial sample JSON DB is only persisting document & folder IDs; no document & folder metadata are being persisted in the JSON DB.  This is to circumvent caching issues.  If another user changes a document on the CMIS back-end, the OpenSocial metadata will become stale.  By only persisting the document/folder ID, the latest document/folder metadata is retrieved from the server when requested.

...