/** * Add a bundle descriptor to this application. * * @param bundleDescriptor the bundle descriptor to add */ public void addBundleDescriptor(BundleDescriptor bundleDescriptor) { ModuleDescriptor newModule = bundleDescriptor.getModuleDescriptor(); addModule(newModule); }
/** * Add a web bundle descriptor to this application. * * @param bundleDescriptor the web bundle descriptor to add */ public void addBundleDescriptor(BundleDescriptor bundleDescriptor) { ModuleDescriptor newModule = bundleDescriptor.getModuleDescriptor(); addModule(newModule); }
/** * Add all the deployment information about the given application to me. */ public void addApplication(Application application) { for (ModuleDescriptor md : application.getModules()) { addModule(md); } }
/** * Add all the deployment information about the given application to me. */ public void addApplication(Application application) { for (ModuleDescriptor md : application.getModules()) { addModule(md); } }
public static Application createApplication(Habitat habitat, String name, ModuleDescriptor < BundleDescriptor > newModule) { Application application = new Application(habitat); application.setVirtual(true); if ((name == null) && (newModule.getDescriptor() != null)) { name = ((BundleDescriptor)newModule.getDescriptor()).getDisplayName(); } String untaggedName = VersioningUtils.getUntaggedName(name); if (name != null) { application.setDisplayName(untaggedName); application.setName(untaggedName); application.setAppName(untaggedName); } newModule.setStandalone(true); newModule.setArchiveUri(untaggedName); if (newModule.getDescriptor() != null) { ((BundleDescriptor)newModule.getDescriptor()).setApplication(application); } application.addModule(newModule); return application; }
app.addModule(md); md.setArchiveUri(uri); md.setModuleType(XModuleType.RAR); app.addModule(md); } else if ((!directory && name.endsWith(".jar")) || (directory && md.setModuleType(XModuleType.CAR); md.setManifest(subArchive.getManifest()); app.addModule(md); continue; md.setArchiveUri(uri); md.setModuleType(XModuleType.EJB); app.addModule(md); continue; md.setArchiveUri(uri); md.setModuleType(XModuleType.EJB); app.addModule(md);
app.addModule(md); md.setArchiveUri(uri); md.setModuleType(DOLUtils.rarType()); app.addModule(md); } else if ((!directory && name.endsWith(".jar")) || (directory && md.setModuleType(DOLUtils.carType()); md.setManifest(subArchive.getManifest()); app.addModule(md); continue; md.setArchiveUri(uri); md.setModuleType(DOLUtils.ejbType()); app.addModule(md); continue; md.setArchiveUri(uri); md.setModuleType(DOLUtils.ejbType()); app.addModule(md);
/** * Creates a new application to hold a standalone module * * @param name the application name * @param newModule the standalone module descriptor * @return the application */ public static Application createApplication(Habitat habitat, String name, ModuleDescriptor<BundleDescriptor> newModule) { // create a new empty application Application application = new Application(habitat); application.setVirtual(true); if (name == null && newModule.getDescriptor() != null) { name = newModule.getDescriptor().getDisplayName(); } String untaggedName = VersioningUtils.getUntaggedName(name); if (name != null) { application.setDisplayName(untaggedName); application.setName(untaggedName); application.setAppName(untaggedName); } // add the module to it newModule.setStandalone(true); newModule.setArchiveUri(untaggedName); if (newModule.getDescriptor() != null) { newModule.getDescriptor().setApplication(application); } application.addModule(newModule); return application; }
newModule.getDescriptor().setApplication(application); application.addModule(newModule);