Author: chris.laprun(a)jboss.com
Date: 2011-08-03 11:16:41 -0400 (Wed, 03 Aug 2011)
New Revision: 6989
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/CategoryImpl.java
Log:
- Save category when description is updated.
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/CategoryImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/CategoryImpl.java 2011-08-03
04:33:23 UTC (rev 6988)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/CategoryImpl.java 2011-08-03
15:16:41 UTC (rev 6989)
@@ -82,7 +82,7 @@
Class<Content> contentClass = getContentClassFor(type);
if (Gadget.class.isAssignableFrom(contentClass))
{
- //TODO: for a gadget, it should probably be using application.getID instead of
getContentId
+ //TODO: for a gadget, it should probably be using application.getID instead of
getContentId
return gateIn.gadgetId(application.getContentId());
}
else if (org.gatein.api.content.WSRP.class.isAssignableFrom(contentClass))
@@ -205,6 +205,19 @@
public void setDescription(String description)
{
category.setDescription(description);
+ try
+ {
+ gateIn.begin();
+ gateIn.getRegistryService().save(category);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ gateIn.end();
+ }
}
public void removeContent(String managedContentName)
Show replies by date