Hi all,

I've done further work on a CMIS Java API implementation, now committed in a tentative "Apache CloudMist" project.
It's available as a Mercurial repository at:
  http://hg.nuxeo.org/sandbox/apache-cloudmist
You can see the main interface at:
  
http://hg.nuxeo.org/sandbox/apache-cloudmist/file/default/cloudmist-api/src/main/java/org/apache/cloudmist/Connection.java
and browse the rest at:
  
http://hg.nuxeo.org/sandbox/apache-cloudmist/file/default/cloudmist-api/src/main/java/org/apache/cloudmist/

There will be some controversial choices I'm sure, I'd be happy to explain and discuss them. Here are a few important points:

1. This API has to play two roles, the first is to be a simple API for the Java developer, which won't want to bother with low-level protocol concepts and want things to just work. The second role is to be a kind of SPI so that it can be used to implement a generic client layer or a generic server layer. This dichotomy leads to several signatures for a number of the Connection methods for instance.

2. I chose to have two classes representing objects: Entry and CMISObject. Entry is the class that wraps whatever information was returned from a query or a getChildren etc. listing. It contains mainly getters, and hold mostly only the information that was requested. That's the class that the SPI part of the API will use, or that users interested in performance (e.g., in a listing of thousands of objects get only the title and modification date) will use. On the other hand, CMISObject (and its four subclasses Document, Folder, etc.) are "live" objects and will fetch whatever properties are not already there, and they also have setters and more utility methods.

Today and tomorrow I'll be refactoring the current jcr-cmis code to use this abstraction layer in the middle, and work more on the AtomPub bindings part. In parallel, we'll be using this API internally at Nuxeo for other CMIS-related projects (clients, servers).

Please keep in mind that this isn't release code, and the goal is to tweak and polish this API until it is perfect :) A number of things are missing today I'm sure (one of them being thrown exceptions), they are probably just omissions, please don't hesitate to ask.

I'd welcome feedback on this, especially as I'll be submitting this code as a patch for the current jcr-cmis code as soon as the refactored code has equivalent functionality as today.

Thanks,
Florent

--
Florent Guillaume, Head of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Reply via email to