protected BundleEntry findBundleEntry(URL url, Module module) throws IOException { ModuleRevision revision = module.getCurrentRevision(); BundleInfo.Generation revisionInfo = (BundleInfo.Generation) revision.getRevisionInfo(); BundleEntry entry = revisionInfo == null ? null : revisionInfo.getBundleFile().getEntry(url.getPath()); if (entry == null) throw new FileNotFoundException(url.getPath()); return entry; } }
protected BundleEntry findBundleEntry(URL url, Module module) throws IOException { ModuleRevision revision = module.getCurrentRevision(); BundleInfo.Generation revisionInfo = (BundleInfo.Generation) revision.getRevisionInfo(); BundleEntry entry = revisionInfo == null ? null : revisionInfo.getBundleFile().getEntry(url.getPath()); if (entry == null) throw new FileNotFoundException(url.getPath()); return entry; } }
protected BundleEntry findBundleEntry(URL url, Module module) throws IOException { ModuleRevision revision = module.getCurrentRevision(); BundleInfo.Generation revisionInfo = (BundleInfo.Generation) revision.getRevisionInfo(); BundleEntry entry = revisionInfo == null ? null : revisionInfo.getBundleFile().getEntry(url.getPath()); if (entry == null) throw new FileNotFoundException(url.getPath()); return entry; } }
@Override public Enumeration<String> getEntryPaths(String path) { try { equinoxContainer.checkAdminPermission(this, AdminPermission.RESOURCE); } catch (SecurityException e) { return null; } checkValid(); Generation current = (Generation) getModule().getCurrentRevision().getRevisionInfo(); return current.getBundleFile().getEntryPaths(path); }
protected BundleEntry findBundleEntry(URL url, Module module) throws IOException { ModuleRevision revision = module.getCurrentRevision(); BundleInfo.Generation revisionInfo = (BundleInfo.Generation) revision.getRevisionInfo(); BundleEntry entry = revisionInfo == null ? null : revisionInfo.getBundleFile().getEntry(url.getPath()); if (entry == null) throw new FileNotFoundException(url.getPath()); return entry; } }
void setStorageHooks(List<StorageHook<?, ?>> storageHooks, boolean install) { synchronized (this.genMonitor) { this.storageHooks = storageHooks; if (install) { this.hasPackageInfo = BundleInfo.hasPackageInfo(getBundleFile()); this.isMRJar = Boolean.parseBoolean(getRawHeaders().get(MULTI_RELEASE_HEADER)); } } }
public URL getEntry(String path) { BundleEntry entry = getBundleFile().getEntry(path); if (entry == null) return null; path = BundleFile.fixTrailingSlash(path, entry); try { //use the constant string for the protocol to prevent duplication return Storage.secureAction.getURL(BundleResourceHandler.OSGI_ENTRY_URL_PROTOCOL, Long.toString(getBundleId()) + BundleResourceHandler.BID_FWKID_SEPARATOR + Integer.toString(getStorage().getModuleContainer().hashCode()), 0, path, new Handler(getStorage().getModuleContainer(), entry)); } catch (MalformedURLException e) { return null; } }
void setStorageHooks(List<StorageHook<?, ?>> storageHooks, boolean install) { synchronized (this.genMonitor) { this.storageHooks = storageHooks; if (install) { this.hasPackageInfo = BundleInfo.hasPackageInfo(getBundleFile()); this.isMRJar = Boolean.parseBoolean(getRawHeaders().get(MULTI_RELEASE_HEADER)); } } }
public URL getEntry(String path) { BundleEntry entry = getBundleFile().getEntry(path); if (entry == null) return null; path = BundleFile.fixTrailingSlash(path, entry); try { //use the constant string for the protocol to prevent duplication return Storage.secureAction.getURL(BundleResourceHandler.OSGI_ENTRY_URL_PROTOCOL, Long.toString(getBundleId()) + BundleResourceHandler.BID_FWKID_SEPARATOR + Integer.toString(getStorage().getModuleContainer().hashCode()), 0, path, new Handler(getStorage().getModuleContainer(), entry)); } catch (MalformedURLException e) { return null; } }
void setStorageHooks(List<StorageHook<?, ?>> storageHooks, boolean install) { synchronized (this.genMonitor) { this.storageHooks = storageHooks; if (install) { this.hasPackageInfo = BundleInfo.hasPackageInfo(getBundleFile()); } } }
public URL getEntry(String path) { BundleEntry entry = getBundleFile().getEntry(path); if (entry == null) return null; path = BundleFile.fixTrailingSlash(path, entry); try { //use the constant string for the protocol to prevent duplication return Storage.secureAction.getURL(BundleResourceHandler.OSGI_ENTRY_URL_PROTOCOL, Long.toString(getBundleId()) + BundleResourceHandler.BID_FWKID_SEPARATOR + Integer.toString(getStorage().getModuleContainer().hashCode()), 0, path, new Handler(getStorage().getModuleContainer(), entry)); } catch (MalformedURLException e) { return null; } }
void setStorageHooks(List<StorageHook<?, ?>> storageHooks, boolean install) { synchronized (this.genMonitor) { this.storageHooks = storageHooks; if (install) { this.hasPackageInfo = BundleInfo.hasPackageInfo(getBundleFile()); } } }
/** * Constructs a ClasspathElement with the specified bundlefile and domain * @param bundlefile A BundleFile object which acts as a source * @param domain the protection domain */ public ClasspathEntry(BundleFile bundlefile, ProtectionDomain domain, Generation generation) { this.bundlefile = bundlefile; this.domain = domain; this.data = new PDEData(generation.getBundleFile().getBaseFile(), generation.getRevision().getSymbolicName()); this.manifest = getManifest(bundlefile, generation); }
public URL getEntry(String path) { BundleEntry entry = getBundleFile().getEntry(path); if (entry == null) return null; path = BundleFile.fixTrailingSlash(path, entry); try { //use the constant string for the protocol to prevent duplication return Storage.secureAction.getURL(BundleResourceHandler.OSGI_ENTRY_URL_PROTOCOL, Long.toString(getBundleId()) + BundleResourceHandler.BID_FWKID_SEPARATOR + Integer.toString(getStorage().getModuleContainer().hashCode()), 0, path, new Handler(getStorage().getModuleContainer(), entry)); } catch (MalformedURLException e) { return null; } }
public boolean addClassPathEntry(ArrayList<ClasspathEntry> cpEntries, String cp, ClasspathManager hostmanager, Generation sourceGeneration) { CDSBundleFile hostFile = getCDSBundleFile(hostmanager.getGeneration().getBundleFile()); CDSBundleFile sourceFile = getCDSBundleFile(sourceGeneration.getBundleFile()); if ((hostFile != sourceFile) && (null != hostFile) && (null != sourceFile)) { // Set the helper that got set on the host base bundle file in classLoaderCreated. // This is to handle the case where fragments are dynamically attached SharedClassURLHelper urlHelper = hostFile.getURLHelper(); sourceFile.setURLHelper(urlHelper); sourceFile.setPrimed(hostFile.getPrimed()); } return false; }
public URL getEntry(String path) { BundleEntry entry = getBundleFile().getEntry(path); if (entry == null) return null; path = BundleFile.fixTrailingSlash(path, entry); try { //use the constant string for the protocol to prevent duplication return Storage.secureAction.getURL(BundleResourceHandler.OSGI_ENTRY_URL_PROTOCOL, Long.toString(getBundleId()) + BundleResourceHandler.BID_FWKID_SEPARATOR + Integer.toString(getStorage().getModuleContainer().hashCode()), 0, path, new Handler(getStorage().getModuleContainer(), entry)); } catch (MalformedURLException e) { return null; } }
public URL getEntry(String path) { BundleEntry entry = getBundleFile().getEntry(path); if (entry == null) return null; path = BundleFile.fixTrailingSlash(path, entry); try { //use the constant string for the protocol to prevent duplication return Storage.secureAction.getURL(BundleResourceHandler.OSGI_ENTRY_URL_PROTOCOL, Long.toString(getBundleId()) + BundleResourceHandler.BID_FWKID_SEPARATOR + Integer.toString(getStorage().getModuleContainer().hashCode()), 0, path, new Handler(getStorage().getModuleContainer(), entry)); } catch (MalformedURLException e) { return null; } }
@Override public Enumeration<String> getEntryPaths(String path) { try { equinoxContainer.checkAdminPermission(this, AdminPermission.RESOURCE); } catch (SecurityException e) { return null; } checkValid(); Generation current = (Generation) getModule().getCurrentRevision().getRevisionInfo(); return current.getBundleFile().getEntryPaths(path); }
/** * Constructs a ClasspathElement with the specified bundlefile and domain * @param bundlefile A BundleFile object which acts as a source * @param domain the protection domain */ public ClasspathEntry(BundleFile bundlefile, ProtectionDomain domain, Generation generation) { this.bundlefile = bundlefile; this.domain = domain; this.data = new PDEData(generation.getBundleFile().getBaseFile(), generation.getRevision().getSymbolicName()); this.manifest = getManifest(bundlefile, generation); }
@Override public Enumeration<String> getEntryPaths(String path) { try { equinoxContainer.checkAdminPermission(this, AdminPermission.RESOURCE); } catch (SecurityException e) { return null; } checkValid(); Generation current = (Generation) getModule().getCurrentRevision().getRevisionInfo(); return current.getBundleFile().getEntryPaths(path); }