1 22 package org.jboss.test.xml.mbeanserver; 23 24 import java.util.Map ; 25 import java.util.Collections ; 26 import java.util.HashMap ; 27 import java.util.Set ; 28 29 36 public class PolicyConfig 37 { 38 Map config = Collections.synchronizedMap(new HashMap ()); 39 40 public PolicyConfig() 41 { 42 } 44 45 public void add(AuthenticationInfo authInfo) 46 { 47 config.put(authInfo.getName(), authInfo); 49 } 50 public AuthenticationInfo get(String name) 51 { 52 AuthenticationInfo info = (AuthenticationInfo) config.get(name); 53 return info; 54 } 55 public AuthenticationInfo remove(String name) 56 { 57 AuthenticationInfo info = (AuthenticationInfo) config.remove(name); 58 return info; 59 } 60 public void clear() 61 { 62 config.clear(); 63 } 64 public Set getConfigNames() 65 { 66 return config.keySet(); 67 } 68 public int size() 69 { 70 return config.size(); 71 } 72 public boolean containsKey(String name) 73 { 74 return config.containsKey(name); 75 } 76 public void copy(PolicyConfig pc) 77 { 78 config.putAll(pc.config); 79 } 80 } 81 | Popular Tags |