* @param resolver
* @param impl
*/
private void mergeComponentType(ModelResolver resolver, BPELImplementation impl) {
// FIXME: Need to clarify how to merge
ComponentType componentType = getComponentType(resolver, impl);
if (componentType != null && !componentType.isUnresolved()) {
Map<String, Reference> refMap = new HashMap<String, Reference>();
for (Reference ref : impl.getReferences()) {
refMap.put(ref.getName(), ref);
}
for (Reference reference : componentType.getReferences()) {
refMap.put(reference.getName(), reference);
}
impl.getReferences().clear();
impl.getReferences().addAll(refMap.values());
Map<String, Service> serviceMap = new HashMap<String, Service>();
for (Service svc : impl.getServices()) {
if(svc != null) {
serviceMap.put(svc.getName(), svc);
}
}
for (Service service : componentType.getServices()) {
//set default dataBinding to DOM
service.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
serviceMap.put(service.getName(), service);
}