Examples of BundleManifest


Examples of org.apache.aries.util.manifest.BundleManifest

  @Test
  public void testModelServicesEmptyExportEJB() throws ModellerException {
    Manifest man = new Manifest();
    setBasicHeaders(man);
    man.getMainAttributes().putValue("Export-EJB", "");
    modeller.modelServices(new BundleManifest(man), bundleLocation);
    ejbLocator.assertCalled(new MethodCall(EJBLocator.class, "findEJBs", BundleManifest.class,
            bundleLocation, ParsedEJBServices.class));
  }
View Full Code Here

Examples of org.apache.aries.util.manifest.BundleManifest

  @Test
  public void testModelServicesNoneExportEJB() throws ModellerException {
    Manifest man = new Manifest();
    setBasicHeaders(man);
    man.getMainAttributes().putValue("Export-EJB", "NONE,anEJB , another");
    modeller.modelServices(new BundleManifest(man), bundleLocation);
    ejbLocator.assertSkeletonNotCalled();
  }
View Full Code Here

Examples of org.apache.aries.util.manifest.BundleManifest

  @Test
  public void testModelServicesExportEJB() throws ModellerException {
    Manifest man = new Manifest();
    setBasicHeaders(man);
    man.getMainAttributes().putValue("Export-EJB", "anEJB , another");
    modeller.modelServices(new BundleManifest(man), bundleLocation);
    ejbLocator.assertCalled(new MethodCall(EJBLocator.class, "findEJBs", BundleManifest.class,
        bundleLocation, ParsedEJBServices.class));
  }
View Full Code Here

Examples of org.apache.aries.util.manifest.BundleManifest

 
  private void runTest(byte[] zip, String manifest) throws ModellerException,
      IOException {
    ICloseableDirectory icd = FileSystem.getFSRoot(new
        ByteArrayInputStream(zip));
    new OpenEJBLocator().findEJBs(new BundleManifest(getClass().getClassLoader().
        getResourceAsStream(manifest)), icd, registry);
    icd.close();
  }
View Full Code Here

Examples of org.apache.aries.util.manifest.BundleManifest

   * @param archive CommonArchive. The caller is responsible for closing this afterwards.
   * @return ParsedServiceElementsImpl
   * @throws OpenFailureException
   */
  public ParsedServiceElements getServiceElements (IDirectory archive) throws ModellerException {
      BundleManifest bm = BundleManifest.fromBundle(archive);
      return getServiceElements(bm, archive);
  }
View Full Code Here

Examples of org.apache.aries.util.manifest.BundleManifest

 
  public ParsedServiceElements getServiceElements(InputStreamProvider archive) throws ModellerException {
      ICloseableDirectory dir = null;
      try {
          dir = FileSystem.getFSRoot(archive.open());
          BundleManifest bm = BundleManifest.fromBundle(dir);
          return getServiceElements(bm, dir);
      } catch (IOException e) {
          throw new ModellerException(e);
      } finally {
          IOUtils.close(dir);
View Full Code Here

Examples of org.apache.aries.util.manifest.BundleManifest

 
  public ModelledResource getModelledResource(String uri, IDirectory bundle) throws ModellerException{
    _logger.debug(LOG_ENTRY, "getModelledResource", new Object[]{uri, bundle});

    if (bundle != null) {
        BundleManifest bm = BundleManifest.fromBundle(bundle);
        ParsedServiceElements pse = getServiceElements(bm, bundle);
        return model(uri, bm, pse);
    } else {
      // The bundle does not exist
      ModellerException me = new ModellerException(MessageUtil.getMessage("INVALID_BUNDLE_LOCATION", bundle));
View Full Code Here

Examples of org.osmorc.manifest.BundleManifest

  }

  @Nullable
  @Override
  public PsiElement resolve() {
    BundleManifest bundleManifest = myBundleManager.getManifestBySymbolicName(unwrap(getCanonicalText()));
    return bundleManifest != null ? bundleManifest.getManifestFile() : null;
  }
View Full Code Here

Examples of org.osmorc.manifest.BundleManifest

  }

  public void testRequiredBundleWithVersion() throws ManifestHolderDisposedException {
    ManifestHolder manifestHolder = myCache.whoIsRequiredBundle("foo.bam;bundle-version=1.2.0");
    assertThat(manifestHolder, notNullValue());
    BundleManifest bundleManifest = getManifest(manifestHolder);
    assertThat(bundleManifest.getBundleSymbolicName(), equalTo("foo.bam"));

    // should pick largest available version
    assertThat(bundleManifest.getBundleVersion().toString(), equalTo("1.2.3"));
  }
View Full Code Here

Examples of org.osmorc.manifest.BundleManifest

  }

  public void testRequiredBundleWithVersionRange() throws ManifestHolderDisposedException {
    ManifestHolder manifestHolder = myCache.whoIsRequiredBundle("foo.bam;bundle-version=\"[1.2.0,1.2.3)\"");
    assertThat(manifestHolder, notNullValue());
    BundleManifest bundleManifest = getManifest(manifestHolder);
    assertThat(bundleManifest.getBundleSymbolicName(), equalTo("foo.bam"));
    // 1.2.3 is not allowed by version range.
    assertThat(bundleManifest.getBundleVersion().toString(), equalTo("1.2.0"));
  }
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.