Hi,
   I need to access the list of files in the CMS storage. 

I am trying the following in my portlet code

....

MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
CMS CMSService = (CMS)MBeanProxy.get(CMS.class, new ObjectName 
                                  ("portal:service=CMS"), mbeanServer);


Command listCMD = CMSService.getCommandFactory
                                  ().createFolderGetListCommand(sPath);

Folder mainFolder = (Folder)CMSService.execute(listCMD);

List folders = mainFolder.getFolders();
List files = mainFolder.getFiles();

But i am getting a null pointer exception at 
CMSService.getCommandFactory().createFolderGetListCommand(sPath)

..... 

Can someone please verify if this is the correct way to get a list of files and 
folders in the CMS repository?

thanks
Robin


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132204#4132204

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132204
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to