public BundleFile getBundleFile() { synchronized (genMonitor) { if (bundleFile == null) { if (getBundleId() == 0 && content == null) { bundleFile = new SystemBundleFile(); } else { bundleFile = getStorage().createBundleFile(content, this, isDirectory, true); } } return bundleFile; } }
@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); }
public BundleFile getBundleFile() { synchronized (genMonitor) { if (bundleFile == null) { if (getBundleId() == 0 && content == null) { bundleFile = new SystemBundleFile(); } else { bundleFile = getStorage().createBundleFile(content, this, isDirectory, true); } } return bundleFile; } }
public BundleFile getBundleFile() { synchronized (genMonitor) { if (bundleFile == null) { if (getBundleId() == 0 && content == null) { bundleFile = new SystemBundleFile(); } else { bundleFile = getStorage().createBundleFile(content, this, isDirectory, true); } } return bundleFile; } }
public BundleFile getBundleFile() { synchronized (genMonitor) { if (bundleFile == null) { if (getBundleId() == 0 && content == null) { bundleFile = new SystemBundleFile(); } else { bundleFile = getStorage().createBundleFile(content, this, isDirectory, true); } } return bundleFile; } }
@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 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); }
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; } }
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; } }
public void delete() { try { getStorage().delete(getStorage().getFile(Long.toString(getBundleId()), false)); } catch (IOException e) { storage.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.WARNING, "Error deleting bunlde info.", e); //$NON-NLS-1$ } }
public void delete() { try { getStorage().delete(getStorage().getFile(Long.toString(getBundleId()), false)); } catch (IOException e) { storage.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.WARNING, "Error deleting bunlde info.", e); //$NON-NLS-1$ } }
public void delete() { try { getStorage().delete(getStorage().getFile(Long.toString(getBundleId()), false)); } catch (IOException e) { storage.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.WARNING, "Error deleting bunlde info.", e); //$NON-NLS-1$ } }
public File getDataFile(String path) { File dataRoot = getStorage().getFile(getBundleId() + "/" + Storage.BUNDLE_DATA_DIR, false); //$NON-NLS-1$ if (!Storage.secureAction.isDirectory(dataRoot) && (storage.isReadOnly() || !(Storage.secureAction.mkdirs(dataRoot) || Storage.secureAction.isDirectory(dataRoot)))) { if (getStorage().getConfiguration().getDebug().DEBUG_STORAGE) Debug.println("Unable to create bundle data directory: " + dataRoot.getAbsolutePath()); //$NON-NLS-1$ return null; } return path == null ? dataRoot : new File(dataRoot, path); }
public File getDataFile(String path) { File dataRoot = getStorage().getFile(getBundleId() + "/" + Storage.BUNDLE_DATA_DIR, false); //$NON-NLS-1$ if (!Storage.secureAction.isDirectory(dataRoot) && (storage.isReadOnly() || !(Storage.secureAction.mkdirs(dataRoot) || Storage.secureAction.isDirectory(dataRoot)))) { if (getStorage().getConfiguration().getDebug().DEBUG_GENERAL) Debug.println("Unable to create bundle data directory: " + dataRoot.getAbsolutePath()); //$NON-NLS-1$ return null; } return path == null ? dataRoot : new File(dataRoot, path); }
void delete(Generation generation) { try { getStorage().delete(getStorage().getFile(getBundleId() + "/" + generation.getGenerationId(), false)); //$NON-NLS-1$ } catch (IOException e) { storage.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.WARNING, "Error deleting generation.", e); //$NON-NLS-1$ } }
void delete(Generation generation) { try { getStorage().delete(getStorage().getFile(getBundleId() + "/" + generation.getGenerationId(), false)); //$NON-NLS-1$ } catch (IOException e) { storage.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.WARNING, "Error deleting generation.", e); //$NON-NLS-1$ } }
void delete(Generation generation) { try { getStorage().delete(getStorage().getFile(getBundleId() + "/" + generation.getGenerationId(), false)); //$NON-NLS-1$ } catch (IOException e) { storage.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.WARNING, "Error deleting generation.", e); //$NON-NLS-1$ } }