History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: PORTAL-1542
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Tran The Trong
Reporter: Massimo gai
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
exo-portal

Integration problem between Portal and Portlet Container- wsrp enabled

Created: 16/Apr/08 06:03 AM   Updated: 24/Jul/08 06:43 AM
Component/s: component.applicationregistry
Affects Version/s: 2.5
Fix Version/s: 2.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Java Source File ApplicationRegistryServiceImpl.java (21 kb)

Environment: all

Resolution Date: 24/Jul/08


 Description  « Hide
Hello,
About two weeks ago I wrote to the "community" to report a problem of integration between the "portal 2.0" and the Portlet-Container with WSRP. In my tests I could not bring up the remote portlets and the WSRP administration portlet (WSRPAdmin).I examined the code and saw that the" ApplicationRegistryService" reads the list of portlets indirectly by the" PortletApplicationHolder ".
In "PortletApplicationHolder" are not recorded WSRP portlets, then I correct code in "ApplicationRegistryService" to read directly from "PortletContainer".
I have done some tests with remote portlets and appears to be working properly, there's only one small flaw in the category of remote portlets.

There seems correct?
Attached, you will find the java code.
Thanks

Best Regards
Massimo Gai


public class ApplicationRegistryServiceImpl
...
...
public void importJSR168Portlets() Exception
  {
Map <String,PortletData> map=pcs_.getAllPortletMetaData();
Set<String> portletCategoriesSet=map.keySet();
Iterator<String> portletCategoriesIterator=portletCategoriesSet.iterator();



while(portletCategoriesIterator.hasNext()) {
String portletID=portletCategoriesIterator.next();
int index=portletID.indexOf("/");
String categoryName=portletID.substring(0,index);



PortletData portletData = (PortletData) map.get(portletID);
ApplicationCategory category = null;

String portletName=portletData.getPortletName();
System.out.println("Portlet ID="+portletID);

if (portletName.contains("/")){
int index2=portletName.indexOf("/");
String categoryName2=portletID.substring(0,index2);
portletName=portletName.substring(index2+1, portletName.length());
}



System.out.println("Portlet name="+portletName);
System.out.println("Portlet Category Name="+categoryName);

category = getApplicationCategory(categoryName);
      if(category == null) {
        category = new ApplicationCategory();
        category.setName(categoryName);
        category.setDisplayName(categoryName);
        save(category);
      }
      Application app = getApplication(categoryName + "/" + portletName) ;
      if(app != null) continue ;
      app = new Application();
      app.setDisplayName(portletName) ;
      app.setApplicationName(portletName);
      app.setApplicationGroup(categoryName);
      app.setCategoryName(categoryName);
      app.setApplicationType(org.exoplatform.web.application.Application.EXO_PORTLET_TYPE);
      app.setDescription("A portlet application");
      app.setDisplayName(portletName);
      save(category, app);
}
  }



 All   Comments   Work Log   Change History      Sort Order:
Massimo gai - [16/Apr/08 06:05 AM ]
Java source code for portlet container integration