[gatein-commits] gatein SVN: r7000 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Aug 5 14:18:34 EDT 2011


Author: chris.laprun at 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



More information about the gatein-commits mailing list