1 9 package org.jboss.portal.server.plugins.preferences; 10 11 import java.util.HashMap ; 12 import java.util.Map ; 13 14 import org.jboss.portal.common.FQN; 15 16 20 public class AbstractPreferenceStore implements PreferenceStore 21 { 22 23 private Map sets; 24 25 public AbstractPreferenceStore() 26 { 27 this.sets = new HashMap (); 28 } 29 30 public PreferenceSet get(FQN fqn) 31 { 32 PreferenceSet set = (PreferenceSet)sets.get(fqn); 33 if (set == null) 34 { 35 set = newPreferenceSet(); 36 sets.put(fqn, set); 37 } 38 return set; 39 } 40 41 public PreferenceSet newPreferenceSet() 42 { 43 return new AbstractPreferenceSet(); 44 } 45 } 46 | Popular Tags |