/** * receives notiification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { Application application = getDescriptor(); if (element.getQName().equals( ApplicationTagNames.LIBRARY_DIRECTORY)) { application.setLibraryDirectory(value); } else if(element.getQName().equals( ApplicationTagNames.APPLICATION_NAME)) { application.setAppName(value); } else if (element.getQName().equals( ApplicationTagNames.INITIALIZE_IN_ORDER)) { application.setInitializeInOrder(Boolean.valueOf(value)); } else super.setElementValue(element, value); }
/** * receives notiification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { Application application = getDescriptor(); if (element.getQName().equals( ApplicationTagNames.LIBRARY_DIRECTORY)) { application.setLibraryDirectory(value); } else if(element.getQName().equals( ApplicationTagNames.APPLICATION_NAME)) { application.setAppName(value); } else if (element.getQName().equals( ApplicationTagNames.INITIALIZE_IN_ORDER)) { application.setInitializeInOrder(Boolean.valueOf(value)); } else super.setElementValue(element, value); }
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; }
application = holder.app; application.setAppName(name); application.setClassLoader(cl); name, archivist, sourceArchive, true); application.setAppName(name);
if (descriptor instanceof Application) { application = (Application) descriptor; application.setAppName(appName); application.setRegistrationName(appName); } else {
if (descriptor instanceof Application) { application = (Application) descriptor; application.setAppName(appName); application.setRegistrationName(appName); } else {
application.setDisplayName(untaggedName); application.setName(untaggedName); application.setAppName(untaggedName);
/** * 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; }