// user profile parameters
UserAttributeMap uaMap = idConfig.getUserAttributeMap();
NodeList nlUserAttr = (NodeList) xpath.evaluate(
"users/userAttributeMap/attribute", ndLdap, XPathConstants.NODESET);
for (int i = 0; i < nlUserAttr.getLength(); i++) {
UserAttribute attr = new UserAttribute();
attr.setKey(xpath.evaluate("@key", nlUserAttr.item(i)));
attr.setLdapName(xpath.evaluate("@ldapName", nlUserAttr.item(i)));
// TODO: need to do a better check to filter out badly defined
// parameters
boolean bIsLdap = (idConfig.getAdapterClassName().indexOf("Ldap") != -1);
if (bIsLdap && (attr.getLdapName().length() > 0)) {
uaMap.add(attr);
}
}
ldapConfig.getUserProperties().getUserProfileMapping().configureFromUserAttributes(uaMap);