-
Type: User story
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Java Client
-
Story Points:8
Current DocumentService should be deprecated, and new wrapping should be made, more close to the Rest API. Inspiration should be taken from the javascript client for the semantic, since we want all the clients to have the same "spirit" (beside the callback stuff)
javascript client example
CRUD
nuxeo.repo('default').doc(uuid).fetch({done: cb, failed : cb}) (GET) nuxeo.repo('default').doc(uuid).create(doc, {done: cb, failed : cb}) (POST) nuxeo.repo('default').doc(uuid).update(doc, {done: cb, failed : cb}) (PUT) nuxeo.repo('default').doc(uuid).delete({done: cb, failed : cb}) (DELETE)
Adapters
nuxeo.repo('default').doc(uuid).children({page : 1, pagesize : 10, done: cb, failed : cb}) nuxeo.repo('default').doc(uuid).search({query:query page : 1, pagesize : 10, done: cb, failed : cb}) nuxeo.repo('default').doc(uuid).pageProvider({provider:provider page : 1, pagesize : 10, done: cb, failed : cb})
Business Adapters
nuxeo.repo('default').doc(uuid).fetch({adapter:adapterName, done: cb, failed : cb} ) (GET) nuxeo.repo('default').doc(uuid).create(doc, {adapter:adapterName, done: cb, failed : cb}) (POST) nuxeo.repo('default').doc(uuid).update(doc, {adapter:adapterName, done: cb, failed : cb}) (PUT)
Acceptance
- a call to each method is done in a sample Main java class that uses the automation client library and that prints the documents when some are fetched (if the method updates , just call the get right after for showing the modification)
- documentation is updated on the 5.7 java client page. http://doc.nuxeo.com/display/NXDOC/Java+Automation+Client