@Override public void populateSwapRequest( ExternalContext externalContext, AttributeSwapRequest attributeSwapRequest) { final Principal currentUser = externalContext.getCurrentUser(); final String uid = currentUser.getName(); final IPersonAttributes person = this.portalRootPersonAttributeDao.getPerson(uid); final Map<String, Attribute> currentAttributes = attributeSwapRequest.getCurrentAttributes(); currentAttributes.clear(); final Set<String> swappableAttributes = this.getSwappableAttributes(externalContext); for (final String attribute : swappableAttributes) { final Object value = person.getAttributeValue(attribute); if (value != null) { currentAttributes.put(attribute, new Attribute(String.valueOf(value))); } } }