public String[] mapLibraryNames(String mappedLibName) { int extIndex = mappedLibName.lastIndexOf('.'); List<String> LIB_EXTENSIONS = generation.getBundleInfo().getStorage().getConfiguration().LIB_EXTENSIONS; if (LIB_EXTENSIONS.isEmpty() || extIndex < 0) return EMPTY_STRINGS; String libNameBase = mappedLibName.substring(0, extIndex); String[] results = new String[LIB_EXTENSIONS.size()]; for (int i = 0; i < results.length; i++) results[i] = libNameBase + LIB_EXTENSIONS.get(i); return results; }
public String[] mapLibraryNames(String mappedLibName) { int extIndex = mappedLibName.lastIndexOf('.'); List<String> LIB_EXTENSIONS = generation.getBundleInfo().getStorage().getConfiguration().LIB_EXTENSIONS; if (LIB_EXTENSIONS.isEmpty() || extIndex < 0) return EMPTY_STRINGS; String libNameBase = mappedLibName.substring(0, extIndex); String[] results = new String[LIB_EXTENSIONS.size()]; for (int i = 0; i < results.length; i++) results[i] = libNameBase + LIB_EXTENSIONS.get(i); return results; }
public String[] mapLibraryNames(String mappedLibName) { int extIndex = mappedLibName.lastIndexOf('.'); List<String> LIB_EXTENSIONS = generation.getBundleInfo().getStorage().getConfiguration().LIB_EXTENSIONS; if (LIB_EXTENSIONS.isEmpty() || extIndex < 0) return EMPTY_STRINGS; String libNameBase = mappedLibName.substring(0, extIndex); String[] results = new String[LIB_EXTENSIONS.size()]; for (int i = 0; i < results.length; i++) results[i] = libNameBase + LIB_EXTENSIONS.get(i); return results; }
@Override public String get(Object key) { if (cached.containsKey(key)) { return cached.get(key); } if (!cached.isEmpty() && generation.getBundleInfo().getStorage().getConfiguration().getDebug().DEBUG_CACHED_MANIFEST) { Debug.println("Header key is not cached: " + key + "; for bundle: " + generation.getBundleInfo().getBundleId()); //$NON-NLS-1$ //$NON-NLS-2$ } return generation.getRawHeaders().get(key); }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); for (ModuleRevision fragment : fragments) { try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragment, getWiring().getRevision().getRevisions().getModule()); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } } } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override public File getDataFile(String filename) { checkValid(); Generation current = (Generation) module.getCurrentRevision().getRevisionInfo(); return current.getBundleInfo().getDataFile(filename); }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
private static BundleFile createBundleFile(File content, Generation generation) { if (!content.exists()) { return null; } return generation.getBundleInfo().getStorage().createBundleFile(content, generation, content.isDirectory(), false); }
@Override public ModuleClassLoader run() { return createClassLoaderPrivledged(cl, generation.getBundleInfo().getStorage().getConfiguration(), BundleLoader.this, generation, hooks); } });
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override public String get(Object key) { if (cached.containsKey(key)) { return cached.get(key); } if (!cached.isEmpty() && generation.getBundleInfo().getStorage().getConfiguration().getDebug().DEBUG_CACHED_MANIFEST) { Debug.println("Header key is not cached: " + key + "; for bundle: " + generation.getBundleInfo().getBundleId()); //$NON-NLS-1$ //$NON-NLS-2$ } return generation.getRawHeaders().get(key); }
@Override public String get(Object key) { if (cached.containsKey(key)) { return cached.get(key); } if (!cached.isEmpty() && generation.getBundleInfo().getStorage().getConfiguration().getDebug().DEBUG_CACHED_MANIFEST) { Debug.println("Header key is not cached: " + key + "; for bundle: " + generation.getBundleInfo().getBundleId()); //$NON-NLS-1$ //$NON-NLS-2$ } return generation.getRawHeaders().get(key); }
@Override public ModuleClassLoader run() { return createClassLoaderPrivledged(cl, generation.getBundleInfo().getStorage().getConfiguration(), BundleLoader.this, generation, hooks); } });
@Override public String get(Object key) { if (cached.containsKey(key)) { return cached.get(key); } if (!cached.isEmpty() && generation.getBundleInfo().getStorage().getConfiguration().getDebug().DEBUG_CACHED_MANIFEST) { Debug.println("Header key is not cached: " + key + "; for bundle: " + generation.getBundleInfo().getBundleId()); //$NON-NLS-1$ //$NON-NLS-2$ } return generation.getRawHeaders().get(key); }
@Override public ModuleClassLoader run() { return createClassLoaderPrivledged(cl, generation.getBundleInfo().getStorage().getConfiguration(), BundleLoader.this, generation, hooks); } });
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }