Author: thomas.heute(a)jboss.com
Date: 2010-09-21 03:57:03 -0400 (Tue, 21 Sep 2010)
New Revision: 4268
Modified:
epp/portal/branches/EPP_5_1_Branch/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
Log:
JBEPP-470: Unknown error when adding wsrp portlet to category
Modified:
epp/portal/branches/EPP_5_1_Branch/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-09-21
07:42:44 UTC (rev 4267)
+++
epp/portal/branches/EPP_5_1_Branch/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-09-21
07:57:03 UTC (rev 4268)
@@ -253,7 +253,17 @@
{
throw new Exception("Invalid Application Id: [" + id +
"]");
}
- return getApplication(fragments[0], fragments[1]);
+
+ String category = fragments[0];
+ String applicationName = fragments[1];
+
+ // If the application name contained a beginning slash (which can happen with
WSRP), we need to hack around the
+ // hardcoding of portlet id expectations >_<
+ if(fragments.length == 3 && applicationName.length() == 0)
+ {
+ applicationName = "/" + fragments[2];
+ }
+ return getApplication(category, applicationName);
}
public Application getApplication(final String category, final String name) throws
Exception