cancel
Showing results for 
Search instead for 
Did you mean: 

How to add/update content to WCM with Java Backed Webscripts

himanshu
Champ in-the-making
Champ in-the-making
Hi,

I am trying to write a Java backed web-script that will allow me to write some content (lets say an xml file) to my web project or more specifically to a particular user's sandbox and from there it can go the normal route of approvals.

I want to be able to pass the contents of the file to the web-script which will then create a node in the web project with the name and content passed to the web-script.
Its not only about creating new content in alfresco but also about updating the already existing content

Is this achievable? If yes, which i think it is, how should i go about doing this?
Thanks in advance.

Regards
Himanshu
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Yes this is achievable.

There are already web script interfaces which are how Share and Studio are working.

Streams are a little bit fiddly, especially if content is going to be large, so alfresco tends to do it in two calls, one to create the node and the other to stream in the new content.    The content streaming APIs are already present and working.

Alfresco 3D will have new easier to use APIs (Java, JavaScipt, WebScript) for WCM Assets.    It will be available on HEAD soon.

himanshu
Champ in-the-making
Champ in-the-making
Hey,

Thanks mrogers. I was able to get this thing finally working.

I have tried to put down my learnings on this topic in the form of a blog over here
http://blog.intelligrape.com/?p=26.

Your feedback and  suggestions are welcome.

Regards
~~Himanshu Seth~~

http://www.IntelliGrape.com