path = path.substring(0, path.indexOf('='));
}
createAddress.add(path, resourceName);
Operation op = new Operation("add", createAddress);
for (Property prop : report.getResourceConfiguration().getProperties()) {
SimpleEntry<String, ?> entry = null;
boolean isEntryEligible = true;
if (prop instanceof PropertySimple) {
PropertySimple propertySimple = (PropertySimple) prop;
PropertyDefinitionSimple propertyDefinition = this.configurationDefinition
.getPropertyDefinitionSimple(propertySimple.getName());
if (propertyDefinition == null
|| (!propertyDefinition.isRequired() && propertySimple.getStringValue() == null)) {
isEntryEligible = false;
} else {
entry = preparePropertySimple(propertySimple, propertyDefinition);
}
} else if (prop instanceof PropertyList) {
PropertyList propertyList = (PropertyList) prop;
PropertyDefinitionList propertyDefinition = this.configurationDefinition
.getPropertyDefinitionList(propertyList.getName());
if (!propertyDefinition.isRequired() && propertyList.getList().size() == 0) {
isEntryEligible = false;
} else {
entry = preparePropertyList(propertyList, propertyDefinition);
}
} else if (prop instanceof PropertyMap) {
PropertyMap propertyMap = (PropertyMap) prop;
PropertyDefinitionMap propertyDefinition = this.configurationDefinition
.getPropertyDefinitionMap(propertyMap.getName());
if (!propertyDefinition.isRequired() && propertyMap.getMap().size() == 0) {
isEntryEligible = false;
} else {
entry = preparePropertyMap(propertyMap, propertyDefinition);
isEntryEligible = !((Map<String, Object>) entry.getValue()).isEmpty();
}
}
if (isEntryEligible) {
op.addAdditionalProperty(entry.getKey(), entry.getValue());
}
}
Result result = this.connection.execute(op);
if (result.isSuccess()) {