Package org.jboss.metadata.ear.spec

Examples of org.jboss.metadata.ear.spec.ModulesMetaData


/*     */   private void scanEar(VFSDeploymentUnit unit, VirtualFile root, JBossAppMetaData j2eeMetaData)
/*     */     throws IOException
/*     */   {
/* 176 */     List archives = root.getChildren();
/*     */     String earPath;
/*     */     ModulesMetaData modules;
/* 177 */     if (archives != null)
/*     */     {
/* 179 */       earPath = root.getPathName();
/* 180 */       modules = j2eeMetaData.getModules();
/* 181 */       if (modules == null)
/*     */       {
/* 183 */         modules = new ModulesMetaData();
/* 184 */         j2eeMetaData.setModules(modules);
/*     */       }
/* 186 */       for (VirtualFile vfArchive : archives)
/*     */       {
/* 188 */         String filename = earRelativePath(earPath, vfArchive.getPathName());
/*     */
/* 190 */         ModuleMetaData moduleMetaData = j2eeMetaData.getModule(filename);
/* 191 */         int type = typeFromSuffix(unit, filename, vfArchive);
/* 192 */         if ((type >= 0) && (moduleMetaData == null))
/*     */         {
/* 194 */           moduleMetaData = new ModuleMetaData();
/* 195 */           AbstractModule module = null;
/* 196 */           switch (type)
/*     */           {
/*     */           case 0:
/* 199 */             module = new EjbModuleMetaData();
/* 200 */             break;
/*     */           case 2:
/* 202 */             module = new JavaModuleMetaData();
/* 203 */             break;
/*     */           case 3:
/* 205 */             module = new ConnectorModuleMetaData();
/* 206 */             break;
/*     */           case 4:
/*     */           case 5:
/* 209 */             module = new ServiceModuleMetaData();
/* 210 */             break;
/*     */           case 1:
/* 212 */             module = new WebModuleMetaData();
/*     */           }
/*     */
/* 215 */           module.setFileName(filename);
/* 216 */           moduleMetaData.setValue(module);
/* 217 */           modules.add(moduleMetaData);
/*     */         }
/*     */       }
/*     */     }
/*     */   }
View Full Code Here


/*     */     }
/* 215 */     else if ((original5x != null) && (original5x.getLibraryDirectory() != null)) {
/* 216 */       setLibraryDirectory(original5x.getLibraryDirectory());
/*     */     }
/* 218 */     if (this.modules == null)
/* 219 */       this.modules = new ModulesMetaData();
/* 220 */     ModulesMetaData overrideModules = null;
/* 221 */     ModulesMetaData originalModules = null;
/* 222 */     if (override != null)
/* 223 */       overrideModules = override.getModules();
/* 224 */     if (original != null)
/* 225 */       originalModules = original.getModules();
/* 226 */     this.modules.merge(overrideModules, originalModules);
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ear.spec.ModulesMetaData

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.