List<PropertyDefinition> definitions = configurationDefinition.getPropertiesInGroup(groupName);
// if this is a single map (not list of maps), then unwind
if (definitions.size() == 1 && definitions.get(0) instanceof PropertyDefinitionMap) {
PropertyDefinitionMap definitionMap = (PropertyDefinitionMap) definitions.get(0);
String mapName = definitionMap.getName();
boolean isAddEnabled = mapName.endsWith("+");
if (groupEnabled) {
if (isAddEnabled) {
// check if this exists already
Operation testOp = new ReadResource(address1);
Result res = connection.execute(testOp);
if (!res.isSuccess()) {
// and try to add it
Operation add = new Operation("add", address1);
res = connection.execute(add);
if (!res.isSuccess()) {
// Not much we can do here when the add fails
log.error("Adding of node " + address1 + " failed");
}
}
}
definitions = new ArrayList<PropertyDefinition>(definitionMap.getOrderedPropertyDefinitions());
PropertyMap map = conf.getMap(mapName);
for (PropertyDefinition def : definitions) {
createWriteAttribute(cop, address1, def, map.get(def.getName()));
}
} else {