private boolean processProperties(Profile target, Map<String, Object> propsMap, String strategy) {
boolean isProfileOrPersonaUpdated = false;
for (String prop : propsMap.keySet()) {
PropertyType propType = null;
if (prop.startsWith("properties.") || prop.startsWith("systemProperties.")) {
propType = profileService.getPropertyType(prop.substring(prop.indexOf('.') + 1));
} else {
propType = profileService.getPropertyType(prop);
if(prop.equals("segments")) {
propsMap.put(prop, new HashSet<String>((ArrayList<String>)propsMap.get(prop)));
}
}
if (propType != null) {
isProfileOrPersonaUpdated |= PropertyHelper.setProperty(target, prop, PropertyHelper.getValueByTypeId(propsMap.get(prop), propType.getValueTypeId()), "alwaysSet");
} else {
isProfileOrPersonaUpdated |= PropertyHelper.setProperty(target, prop, propsMap.get(prop), strategy);
}
}
return isProfileOrPersonaUpdated;
}