Author: julien_viet
Date: 2009-11-10 06:16:40 -0500 (Tue, 10 Nov 2009)
New Revision: 548
Modified:
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java
Log:
simplify
Modified:
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java
===================================================================
---
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java 2009-11-10
11:09:05 UTC (rev 547)
+++
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java 2009-11-10
11:16:40 UTC (rev 548)
@@ -266,19 +266,7 @@
if (contentDef == null)
{
String contentId = application.getContentId();
- ContentType<?> contentType;
- if (ApplicationType.PORTLET.equals(application.getType()))
- {
- contentType = Preferences.CONTENT_TYPE;
- }
- else if (ApplicationType.GADGET.equals(application.getType()))
- {
- contentType = org.exoplatform.portal.pom.spi.gadget.Gadget.CONTENT_TYPE;
- }
- else
- {
- throw new UnsupportedOperationException("Unnsupported type " +
application.getType());
- }
+ ContentType<?> contentType = application.getType().getContentType();
String definitionName = application.getDisplayName().replace(' ',
'_');
contentDef = categoryDef.createContent(definitionName, contentType, contentId);
}
Show replies by date