for (String key:sourceInfo.getProperties().keySet()) {
ManagedProperty mp = propertyMap.get(key);
if (mp != null) {
// property found in target, so just add as value
MetaValue value = sourceInfo.getProperties().get(key).getValue();
if (ManagedUtil.sameValue(mp.getDefaultValue(), value)) {
continue;
}
if (value != null) {
mp.setValue(value);
}
}
else {
// property not found in the target; add as "config-property"
mp = sourceInfo.getProperties().get(key);
if (ManagedUtil.sameValue(mp.getDefaultValue(), mp.getValue())) {
continue;
}
if (mp.getValue() != null) {
configProps.put(key, ManagedUtil.stringValue(mp.getValue()));
configProps.put(key+".type", mp.getValue().getMetaType().getClassName());//$NON-NLS-1$
}
}
}
if (configProps.size() > 0) {
MetaValue metaValue = ManagedUtil.compositeValueMap(configProps);
targetInfo.getProperties().get("config-property").setValue(metaValue);//$NON-NLS-1$
}
return this.targetTemplate.applyTemplate(targetInfo);
} catch (NoSuchDeploymentException e) {