-
1. Re: Query regarding upgrade of Modeshape from 2.7.0 to 3.7.0
hchiorean Oct 9, 2014 3:37 AM (in response to deepak_a)When you create a node via the REST service, if you don't specify a primary type, it will default to "nt:unstructured". If you want any other type, you must explicitly add it to the JSON request.
See REST Service 3.x - ModeShape 3 - Project Documentation Editor for an example.
-
2. Re: Query regarding upgrade of Modeshape from 2.7.0 to 3.7.0
deepak_a Oct 9, 2014 9:12 AM (in response to hchiorean)Hi,
Thanks for pointing out, however I don't actually create a Node object,
I simply do a 'publish' of the file the jcr via the JsonRestClient API.
i.e.
publish
public Status publish(Workspace workspace, String path, File file)
I don't see an option to set the primary type. Should I be publishing artifacts to jcr in a different manner?
regards
-
3. Re: Query regarding upgrade of Modeshape from 2.7.0 to 3.7.0
hchiorean Oct 9, 2014 9:25 AM (in response to deepak_a)The RestClient was never meant for these kinds of usage. It has extremely limited purposes (mainly used from JBoss Developer Studio via the JBoss Integration Tools stack).
It will become deprecated in 3.8.1 and has been removed altogether from ModeShape 4.
So if you plan on inserting data into ModeShape 3.x using one of the services, I'd suggest you use the REST Service.
-
4. Re: Query regarding upgrade of Modeshape from 2.7.0 to 3.7.0
deepak_a Oct 9, 2014 12:44 PM (in response to hchiorean)Thanks,
Just noticed that
modeshape-web-jcr-rest-client and
modeshape-web-jcr-rest-war
have been removed in Modeshape 4.0
But modeshape-web-jcr-rest is still available.
Any reason for this?
Does this mean - Clients can't access Modeshape via HTTP using a API? starting from 4.0, or can this still be achieved with modeshape-web-jcr-rest?
If yes - can you pls point me to some test classes.
regards,
Deepak.
-
5. Re: Query regarding upgrade of Modeshape from 2.7.0 to 3.7.0
hchiorean Oct 9, 2014 12:50 PM (in response to deepak_a)modeshape-web-jcr-rest is the implementation of the REST service (server). Its documentation is the one from the link I posted previously and you interact with it via HTTP requests containing JSON bodies.
There is no dedicated Java client API atm
Instead, you interact with a ModeShape server using one of the following:
- REST service (RW)
- WebDAV service (RW but limited to files & folders only)
- CMIS (RW)
- JDBC (R)