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

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


                   
                    // if you do care about application composites we have
                    // to process the EAR as a contribution
                    Contribution contribution = contributionService.contribute(uri.toString(), earLocation, false);
                   
                    JavaEEApplicationInfo appInfo = null;
                    Composite appComposite = null;
                   
                    // get the ear info
                    for (Artifact artifact : contribution.getArtifacts()){
                        if (artifact.getModel() instanceof JavaEEApplicationInfo){
                            appInfo = (JavaEEApplicationInfo)artifact.getModel();
                        }
                       
                        if (artifact.getURI().equals("META-INF/application.composite")){
                            appComposite = (Composite)artifact.getModel();
                        }
                    }
                                      
                   
                    final JavaEEApplicationInfo returnAppInfo = appInfo;
                    final Composite returnAppComposite = appComposite;
                   
                    return (T)new ExternalEarInfo() {
                        public JavaEEApplicationInfo getAppInfo() {
                            return returnAppInfo;
View Full Code Here


                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
                if(moduleInfo == null) {
                    JavaEEApplicationInfo unresolved = new JavaEEApplicationInfoImpl();
                    unresolved.setUri(URI.create(archive));
                    JavaEEApplicationInfo resolved = resolver.resolveModel(JavaEEApplicationInfo.class, unresolved);
                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
            } else if(uri.endsWith(".war")) {
                WebModuleInfo webModuleInfo = new WebModuleInfoImpl();
                webModuleInfo.setUri(URI.create(archive));
                webModuleInfo = resolver.resolveModel(WebModuleInfo.class, webModuleInfo);
                moduleInfo = webModuleInfo;
            } else if(uri.endsWith(".jar")) {
                EjbModuleInfo ejbModuleInfo = new EjbModuleInfoImpl();
                ejbModuleInfo.setUri(URI.create(archive));
                ejbModuleInfo = resolver.resolveModel(EjbModuleInfo.class, ejbModuleInfo);
                moduleInfo = ejbModuleInfo;
            } else if(uri.endsWith(".ear")) {
                final JavaEEApplicationInfo appInfo = new JavaEEApplicationInfoImpl();
                appInfo.setUri(URI.create(archive));
                ExternalEarInfo unresolved = new ExternalEarInfo() {
                    public JavaEEApplicationInfo getAppInfo() {
                        return appInfo;
                    }
                    public Composite getAppComposite() {
View Full Code Here

TOP

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

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.