Added method previously available for easy access of values in the default bundle with the default locale.

git-svn-id: https://svn.apache.org/repos/asf/turbine/fulcrum/trunk/localization@1089882 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/java/org/apache/fulcrum/localization/SimpleLocalizationService.java b/src/java/org/apache/fulcrum/localization/SimpleLocalizationService.java
index a894ecf..069a2a7 100644
--- a/src/java/org/apache/fulcrum/localization/SimpleLocalizationService.java
+++ b/src/java/org/apache/fulcrum/localization/SimpleLocalizationService.java
@@ -119,6 +119,14 @@
      * @return Localized text.
      */
     String getString(String bundleName, Locale locale, String key) throws MissingResourceException;
+    
+    /**
+     * Returns the value for the key in the default bundle and the default locale.
+     * 
+     * @param key The key to retrieve the value for.
+     * @return The value mapped to the key.
+     */
+    String getString(String key);
 
     /**
      * This method sets the name of the defaultBundle.
diff --git a/src/java/org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java b/src/java/org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java
index 18609f6..decfa7f 100644
--- a/src/java/org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java
+++ b/src/java/org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java
@@ -495,6 +495,17 @@
     }
     
     /**
+     * Returns the value for the key in the default bundle and the default locale.
+     * 
+     * @param key The key to retrieve the value for.
+     * @return The value mapped to the key.
+     */
+    public String getString(String key) {
+    	return getString(getDefaultBundleName(), getDefaultLocale(), key);
+    }
+    
+    
+    /**
      * Gets localized text from a bundle if it's there.  Otherwise,
      * returns <code>null</code> (ignoring a possible
      * <code>MissingResourceException</code>).
diff --git a/src/test/org/apache/fulcrum/localization/LocalizationTest.java b/src/test/org/apache/fulcrum/localization/LocalizationTest.java
index ebf600a..34ee496 100644
--- a/src/test/org/apache/fulcrum/localization/LocalizationTest.java
+++ b/src/test/org/apache/fulcrum/localization/LocalizationTest.java
@@ -95,6 +95,25 @@
             // Asked for key from default bundle which does not exist,
         }
     }
+    
+    
+    public void testGetString() {
+    	String key1 = "key1";
+    	String value1 = "value1";
+    	String key2 = "key2";
+    	String value2 = "value2";
+    	String key3 = "key3";
+    	String value3 = "value3";
+    	String key4 = "key4";
+    	String value4 = "value4";
+    	
+    	assertEquals(value1, ls.getString(key1));
+    	assertEquals(value2, ls.getString(key2));
+    	assertEquals(value3, ls.getString(key3));
+    	assertEquals(value4, ls.getString(key4));
+    	
+    }
+    
     /**
      * Putting this in a seperate testcase because it fails..  Why?  I don't know.  I have never
      * used localization, so I leave it to brains better then mine. -dep