Package org.apache.tuscany.sca.contribution.service

Examples of org.apache.tuscany.sca.contribution.service.ContributionResolveException


                if (requiredIntent.isUnresolved()) {
                    Intent resolvedRequiredIntent = resolver.resolveModel(Intent.class, requiredIntent);
                    if (resolvedRequiredIntent != null) {
                        requiredIntents.add(resolvedRequiredIntent);
                    } else {
                        throw new ContributionResolveException(
                                                                 "Required Intent - " + requiredIntent
                                                                     + " not found for ProfileIntent "
                                                                     + policyIntent);

                    }
View Full Code Here


                Intent resolvedQualifiableIntent = resolver.resolveModel(Intent.class, qualifiableIntent);
   
                if (resolvedQualifiableIntent != null) {
                    policyIntent.setQualifiableIntent(resolvedQualifiableIntent);
                } else {
                    throw new ContributionResolveException("Qualifiable Intent - " + qualifiableIntent
                        + " not found for QualifiedIntent "
                        + policyIntent);
                }
   
            }
View Full Code Here

        if (providedIntent.isUnresolved()) {
          providedIntent = resolver.resolveModel(Intent.class, providedIntent);
          if (!providedIntent.isUnresolved()) {
            alwaysProvided.add(providedIntent);
          } else {
            throw new ContributionResolveException(
                "Always Provided Intent - " + providedIntent
                    + " not found for ExtensionType "
                    + extensionType);

          }
View Full Code Here

        if (providedIntent.isUnresolved()) {
          providedIntent = resolver.resolveModel(Intent.class, providedIntent);
          if (!providedIntent.isUnresolved()) {
            mayProvide.add(providedIntent);
          } else {
            throw new ContributionResolveException(
                "May Provide Intent - " + providedIntent
                    + " not found for ExtensionType "
                    + extensionType);

          }
View Full Code Here

                            WSDLDefinition resolved;
                            try {
                                resolved = read(null, uri, uri.toURL());
                                imp.setDefinition(resolved.getDefinition());
                            } catch (Exception e) {
                                throw new ContributionResolveException(e);
                            }
                        } else {
                            if (location.startsWith("/")) {
                                // This is a relative URI against a contribution
                                location = location.substring(1);
                                // TODO: Need to resolve it against the contribution
                            } else {
                                // This is a relative URI against the WSDL document
                                URI baseURI = URI.create(model.getDefinition().getDocumentBaseURI());
                                URI locationURI = baseURI.resolve(location);
                                WSDLDefinition resolved;
                                try {
                                    resolved = read(null, locationURI, locationURI.toURL());
                                    imp.setDefinition(resolved.getDefinition());
                                } catch (Exception e) {
                                    throw new ContributionResolveException(e);
                                }
                            }
                        }
                    }
                }
View Full Code Here

        if (resolved.getLocation() != null) {
            try {
                implementation.setLocationURL(new URL(resolved.getLocation()));
                implementation.setUnresolved(false);
            } catch (IOException e) {
                throw new ContributionResolveException(e);
            }
        }
    }
View Full Code Here

    public void resolve(NotificationImplementationImpl impl, ModelResolver resolver) throws ContributionResolveException {
        ComponentType componentType = resolver.resolveModel(ComponentType.class, impl.getComponentType());
       
        if (componentType.isUnresolved()) {
            throw new ContributionResolveException("ComponentType still unresolved");
        }
        impl.setComponentType(componentType);
        impl.setUnresolved(false);
    }
View Full Code Here

                        try {
                            wsdlDefinition.setDefinition(portType.getDefinition());
                            wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
                            wsdlInterface.setWsdlDefinition(wsdlDefinition);
                        } catch (InvalidInterfaceException e) {
                            throw new ContributionResolveException(e);
                        }
                        resolver.addModel(wsdlInterface);
                    }
                }
            }
View Full Code Here

                    //java implementation).  This has to be consolidated in to the component.
                    copyPoliciesToComponent(component, implementation, resolver, false);
                   
                    component.setImplementation(implementation);
                } catch ( PolicyValidationException e ) {
                    throw new ContributionResolveException("PolicyValidation exception when processing implementation of component '"
                                                           + component.getName() + "' due to " + e.getMessage(), e);
                }
           
            }
        }
View Full Code Here

         if (policy.getCallbackHandlerClassName() != null) {
             ClassReference classReference = new ClassReference(policy.getCallbackHandlerClassName());
             classReference = resolver.resolveModel(ClassReference.class, classReference);
             Class callbackClass = classReference.getJavaClass();
             if (callbackClass == null) {
                 throw new ContributionResolveException(new ClassNotFoundException(policy.getCallbackHandlerClassName()));
             }
             policy.setCallbackHandlerClass(callbackClass);
         }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.service.ContributionResolveException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.