[jboss-cvs] JBossAS SVN: r69706 - trunk/system/src/main/org/jboss/profileservice/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 7 16:09:36 EST 2008


Author: scott.stark at jboss.org
Date: 2008-02-07 16:09:36 -0500 (Thu, 07 Feb 2008)
New Revision: 69706

Modified:
   trunk/system/src/main/org/jboss/profileservice/spi/ProfileKey.java
Log:
Add an isDefaultKey method

Modified: trunk/system/src/main/org/jboss/profileservice/spi/ProfileKey.java
===================================================================
--- trunk/system/src/main/org/jboss/profileservice/spi/ProfileKey.java	2008-02-07 19:46:22 UTC (rev 69705)
+++ trunk/system/src/main/org/jboss/profileservice/spi/ProfileKey.java	2008-02-07 21:09:36 UTC (rev 69706)
@@ -80,6 +80,18 @@
    }
 
    /**
+    * Is this a default key. A default key is one where all
+    * fields are {@link #DEFAULT}
+    * @return true if default, false otherwise.
+    */
+   public boolean isDefaultKey()
+   {
+      return DEFAULT.equalsIgnoreCase(domain)
+         && DEFAULT.equalsIgnoreCase(server)
+         && DEFAULT.equalsIgnoreCase(name);
+   }
+
+   /**
     * Compare based on domain, then server and finally name.
     * 
     * @param o - the ProfileKey instance to compare to




More information about the jboss-cvs-commits mailing list