1 7 package org.jboss.security.auth.login; 8 9 import java.util.Collections ; 10 import java.util.Map ; 11 import java.util.HashMap ; 12 import java.util.ArrayList ; 13 import java.util.Set ; 14 15 21 public class PolicyConfig 22 { 23 Map config = Collections.synchronizedMap(new HashMap ()); 24 25 public void add(AuthenticationInfo authInfo) 26 { 27 config.put(authInfo.getName(), authInfo); 28 } 29 public AuthenticationInfo get(String name) 30 { 31 AuthenticationInfo info = (AuthenticationInfo) config.get(name); 32 return info; 33 } 34 public AuthenticationInfo remove(String name) 35 { 36 AuthenticationInfo info = (AuthenticationInfo) config.remove(name); 37 return info; 38 } 39 public void clear() 40 { 41 config.clear(); 42 } 43 public Set getConfigNames() 44 { 45 return config.keySet(); 46 } 47 public int size() 48 { 49 return config.size(); 50 } 51 public boolean containsKey(String name) 52 { 53 return config.containsKey(name); 54 } 55 public void copy(PolicyConfig pc) 56 { 57 config.putAll(pc.config); 58 } 59 } 60 | Popular Tags |