/** * Return the list of all possible attribute names. This implementation queries the database to * provide a list of all mapped attribute names, plus all attribute keys currently in-use in the * database. * * @return Set */ @Override public Set<String> getPossibleUserAttributeNames() { final Set<String> names = new HashSet<String>(); names.addAll(this.possibleUserAttributes); names.addAll(localAccountDao.getCurrentAttributeNames()); names.add(displayNameAttribute); return names; }
/** * Return the list of all possible attribute names. This implementation queries the database to * provide a list of all mapped attribute names, plus all attribute keys currently in-use in the * database. * * @return Set */ @Override public Set<String> getPossibleUserAttributeNames() { final Set<String> names = new HashSet<String>(); names.addAll(this.possibleUserAttributes); names.addAll(localAccountDao.getCurrentAttributeNames()); names.add(displayNameAttribute); return names; }
public PersonForm getNewAccountForm() { PersonForm form = new PersonForm(accountEditAttributes); Set<String> attributeNames = accountDao.getCurrentAttributeNames(); for (String name : attributeNames) { form.getAttributes() .put(name, new StringListAttribute(Collections.<String>emptyList())); } return form; }
public PersonForm getForm(String username) { ILocalAccountPerson person = accountDao.getPerson(username); PersonForm form = new PersonForm(accountEditAttributes); form.setUsername(person.getName()); form.setId(person.getId()); Set<String> attributeNames = accountDao.getCurrentAttributeNames(); for (String name : attributeNames) { List<String> values = new ArrayList<String>(); List<Object> attrValues = person.getAttributeValues(name); if (attrValues != null) { for (Object value : person.getAttributeValues(name)) { values.add((String) value); } } form.getAttributes().put(name, new StringListAttribute(values)); } return form; }