
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
24/Jul/08
|
|
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);
}
}
|
|
Description
|
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);
}
}
|
Show » |
|