@Override public Map<String, String> getAttributes() { Map<String, String> result = new HashMap<String, String>(); for (UserAttributeEntity attr : user.getAttributes()) { result.put(attr.getName(), attr.getValue()); } return result; }
@Override public Map<String, List<String>> getAttributes() { MultivaluedHashMap<String, String> result = new MultivaluedHashMap<>(); for (UserAttributeEntity attr : user.getAttributes()) { result.add(attr.getName(), attr.getValue()); } return result; }
@Override public String getAttribute(String name) { for (UserAttributeEntity attr : user.getAttributes()) { if (attr.getName().equals(name)) { return attr.getValue(); } } return null; }
@Override public List<String> getAttribute(String name) { List<String> result = new ArrayList<>(); for (UserAttributeEntity attr : user.getAttributes()) { if (attr.getName().equals(name)) { result.add(attr.getValue()); } } return result; }