-
1. Re: Reading/Updating JBoss CMS Files via Java Batch Program
psevestre Oct 28, 2008 7:53 AM (in response to user.java)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.
-
2. Re: Reading/Updating JBoss CMS Files via Java Batch Program
user.java Oct 28, 2008 10:39 PM (in response to user.java)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..? -
3. Re: Reading/Updating JBoss CMS Files via Java Batch Program
soshah Oct 29, 2008 8:13 AM (in response to user.java)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
Sohil -
4. Re: Reading/Updating JBoss CMS Files via Java Batch Program
user.java Oct 29, 2008 9:13 PM (in response to user.java)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. -
5. Re: Reading/Updating JBoss CMS Files via Java Batch Program
psevestre Oct 30, 2008 8:43 AM (in response to user.java)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)... -
6. Re: Reading/Updating JBoss CMS Files via Java Batch Program
user.java Oct 31, 2008 3:46 PM (in response to user.java)Sohail
Any other suggestion/help?
Thanks,