1 23 24 package com.sun.enterprise.connectors.authentication; 25 26 import java.util.HashMap ; 27 28 31 public class RuntimeSecurityMap { 32 33 private HashMap userMap; 34 35 private HashMap groupMap; 36 37 public RuntimeSecurityMap() { 38 this.userMap = new HashMap (); 39 this.groupMap = new HashMap (); 40 } 41 42 public RuntimeSecurityMap(HashMap userMap, HashMap groupMap) { 43 this.userMap = (HashMap ) userMap.clone(); 44 this.groupMap = (HashMap ) groupMap.clone(); 45 } 46 47 public boolean equals(RuntimeSecurityMap map) { 48 if (!(map.userMap.equals(this.userMap))) 49 return false; 50 else if (!(map.groupMap.equals(this.groupMap))) 51 return false; 52 else 53 return true; 54 } 55 56 public String toString() { 57 StringBuffer sb = new StringBuffer (); 58 return sb.toString(); 60 } 61 62 public boolean isEmpty() { 63 if ((this.userMap.size() == 0) && (this.groupMap.size() == 0)) 64 return true; 65 else 66 return false; 67 } 68 69 public HashMap getUserMap() { 70 return (HashMap ) ((this.userMap).clone()); 71 } 72 73 public HashMap getGroupMap() { 74 return (HashMap ) ((this.groupMap).clone()); 75 } 76 77 } 78 | Popular Tags |