// Failing this the intent is unresolved and the reference and
// service don't match
// TODO - seems that we should do this loop on a binding by binding basis
// rather than each time we do matching
BindingType bindingType = null;
Definitions systemDefinitions = null;
if (builderContext != null){
systemDefinitions = builderContext.getDefinitions();
} else {
systemDefinitions = ((RuntimeEndpoint)endpoint).getCompositeContext().getSystemDefinitions();
}
bindingType = systemDefinitions.getBindingType(binding.getType());
// Before we start examining intents, remove any whose constrained
// types don't include the binding type
removeConstrainedIntents(endpointReference, bindingType);
List<Intent> eprIntents = new ArrayList<Intent>();
List<Intent> eprMayProvideInterationIntents = new ArrayList<Intent>();
eprIntents.addAll(endpointReference.getRequiredIntents());
// first check the binding type
for (Intent intent : endpointReference.getRequiredIntents()){
if (bindingType != null &&
bindingType.getAlwaysProvidedIntents().contains(intent)){
eprIntents.remove(intent);
} else if (bindingType != null &&
bindingType.getMayProvidedIntents().contains(intent)){
eprIntents.remove(intent);
if (intent.getType().equals(Intent.Type.interaction)){
eprMayProvideInterationIntents.add(intent);
}
} else {