Well, you can use the "upload archive" feature of the CMS admin portlet. All you have to do is to create a zip file with static content (images,html, pdf, etc) and upload it to a given location within the CMS content tree.
That is a manual process. I have few 100 folders and i donot want to do these steps manually for 100 different folders under CMS.
Is there any alternative..?
You can programmatically use the CMS Export command via the CMS JMX Service. It will explode a Zip archive into the CMS.
Take a look at the source code for the CMSAdminPortlet that is shipped with the Portal for example of how to do this.
Thanks for the quick response.
I did dig through the code and see it tightly coupled with portlet. But if i need to call the same service via Java Command prompt (like a helloworl program). Is there any place i can go to.
I am having problem with using the CMS.
Class clazz = Class.forName("org.jboss.portal.cms.management.CMSImpl"); CMS cms =(CMS) clazz.newInstance(); org.jboss.portal.cms.Command listCMD = cms.getCommandFactory().createFolderGetListCommand("/");
Appreciate any help in this regard.
I can think in two ways in order to accomplish wat you want:
1) Elegant way:
Write a small web app that exposes the CMS API as set of WebServices. You would then write a client app that would call those services.
2) Hacky way
Use HTMLUnit, Selenium or some other web testing framework to automate the sequence of http requests required to submit an archive.
Since I'm lazy, I'd go for (2)...
Any other suggestion/help?