public void clear() { if(map != null) for (T t : map.values()) removeNotification(t); map = null; }
public void clear() { if(map != null) for (T t : map.values()) removeNotification(t); map = null; }
public boolean remove(Object o) { if (o == null) throw new IllegalArgumentException("Null object"); if (o instanceof MappableMetaData) return false; if (map == null) return false; MappableMetaData m = (MappableMetaData) o; String key = m.getKey(); MappableMetaData v = map.get(key); if (m.equals(v)) { T result = map.remove(key); if (result != null) { removeNotification(result); return true; } } return false; }
public boolean remove(Object o) { if (o == null) throw new IllegalArgumentException("Null object"); if (o instanceof MappableMetaData) return false; if (map == null) return false; MappableMetaData m = (MappableMetaData) o; String key = m.getKey(); MappableMetaData v = map.get(key); if (m.equals(v)) { T result = map.remove(key); if (result != null) { removeNotification(result); return true; } } return false; }
@Override protected void removeNotification(SecurityRoleMetaData removed) { super.removeNotification(removed); Set<String> principals = removed.getPrincipals(); if (principals == null) return; for (String principal : principals) { Set<String> roles = principalVersusRolesMap.get(principal); if (roles != null) { roles.remove(removed.getRoleName()); } } } }
@Override protected void removeNotification(SecurityRoleMetaData removed) { super.removeNotification(removed); Set<String> principals = removed.getPrincipals(); if(principals == null) return; for(String principal : principals) { Set<String> roles = principalVersusRolesMap.get(principal); if(roles != null) { roles.remove(removed.getRoleName()); } } } }
@Override protected void removeNotification(SecurityRoleMetaData removed) { super.removeNotification(removed); Set<String> principals = removed.getPrincipals(); if(principals == null) return; for(String principal : principals) { Set<String> roles = principalVersusRolesMap.get(principal); if(roles != null) { roles.remove(removed.getRoleName()); } } } }
public boolean add(T o) { if (o == null) throw new IllegalArgumentException("Null object"); String key = o.getKey(); if (key == null) throw new IllegalArgumentException("No " + keyName); if (map == null) map = new NonNullLinkedHashMap<String, T>(); T result = map.put(key, o); if (result != null) removeNotification(result); addNotification(o); return true; }
public boolean add(T o) { if (o == null) throw new IllegalArgumentException("Null object"); String key = o.getKey(); if (key == null) throw new IllegalArgumentException(keyName + " (/key) is null"); if (map == null) map = new NonNullLinkedHashMap<String, T>(); T result = map.put(key, o); if (result != null) removeNotification(result); addNotification(o); return true; }