[jboss-cvs] JBossAS SVN: r83396 - trunk/system/src/main/org/jboss/system/server/profileservice/repository.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 24 07:01:20 EST 2009


Author: emuckenhuber
Date: 2009-01-24 07:01:20 -0500 (Sat, 24 Jan 2009)
New Revision: 83396

Modified:
   trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileService.java
Log:
unregister a profile based on the Profilekey

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileService.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileService.java	2009-01-24 11:53:14 UTC (rev 83395)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractProfileService.java	2009-01-24 12:01:20 UTC (rev 83396)
@@ -347,19 +347,15 @@
          throw new RuntimeException(t);
       }
    }
-
+   
    /**
     * Unregister a profile.
     * 
-    * @param profile
+    * @param key the profile key
     * @throws NoSuchProfileException if the profile is not registered.
     */
-   public void unregisterProfile(Profile profile) throws NoSuchProfileException
+   public void unregisterProfile(ProfileKey key) throws NoSuchProfileException
    {
-      if(profile == null)
-         throw new IllegalArgumentException("Null profile.");
-      
-      ProfileKey key = profile.getKey();
       if(key == null)
          throw new IllegalStateException("Null profile key.");
       
@@ -379,6 +375,20 @@
    }
    
    /**
+    * Delegates to unregisterProfile(ProfileKey)
+    * 
+    * @param profile
+    * @throws NoSuchProfileException if the profile is not registered.
+    */
+   public void unregisterProfile(Profile profile) throws NoSuchProfileException
+   {
+      if(profile == null)
+         throw new IllegalArgumentException("Null profile.");
+      
+      unregisterProfile(profile.getKey());
+   }
+   
+   /**
     * Validate the context and create the error messages if needed.
     * 
     * TODO this only checks for NOT FOUND dependencies. 




More information about the jboss-cvs-commits mailing list