Author: chris.laprun(a)jboss.com
Date: 2011-08-05 14:18:34 -0400 (Fri, 05 Aug 2011)
New Revision: 7000
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
Log:
- GTNPORTAL-1988: added implementation for deleteCategory method.
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-05
18:03:16 UTC (rev 6999)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-05
18:18:34 UTC (rev 7000)
@@ -64,6 +64,25 @@
return getOrCreateCategory(name, false);
}
+ public void deleteCategory(String name)
+ {
+ try
+ {
+ final ApplicationCategory category = new ApplicationCategory();
+ category.setName(name);
+ gateIn.begin();
+ gateIn.getRegistryService().remove(category);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ gateIn.end();
+ }
+ }
+
public IterableCollection<String> getCategoryNames()
{
try
Show replies by date