Package org.apache.tuscany.sca.contribution.jee

Examples of org.apache.tuscany.sca.contribution.jee.ModelObject


                moduleInfo = resolved.getAppInfo();               
            }
           
            if(moduleInfo instanceof WebModuleInfo) {
                // Check for web composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("WEB-INF/web.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found web composite so the war itself must have been the contribution
                    Composite appComposite = (Composite)resolved.getObject();
                    mergeCompositeInfo(appComposite, implementation);
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    // there is either no application composite or we are ignoring it as the
                    // war is nested inside another contribution
                    if(jeeOptionalExtension != null) {
                        jeeOptionalExtension.createImplementationJeeComposite((WebModuleInfo)moduleInfo, implementation);
                    }
                    // now resolve the implementation composite as a real composite.
                    compositeProcessor.resolve((Composite)implementation, resolver);
                }
            } else if(moduleInfo instanceof EjbModuleInfo) {
                // Check for ejb-jar composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("META-INF/ejb-jar.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found ejb-jar composite so the ejb jar itself must have been the contribution
                    Composite appComposite = (Composite)resolved.getObject();
                    mergeCompositeInfo(appComposite, implementation);
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    if(jeeExtension != null) {
                        jeeExtension.createImplementationJeeComposite((EjbModuleInfo)moduleInfo, implementation);

                    }
                    if(jeeOptionalExtension != null) {
                        jeeOptionalExtension.createImplementationJeeComposite((EjbModuleInfo)moduleInfo, implementation);
                    }
                    // now resolve the implementation composite as a real composite.
                    compositeProcessor.resolve((Composite)implementation, resolver);
                }
            } else if(moduleInfo instanceof JavaEEApplicationInfo) {
                // Check for application composite
                Composite appComposite = null;
                if(extEar != null) {
                    appComposite = extEar.getAppComposite();
                } else {
                    ModelObject unresolved = new ModelObjectImpl();
                    unresolved.setUri(URI.create("META-INF/application.composite"));
                    ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                    if(resolved != unresolved) {
                       // Found application composite
                       appComposite = (Composite)resolved.getObject();
                    }
                }
               
                if(appComposite != null) {
                    // Found application composite so copy it's details across into
View Full Code Here


                moduleInfo = resolved.getAppInfo();               
            }
           
            if(moduleInfo instanceof WebModuleInfo) {
                // Check for web composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("WEB-INF/web.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found web composite
                    Composite appComposite = (Composite)resolved.getObject();
                    implementation.getServices().addAll(appComposite.getServices());
                    implementation.getReferences().addAll(appComposite.getReferences());
                    implementation.getProperties().addAll(appComposite.getProperties());
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    if(jeeOptionalExtension != null) {
                        ComponentType ct = jeeOptionalExtension.createImplementationJeeComponentType((WebModuleInfo)moduleInfo);
                        implementation.getReferences().addAll(ct.getReferences());
                        implementation.getProperties().addAll(ct.getProperties());
                    }
                }
            } else if(moduleInfo instanceof EjbModuleInfo) {
                // Check for ejb-jar composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("META-INF/ejb-jar.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found ejb-jar composite
                    Composite appComposite = (Composite)resolved.getObject();
                    implementation.getServices().addAll(appComposite.getServices());
                    implementation.getReferences().addAll(appComposite.getReferences());
                    implementation.getProperties().addAll(appComposite.getProperties());
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    if(jeeExtension != null) {
                        ComponentType ct = jeeExtension.createImplementationJeeComponentType((EjbModuleInfo)moduleInfo);
                        implementation.getServices().addAll(ct.getServices());
                    }
                    if(jeeOptionalExtension != null) {
                        ComponentType ct = jeeOptionalExtension.createImplementationJeeComponentType((EjbModuleInfo)moduleInfo);
                        implementation.getServices().addAll(ct.getServices());
                        implementation.getReferences().addAll(ct.getReferences());
                        implementation.getProperties().addAll(ct.getProperties());
                    }
                }
            } else if(moduleInfo instanceof JavaEEApplicationInfo) {
                // Check for application composite
                Composite appComposite = null;
                if(extEar != null) {
                    appComposite = extEar.getAppComposite();
                } else {
                    ModelObject unresolved = new ModelObjectImpl();
                    unresolved.setUri(URI.create("META-INF/application.composite"));
                    ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                    if(resolved != unresolved) {
                       // Found application composite
                       appComposite = (Composite)resolved.getObject();
                    }
                }
               
                if(appComposite != null) {
                    // Found application composite
View Full Code Here

                moduleInfo = resolved.getAppInfo();               
            }
           
            if(moduleInfo instanceof WebModuleInfo) {
                // Check for web composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("WEB-INF/web.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found web composite so the war itself must have been the contribution
                    Composite appComposite = (Composite)resolved.getObject();
                    mergeCompositeInfo(appComposite, implementation);
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    // there is either no application composite or we are ignoring it as the
                    // war is nested inside another contribution
                    if(jeeOptionalExtension != null) {
                        jeeOptionalExtension.createImplementationJeeComposite((WebModuleInfo)moduleInfo, implementation);
                    }
                    // now resolve the implementation composite as a real composite.
                    compositeProcessor.resolve((Composite)implementation, resolver);
                }
            } else if(moduleInfo instanceof EjbModuleInfo) {
                // Check for ejb-jar composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("META-INF/ejb-jar.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found ejb-jar composite so the ejb jar itself must have been the contribution
                    Composite appComposite = (Composite)resolved.getObject();
                    mergeCompositeInfo(appComposite, implementation);
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    if(jeeExtension != null) {
                        jeeExtension.createImplementationJeeComposite((EjbModuleInfo)moduleInfo, implementation);

                    }
                    if(jeeOptionalExtension != null) {
                        jeeOptionalExtension.createImplementationJeeComposite((EjbModuleInfo)moduleInfo, implementation);
                    }
                    // now resolve the implementation composite as a real composite.
                    compositeProcessor.resolve((Composite)implementation, resolver);
                }
            } else if(moduleInfo instanceof JavaEEApplicationInfo) {
                // Check for application composite
                Composite appComposite = null;
                if(extEar != null) {
                    appComposite = extEar.getAppComposite();
                } else {
                    ModelObject unresolved = new ModelObjectImpl();
                    unresolved.setUri(URI.create("META-INF/application.composite"));
                    ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                    if(resolved != unresolved) {
                       // Found application composite
                       appComposite = (Composite)resolved.getObject();
                    }
                }
               
                if(appComposite != null) {
                    // Found application composite so copy it's details across into
View Full Code Here

                moduleInfo = resolved.getAppInfo();               
            }
           
            if(moduleInfo instanceof WebModuleInfo) {
                // Check for web composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("WEB-INF/web.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found web composite so the war itself must have been the contribution
                    Composite appComposite = (Composite)resolved.getObject();
                    mergeCompositeInfo(appComposite, implementation);
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    // there is either no application composite or we are ignoring it as the
                    // war is nested inside another contribution
                    if(jeeOptionalExtension != null) {
                        jeeOptionalExtension.createImplementationJeeComposite((WebModuleInfo)moduleInfo, implementation);
                    }
                    // now resolve the implementation composite as a real composite.
                    compositeProcessor.resolve((Composite)implementation, resolver);
                }
            } else if(moduleInfo instanceof EjbModuleInfo) {
                // Check for ejb-jar composite
                ModelObject unresolved = new ModelObjectImpl();
                unresolved.setUri(URI.create("META-INF/ejb-jar.composite"));
                ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                if(resolved != unresolved) {
                    // Found ejb-jar composite so the ejb jar itself must have been the contribution
                    Composite appComposite = (Composite)resolved.getObject();
                    mergeCompositeInfo(appComposite, implementation);
                }

                // TODO: Obtain includeDefaults value from the composite
                boolean includeDefaults = false;
               
                if(includeDefaults || resolved == unresolved) {
                    if(jeeExtension != null) {
                        jeeExtension.createImplementationJeeComposite((EjbModuleInfo)moduleInfo, implementation);

                    }
                    if(jeeOptionalExtension != null) {
                        jeeOptionalExtension.createImplementationJeeComposite((EjbModuleInfo)moduleInfo, implementation);
                    }
                    // now resolve the implementation composite as a real composite.
                    compositeProcessor.resolve((Composite)implementation, resolver);
                }
            } else if(moduleInfo instanceof JavaEEApplicationInfo) {
                // Check for application composite
                Composite appComposite = null;
                if(extEar != null) {
                    appComposite = extEar.getAppComposite();
                } else {
                    ModelObject unresolved = new ModelObjectImpl();
                    unresolved.setUri(URI.create("META-INF/application.composite"));
                    ModelObject resolved = resolver.resolveModel(ModelObject.class, unresolved);
                    if(resolved != unresolved) {
                       // Found application composite
                       appComposite = (Composite)resolved.getObject();
                    }
                }
               
                if(appComposite != null) {
                    // Found application composite so copy it's details across into
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.jee.ModelObject

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.