final List<AbstractAttrValue> values =
SchemaMappingUtil.getIntValues(mapping, attributables, password, vAttrsToBeRemoved, vAttrsToBeUpdated);
AbstractSchema schema = null;
final SchemaType schemaType;
switch (mapping.getIntMappingType()) {
case UserSchema:
case RoleSchema:
case MembershipSchema:
schema = schemaDAO.find(mapping.getIntAttrName(),
SchemaMappingUtil.getIntMappingTypeClass(mapping.getIntMappingType()));
schemaType = schema == null ? SchemaType.String : schema.getType();
break;
case UserVirtualSchema:
LOG.debug("Expire entry cache {}-{}", user.getId(), mapping.getIntAttrName());
virAttrCache.expire(AttributableType.USER, user.getId(), mapping.getIntAttrName());
// no break ....
default:
schemaType = SchemaType.String;
}
final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);
LOG.debug("Define mapping for: "
+ "\n* ExtAttrName " + extAttrName
+ "\n* is accountId " + mapping.isAccountid()
+ "\n* is password " + (mapping.isPassword() || mapping.getIntMappingType() == IntMappingType.Password)
+ "\n* mandatory condition " + mapping.getMandatoryCondition()
+ "\n* Schema " + mapping.getIntAttrName()
+ "\n* IntMappingType " + mapping.getIntMappingType().toString()
+ "\n* ClassType " + schemaType.getClassName()
+ "\n* Values " + values);
List<Object> objValues = new ArrayList<Object>();
for (AbstractAttrValue value : values) {
if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
objValues.add(value.getValue());
} else {
objValues.add(value.getValueAsString());
}
}