\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
+import org.tizen.common.util.Assert;\r
import org.tizen.common.util.ParsingUtil;\r
\r
/**\r
/**\r
* Return preference expression\r
* \r
- * @param name namespace name\r
* @param key preference key\r
* \r
* @return preference expression\r
\r
return null;\r
}\r
+ \r
+ /**\r
+ * Return preference value by namespace\r
+ * @param namespace\r
+ * @param key\r
+ * @return\r
+ */\r
+ public static String get(String namespace, String key) {\r
+ Assert.notNull(namespace);\r
+ logger.info( "Namespace :{}, Key :{}", namespace,key );\r
+ PreferenceProvider provider = name2provider.get(namespace);\r
+ if( null != provider) {\r
+ final String exp = provider.get( key );\r
+ logger.debug( "Provider :{}, Value :{}", provider, exp );\r
+ return exp;\r
+ }\r
+ return null;\r
+ }\r
\r
/* List */\r
/**\r
)\r
{\r
final HashSet<String> keys = new HashSet<String>();\r
- for ( final PreferenceProvider provider : providers )\r
- {\r
- keys.addAll( provider.keys() );\r
+ //fixed by Harry Hyeongseok Heo \r
+ //Fixed logic as JavaDoc says.\r
+ PreferenceProvider preferenceProvider = name2provider.get(name);\r
+ if( null != preferenceProvider) {\r
+ keys.addAll( preferenceProvider.keys() );\r
}\r
return Collections.unmodifiableCollection( keys );\r
\r
\r
}\r
\r
+ \r
+\r
}\r