Package org.eclipse.osgi.service.resolver

Examples of org.eclipse.osgi.service.resolver.BundleDescription


            return javaClassPath;
        }
        List<String> pdeClassPath = new ArrayList<String>();
        pdeClassPath.addAll(Arrays.asList(javaClassPath));

        BundleDescription target = model.getBundleDescription();

        Set<BundleDescription> bundles = new HashSet<BundleDescription>();
        // target is null if plugin uses non OSGI format
        if (target != null) {
            addDependentBundles(target, bundles);
View Full Code Here


                    getLogger().error(e.getMessage(), e);
                }
            }

            stateController.resolveState();
            BundleDescription b = stateController.getBundleDescription(proj);
            if (b != null) {
                try {
                    stateController.assertResolved(b);
                    getLogger().info("OSGi bundle is resolved: " + b.getSymbolicName());
                } catch (BundleException e) {
                    stateController.analyzeErrors(b);
                    if(getLogger().isDebugEnabled()) {
                        getLogger().debug(stateController.reportErrors(b));
                    }
View Full Code Here

    }

    private BundleDescription addBundle(Dictionary enhancedManifest, File bundleLocation, boolean override)
        throws BundleException {

        BundleDescription descriptor =
            factory.createBundleDescription(state, enhancedManifest, bundleLocation.getAbsolutePath(), getNextId());

        setUserProperty(descriptor, PROP_MANIFEST, enhancedManifest);
        if (override) {
            BundleDescription[] conflicts = state.getBundles(descriptor.getSymbolicName());
            if (conflicts != null) {
                for (BundleDescription conflict : conflicts) {
                    state.removeBundle(conflict);
                    logger
                        .warn(conflict.toString() + " has been replaced by another bundle with the same symbolic name "
                            + descriptor.toString());
                }
            }
        }

        state.addBundle(descriptor);
View Full Code Here

    public Set<ResolverError> getAllErrors() {
        BundleDescription[] bundles = state.getBundles();
        Set<ResolverError> errors = new LinkedHashSet<ResolverError>();
        for (int i = 0; i < bundles.length; i++) {
            BundleDescription bundle = bundles[i];
            ResolverError[] bundleErrors = state.getResolverErrors(bundle);
            if (bundleErrors != null) {
                errors.addAll(Arrays.asList(bundleErrors));
            }
        }
View Full Code Here

        Set<Long> bundleIds = new LinkedHashSet<Long>();
        addBundleAndDependencies(desc, bundleIds, true);
        List<BundleDescription> dependencies = new ArrayList<BundleDescription>();
        for (long bundleId : bundleIds) {
            if (desc.getBundleId() != bundleId) {
                BundleDescription dependency = state.getBundle(bundleId);
                BundleDescription supplier = dependency.getSupplier().getSupplier();
                HostSpecification host = supplier.getHost();
                if (host == null || !desc.equals(host.getSupplier())) {
                    dependencies.add(dependency);
                }
            }
        }
View Full Code Here

  public Version getVersion() {
    return exportedPackage.getVersion();
  }

  public boolean isRemovalPending() {
    BundleDescription exporter = exportedPackage.getExporter();
    if (exporter != null)
      return exporter.isRemovalPending();
    return true;
  }
View Full Code Here

      return null;

    Class result = null;
    //size may change, so we must check it every time
    for (int i = 0; i < allDependents.size() && result == null; i++) {
      BundleDescription searchedBundle = (BundleDescription) allDependents.get(i);
      try {
        BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
        if (proxy == null)
          continue;
        result = proxy.getBundleLoader().findClass(name, true);
View Full Code Here

      return null;

    URL result = null;
    //size may change, so we must check it every time
    for (int i = 0; i < allDependents.size() && result == null; i++) {
      BundleDescription searchedBundle = (BundleDescription) allDependents.get(i);
      BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
      if (proxy == null)
        continue;
      result = proxy.getBundleLoader().findResource(name, true);
      if (result == null) {
View Full Code Here

      return null;

    Enumeration results = null;
    //size may change, so we must check it every time
    for (int i = 0; i < allDependents.size(); i++) {
      BundleDescription searchedBundle = (BundleDescription) allDependents.get(i);
      try {
        BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
        if (proxy == null)
          continue;
        results = BundleLoader.compoundEnumerations(results, proxy.getBundleLoader().findResources(name));
View Full Code Here

  }

  private void basicAddImmediateDependents(BundleDescription root) {
    BundleDescription[] dependents = root.getDependents();
    for (int i = 0; i < dependents.length; i++) {
      BundleDescription toAdd = dependents[i];
      if (toAdd.getHost() == null && !allDependents.contains(toAdd)) {
        allDependents.add(toAdd);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.service.resolver.BundleDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.