KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > metadata > PreferencesMetaData


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.metadata;
10
11 import java.util.HashMap JavaDoc;
12 import java.util.Iterator JavaDoc;
13 import java.util.Map JavaDoc;
14
15 import org.jboss.portal.common.plugin.PluginMetaData;
16
17 /**
18  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
19  * @version $Revision: 1.2 $
20  */

21 public class PreferencesMetaData implements PluginMetaData
22 {
23
24    private Map JavaDoc map;
25
26    public PreferencesMetaData()
27    {
28       map = new HashMap JavaDoc();
29    }
30
31    public void addPreference(PreferenceMetaData preference)
32    {
33       map.put(preference.getName(), preference);
34    }
35
36    public Iterator JavaDoc iterator()
37    {
38       return map.values().iterator();
39    }
40
41
42    public PreferenceMetaData getPreference(String JavaDoc key)
43    {
44       return (PreferenceMetaData)map.get(key);
45    }
46 }
47
Popular Tags