Package org.apache.tuscany.sca.policy

Examples of org.apache.tuscany.sca.policy.ExtensionType


            }
           
            if (!intentMatched){             

                // Need to check the ExtensionType to see if the intent is provided there. If not, throw an error
                ExtensionType type = subject.getExtensionType();

                if ( type != null ) {
                    // The ExtensionType on the subject only has the binding name. The one in the system
                    // definitions will have the mayProvide/alwaysProvides values
                    if (type.getType().getLocalPart().startsWith("implementation")) {
                        for ( ExtensionType et : context.getDefinitions().getImplementationTypes() ) {
                            if ( type.getType().equals(et.getType()) ) {
                                type = et;
                            }
                        }
                    } else {
                        for ( ExtensionType et : context.getDefinitions().getBindingTypes() ) {
                            if ( type.getType().equals(et.getType()) ) {
                                type = et;
                            }
                        }
                    }
                }

                if ( type == null || !type.getAlwaysProvidedIntents().contains(intent) && !type.getMayProvidedIntents().contains(intent)) {
                    // Reference side intents can still be resolved by the service binding, so we can only issue a
                    // warning here.
                    if ( subject instanceof EndpointReference ) {
                        warning(context.getMonitor(), "IntentNotSatisfiedAtBuild", subject, intent.getName(), subject.toString());
                    } else {
View Full Code Here


    public JavaImplementation read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {

        // Read an <implementation.java>
        JavaImplementation javaImplementation = javaFactory.createJavaImplementation();

        ExtensionType implType = policyFactory.createImplementationType();
        implType.setType(getArtifactType());
        implType.setUnresolved(true);
        javaImplementation.setExtensionType(implType);

        javaImplementation.setUnresolved(true);
        javaImplementation.setName(reader.getAttributeValue(null, CLASS));
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.policy.ExtensionType

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.