Examples of BundleInfo


Examples of aQute.bnd.differ.Baseline.BundleInfo

        List<MarkerData> result = new LinkedList<MarkerData>();

        IFile bndFile = null;
        LineLocation loc = null;

        BundleInfo info = (BundleInfo) location.details;
        for (Builder builder : model.getSubBuilders()) {
            if (builder.getBsn().equals(info.bsn)) {
                File propsFile = builder.getPropertiesFile();
                // Try to find in the sub-bundle file
                if (propsFile != null) {
View Full Code Here

Examples of com.quickwebframework.entity.BundleInfo

      Bundle[] allBundles = bundle.getBundleContext().getBundles();

      Map<Bundle, List<String>> bundleClassPathListMap = new HashMap<Bundle, List<String>>();

      for (Bundle tmpBundle : allBundles) {
        BundleInfo tmpBundleInfo = BundleUtils.getBundleInfo(tmpBundle);
        List<String> tmpBundleExportPackageList = tmpBundleInfo.getExportPackageList();
       
        for (String tmpBundleExportPackageInfo : tmpBundleExportPackageList) {
          // 已找到对应Bundle的路径列表
          List<String> foundClassPathList = new ArrayList<String>();
          for (String importPackage : importPackageList) {
View Full Code Here

Examples of org.apache.aries.application.management.BundleInfo

     
      assertEquals(1, dcList.size());
      assertTrue (dcList.contains(dc3));
     
      assertEquals(2, app.getBundleInfo().size());
      BundleInfo info;
      info = findBundleInfo(app.getBundleInfo(), "hello.world.jar");
      assertNotNull(info);
      assertEquals("HelloWorldJar", info.getHeaders().get(Constants.BUNDLE_NAME));
     
      info = findBundleInfo(app.getBundleInfo(), "helloWorld.war");
        assertNotNull(info);
        assertEquals("helloWorld.war", info.getHeaders().get(Constants.BUNDLE_NAME));
        assertEquals("/test", info.getHeaders().get("Bundle-ContextPath"));
  }
View Full Code Here

Examples of org.apache.aries.application.management.BundleInfo

    // we could change to using it here.
    Set<BundleInfo> nextResolverResult = new HashSet<BundleInfo>();
    String persistenceLibraryLocation = "../src/test/resources/bundles/repository/a.handy.persistence.library.jar";
    File persistenceLibrary = new File (persistenceLibraryLocation);
    BundleManifest mf = BundleManifest.fromBundle(persistenceLibrary);
    BundleInfo resolvedPersistenceLibrary = new SimpleBundleInfo(mf, persistenceLibraryLocation);
    Field v = SimpleBundleInfo.class.getDeclaredField("_version");
    v.setAccessible(true);
    v.set(resolvedPersistenceLibrary, new Version("1.1.0"));
    nextResolverResult.add(resolvedPersistenceLibrary);
    _resolver.setNextResult(nextResolverResult);
View Full Code Here

Examples of org.apache.aries.application.management.BundleInfo

public class ApplicationRepositoryTest {
  @Test
  public void testBundleNotInApp() {
    AriesApplication app = Skeleton.newMock(AriesApplication.class);
   
    BundleInfo bi = Skeleton.newMock(BundleInfo.class);
    Skeleton.getSkeleton(bi).setReturnValue(new MethodCall(BundleInfo.class, "getSymbolicName"), "test.bundle");
    Skeleton.getSkeleton(bi).setReturnValue(new MethodCall(BundleInfo.class, "getVersion"), new Version("1.0.0"));
   
    Skeleton.getSkeleton(app).setReturnValue(
        new MethodCall(AriesApplication.class, "getBundleInfo"),
View Full Code Here

Examples of org.apache.aries.application.management.BundleInfo

  private String buildAppContent(Set<BundleInfo> bundleInfos) {
      StringBuilder builder = new StringBuilder();
      Iterator<BundleInfo> iterator = bundleInfos.iterator();
      while (iterator.hasNext()) {
          BundleInfo info = iterator.next();
          builder.append(info.getSymbolicName());

          // bundle version is not a required manifest header
          if (info.getVersion() != null) {
              String version = info.getVersion().toString();
              builder.append(";version=\"[");
              builder.append(version);
              builder.append(',');
              builder.append(version);
              builder.append("]\"");
View Full Code Here

Examples of org.apache.aries.application.management.BundleInfo

    return REPOSITORY_COST;
  }

  public BundleSuggestion suggestBundleToUse(DeploymentContent content)
  {
    BundleInfo bundleInfo = null;
    if ((app.getBundleInfo() != null) && (!app.getBundleInfo().isEmpty())) {
      for (BundleInfo bi : app.getBundleInfo()) {
        if (bi.getSymbolicName().equals(content.getContentName()) && (bi.getVersion().equals(content.getVersion().getExactVersion()))) {
          bundleInfo = bi;
          break;
View Full Code Here

Examples of org.apache.aries.application.management.BundleInfo

   
    try {
      if (obrResolver.resolve()) {
        Set<BundleInfo> result = new HashSet<BundleInfo>();
        for (Resource resource: obrResolver.getRequiredResources()) {
          BundleInfo bundleInfo = toBundleInfo(resource);
          result.add(bundleInfo);
        }
        for (Resource resource: obrResolver.getOptionalResources()) {
          BundleInfo bundleInfo = toBundleInfo(resource);
          result.add(bundleInfo);
        }
        return result;
      } else {
        throw new ResolverException("Could not resolve requirements: " + getUnsatisfiedRequirements(obrResolver));
View Full Code Here

Examples of org.apache.aries.application.management.BundleInfo

                        }
                    }
                   
                } else {
                    // Step 2: See if the bundle is included in the application
                    BundleInfo bundleInfo = findBundleInfoInApplication(bundleSymbolicName, bundleVersion);
                    if (bundleInfo == null) {
                        // Step 3: Lookup bundle location using the resolver
                        bundleInfo = findBundleInfoUsingResolver(resolver, bundleSymbolicName, bundleVersion);
                    }
                   
                    if (bundleInfo == null) {
                        throw new ManagementException("Cound not find bundles: " + bundleSymbolicName + "_" + bundleVersion);
                    }
                       
                    contentBundle = bundleContext.installBundle(bundleInfo.getLocation());
                    applicationBundles.add(contentBundle);

                }
            }
        } catch (BundleException be) {
View Full Code Here

Examples of org.apache.felix.webconsole.bundleinfo.BundleInfo

        // Component #{0} {1}, state {2}
        key = MessageFormat.format(key, new Object[] { String.valueOf(component.getId()), //
                name != null ? name : "", //$NON-NLS-1$
                state, //
        });
        return new BundleInfo(key, webConsoleRoot + "/components/" + component.getId(), //$NON-NLS-1$
            BundleInfoType.LINK, descr);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.