public Set<String> getAttributeNames(String category) { HashSet<String> set = new HashSet<String>(saMap.size()); for (SecurityAttribute sa : saMap.values()) { if (sa.getCategory().equals(category)) { set.add(sa.getName()); } } return Collections.unmodifiableSet(set); }
public Map<String, SecurityAttribute> getAttributeMap(String category) { HashMap<String, SecurityAttribute> map = new HashMap<String,SecurityAttribute>(saMap.size()); for (SecurityAttribute sa : saMap.values()) { if (sa.getCategory().equals(category)) { map.put(sa.getName(), sa); } } return Collections.unmodifiableMap(map); }
public Map<String, String> getInfoMap() { HashMap<String, String> map = new HashMap<String,String>(saMap.size()); for (SecurityAttribute sa : saMap.values()) { if (sa.getCategory().equals(SecurityAttributeType.INFO_CATEGORY)) { map.put(sa.getName(), sa.getStringValue()); } } return Collections.unmodifiableMap(map); }
public void setUserInfo(Map<String, SecurityAttribute> sa) { this.userInfo = new JSUserAttributes(); for (Map.Entry<String, SecurityAttribute> e : sa.entrySet()) { SecurityAttribute attrib = e.getValue(); JSNVPElement element = new JSNVPElement(attrib.getName(), attrib.getStringValue()); this.userInfo.add(element); } }
public void setSecurityAttributes(Map<String, SecurityAttribute> sa) { this.attributes = new JSSecurityAttributes(); for (Map.Entry<String, SecurityAttribute> e : sa.entrySet()) { SecurityAttribute attrib = e.getValue(); JSNVPElement element = new JSNVPElement(attrib.getName(), attrib.getStringValue()); this.attributes.add(element); } }
public void setSecurityAttributes(Map<String, SecurityAttribute> sa) { for (Map.Entry<String, SecurityAttribute> e : sa.entrySet()) { SecurityAttribute attrib = e.getValue(); JSNVPElement element = new JSNVPElement(attrib.getName(), attrib.getStringValue()); element.setReadOnly(attrib.isReadOnly()); element.setAttribute("datatype",attrib.getDataType().name()); element.setAttribute("registered",Boolean.toString(attrib.isRegistered())); element.setAttribute("required",Boolean.toString(attrib.isRequired())); element.setAttribute("category",attrib.getCategory()); secAttrs.add(element); } }
if (principalAttr != null) feedbackLogger.debug("Removing attribute {} for principal {}", principalAttr.getName(), principal.getName()); principalAttrs.removeAttribute(principalAttr.getName()); updated = true; new String[] {principalAttr.getName(), principal.getName(), attr.getValue()}); new String[] {principalAttr.getName(), principal.getName(), (principalAttr.getStringValue()), attr.getValue()});