protected void removeConstrainedIntents(EndpointReference subject, BindingType bindingType) { List<Intent> intents = subject.getRequiredIntents(); // Remove the intents whose @contrains do not include the current element if(bindingType != null){ List<Intent> copy = new ArrayList<Intent>(intents); for (Intent i : copy) { List<ExtensionType> constrainedTypes = i.getConstrainedTypes(); if (( constrainedTypes.size() == 0 ) && ( i.getQualifiableIntent() != null ) ) constrainedTypes = i.getQualifiableIntent().getConstrainedTypes(); if (constrainedTypes.size() > 0){ boolean constraintFound = false; for (ExtensionType constrainedType : constrainedTypes){ if (constrainedType.getType().equals(bindingType.getType()) || constrainedType.getType().equals(bindingType.getBaseType())){ constraintFound = true; break; } } if(!constraintFound){ intents.remove(i); } } } } }
public boolean build(EndpointReference endpointReference, BuilderContext context) { boolean ok = checkMutualExclusion(endpointReference, context); if(!ok) { return false; } Endpoint endpoint = endpointReference.getTargetEndpoint(); if (endpoint == null) { return true; } ok = checkMutualExclusion(endpointReference, endpoint, context); List<Intent> intentList1 = endpointReference.getRequiredIntents(); List<Intent> intentList2 = endpoint.getRequiredIntents(); return ok; }
public boolean build(EndpointReference endpointReference, BuilderContext context) { boolean ok = checkMutualExclusion(endpointReference, context); if(!ok) { return false; } Endpoint endpoint = endpointReference.getTargetEndpoint(); if (endpoint == null) { return true; } ok = checkMutualExclusion(endpointReference, endpoint, context); List<Intent> intentList1 = endpointReference.getRequiredIntents(); List<Intent> intentList2 = endpoint.getRequiredIntents(); return ok; }
for (Intent eprIntent : endpointReference.getRequiredIntents()){ for (Intent epIntent : endpoint.getRequiredIntents()){ if (eprIntent.getExcludedIntents().contains(epIntent) || if ((endpointReference.getRequiredIntents().size() == 0) && (endpoint.getRequiredIntents().size() == 0) && (noEndpointReferencePolicies) && eprIntents.addAll(endpointReference.getRequiredIntents()); for (Intent intent : endpointReference.getRequiredIntents()){ if (bindingType != null && bindingType.getAlwaysProvidedIntents().contains(intent)){
for ( ComponentReference reference : component.getReferences() ) { for ( EndpointReference epr : reference.getEndpointReferences() ) { for ( Intent eprIntent : epr.getRequiredIntents() ) { if ( Constants.TRANSACTED_ONE_WAY_INTENT.equals(eprIntent.getName())) { error(context.getMonitor(), for ( Intent eprIntent : epr.getRequiredIntents() ) { if ( Constants.PROPAGATES_TRANSACTION_INTENT.equals(eprIntent.getName())) { error(context.getMonitor(), for ( Intent eprIntent : epr.getRequiredIntents() ) { if ( Constants.TRANSACTED_ONE_WAY_INTENT.equals(eprIntent.getName()) ) { for ( Operation o : epr.getComponentReferenceInterfaceContract().getInterface().getOperations() ) {
for ( ComponentReference reference : component.getReferences() ) { for ( EndpointReference epr : reference.getEndpointReferences() ) { for ( Intent eprIntent : epr.getRequiredIntents() ) { if ( Constants.TRANSACTED_ONE_WAY_INTENT.equals(eprIntent.getName())) { error(context.getMonitor(), for ( Intent eprIntent : epr.getRequiredIntents() ) { if ( Constants.PROPAGATES_TRANSACTION_INTENT.equals(eprIntent.getName())) { error(context.getMonitor(), for ( Intent eprIntent : epr.getRequiredIntents() ) { if ( Constants.TRANSACTED_ONE_WAY_INTENT.equals(eprIntent.getName()) ) { for ( Operation o : epr.getComponentReferenceInterfaceContract().getInterface().getOperations() ) {