public String run() { return bundle.getLocation(); } });
public Void run() { props.put("id", new Long(bundle.getBundleId())); props.put("location", bundle.getLocation()); String name = bundle.getSymbolicName(); if (name != null) { props.put("name", name); } SignerProperty signer = new SignerProperty(bundle); if (signer.isBundleSigned()) { props.put("signer", signer); } return null; } });
public Void run() { props.put("id", new Long(bundle.getBundleId())); props.put("location", bundle.getLocation()); String name = bundle.getSymbolicName(); if (name != null) { props.put("name", name); } SignerProperty signer = new SignerProperty(bundle); if (signer.isBundleSigned()) { props.put("signer", signer); } return null; } });
public Void run() { map.put("id", new Long(bundle.getBundleId())); map.put("location", bundle.getLocation()); String name = bundle.getSymbolicName(); if (name != null) { map.put("name", name); } SignerProperty signer = new SignerProperty(bundle); if (signer.isBundleSigned()) { map.put("signer", signer); } return null; } });
public Void run() { map.put("id", new Long(bundle.getBundleId())); map.put("location", bundle.getLocation()); String name = bundle.getSymbolicName(); if (name != null) { map.put("name", name); } SignerProperty signer = new SignerProperty(bundle); if (signer.isBundleSigned()) { map.put("signer", signer); } return null; } });
public Void run() { map.put("id", new Long(bundle.getBundleId())); map.put("location", bundle.getLocation()); String name = bundle.getSymbolicName(); if (name != null) { map.put("name", name); } SignerProperty signer = new SignerProperty(bundle); if (signer.isBundleSigned()) { map.put("signer", signer); } return null; } });
public Object run() { map.put("id", new Long(bundle.getBundleId())); map.put("location", bundle.getLocation()); String name = bundle.getSymbolicName(); if (name != null) { map.put("name", name); } SignerProperty signer = new SignerProperty(bundle); if (signer.isBundleSigned()) { map.put("signer", signer); } return null; } });
for (int i = 0; i < bundles.length; i++) installedBundleMap.put(bundles[i].getLocation(), bundles[i]);
@Override public String run() { return bundle.getLocation(); } });
@Override public String run() { return bundle.getLocation(); } });
private static Bundle getBundleByLocation(String location, Bundle[] bundles) { for (int i = 0; i < bundles.length; i++) { Bundle bundle = bundles[i]; if (location.equalsIgnoreCase(bundle.getLocation())) return bundle; } return null; }
private static Bundle getBundleByLocation(String location, Bundle[] bundles) { for (int i = 0; i < bundles.length; i++) { Bundle bundle = bundles[i]; if (location.equalsIgnoreCase(bundle.getLocation())) return bundle; } return null; }
private static Bundle getBundleByLocation(String location, Bundle[] bundles) { for (int i = 0; i < bundles.length; i++) { Bundle bundle = bundles[i]; if (location.equalsIgnoreCase(bundle.getLocation())) return bundle; } return null; }
public String getLocation(final Bundle bundle) { if (System.getSecurityManager() == null) { return bundle.getLocation(); } return AccessController.doPrivileged(new PrivilegedAction<String>() { public String run() { return bundle.getLocation(); } }, controlContext); } }
public Bundle getBundle(String location) { for (Bundle bundle : m_bundles.values()) { if (location.equals(bundle.getLocation())) { return bundle; } } return null; } }
private Map<String, Bundle> getInstalledBundles( final BundleContext context ) { Map<String, Bundle> installed = new HashMap<String, Bundle>(); for ( Bundle bundle : context.getBundles() ) { installed.put( bundle.getLocation(), bundle ); } return installed; }
private List<Bundle> getBundlesByLocation(String url) { Bundle[] bundles = bundleContext.getBundles(); ArrayList<Bundle> result = new ArrayList<>(); Pattern locationPattern = Pattern.compile(url); for (Bundle bundle : bundles) { Matcher locationMatcher = locationPattern.matcher(bundle.getLocation()); if (locationMatcher.matches()) { result.add(bundle); } } return result; }
private static Optional<File> getPluginFileName(PluginInfo info) { Bundle pluginDescriptor = info.getPluginDescriptor(); if (pluginDescriptor == null) { return Optional.empty(); } final String locationURL = pluginDescriptor.getLocation(); File existingPluginLocation = new File(locationURL.substring(locationURL.indexOf(":") + 1, locationURL.length())); return Optional.of(existingPluginLocation); } //
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, 0, NLS.bind(Msg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
public Set<Class<?>> scan(String... basePackages) { final File bundleFile = getBundleFile(bundle); if (!bundleFile.isFile() || !bundleFile.exists()) { throw new RuntimeException("Could not identify Bundle at location <" + bundle.getLocation() + ">"); } return indexJar(bundleFile, preparePackages(basePackages)); }