Package org.apache.aries.application.modelling

Examples of org.apache.aries.application.modelling.ModelledResource


    bundlesToResolve.addAll(useBundleSet);

    bundlesToResolve.addAll(appContent);
    bundlesToResolve.addAll(otherBundles);
    Collection<ModelledResource> byValueBundles = new ArrayList<ModelledResource>(provideByValueBundles);
    ModelledResource fakeBundleResource;
    try {
      fakeBundleResource = createFakeBundle(appMetadata.getApplicationImportServices());
    } catch (InvalidAttributeException iax) {
      ResolverException rx = new ResolverException (iax);
      _logger.debug(LOG_EXIT, "generateDeploymentManifest", new Object[] {rx});
View Full Code Here


        serviceProperties = new HashMap<String, String>();
      }
      serviceProperties.put("service.imported", "");
      exportedServices.add (modellingManager.getExportedService("", 0, ifaces, new HashMap<String, Object>(serviceProperties)));
    }
    ModelledResource fakeBundle = modellingManager.getModelledResource(null, attrs, null, exportedServices);

    _logger.debug(LOG_EXIT, "createFakeBundle", new Object[]{fakeBundle});
    return fakeBundle;
  }
View Full Code Here

      fakeBundles.add(resource.getSymbolicName());
    }
   
    Iterator<ModelledResource> it = results.iterator();
    while (it.hasNext()) {
      ModelledResource mr = it.next();
      if (fakeBundles.contains(mr.getSymbolicName())) {
        it.remove();
      }
    }
    _logger.debug(LOG_EXIT, "pruneFakeBundleFromResults");
View Full Code Here

  }
 
  private ModelledResource model(String uri, BundleManifest bm, ParsedServiceElements pse) throws ModellerException {
      Attributes attributes = bm.getRawAttributes();
      ModelledResource mbi = null;
      try {
        mbi = _modellingManager.getModelledResource(uri, attributes, pse.getReferences(), pse.getServices());
      } catch (InvalidAttributeException iae) {
        ModellerException me = new ModellerException(iae);
        _logger.debug(LOG_EXIT, "getModelledResource", me);
View Full Code Here

    bundlesToResolve.addAll(useBundleSet);

    bundlesToResolve.addAll(appContent);
    bundlesToResolve.addAll(otherBundles);
    Collection<ModelledResource> byValueBundles = new ArrayList<ModelledResource>(provideByValueBundles);
    ModelledResource fakeBundleResource;
    try {
      fakeBundleResource = createFakeBundle(appMetadata.getApplicationImportServices());
    } catch (InvalidAttributeException iax) {
      ResolverException rx = new ResolverException (iax);
      _logger.debug(LOG_EXIT, "generateDeploymentManifest", new Object[] {rx});
View Full Code Here

        serviceProperties = new HashMap<String, String>();
      }
      serviceProperties.put("service.imported", "");
      exportedServices.add (modellingManager.getExportedService("", 0, ifaces, new HashMap<String, Object>(serviceProperties)));
    }
    ModelledResource fakeBundle = modellingManager.getModelledResource(null, attrs, null, exportedServices);

    _logger.debug(LOG_EXIT, "createFakeBundle", new Object[]{fakeBundle});
    return fakeBundle;
  }
View Full Code Here

  private void pruneFakeBundleFromResults (Collection<ModelledResource> results) {
    _logger.debug(LOG_ENTRY, "pruneFakeBundleFromResults", new Object[]{results});
    boolean fakeBundleRemoved = false;
    Iterator<ModelledResource> it = results.iterator();
    while (!fakeBundleRemoved && it.hasNext()) {
      ModelledResource mr = it.next();
      if (mr.getExportedBundle().getSymbolicName().equals(FAKE_BUNDLE_NAME)) {
        it.remove();
        fakeBundleRemoved = true;
      }
    }
    _logger.debug(LOG_EXIT, "pruneFakeBundleFromResults");
View Full Code Here

 
 

  public static ExportedPackage createExportedPackage (String bundleName, String bundleVersion,
      String[] exportedPackages, String[] importedPackages ) throws InvalidAttributeException {
    ModelledResource mb = createModelledResource(bundleName, bundleVersion,
        Arrays.asList(importedPackages) , Arrays.asList(exportedPackages));
   
   
    return mb.getExportedPackages().iterator().next();
  }
View Full Code Here

    attrs.putValue("Bundle-ManifestVersion", "2");
    attrs.putValue("Bundle-Version", "2.0.0");
    attrs.putValue("Bundle-SymbolicName", "org.apache.aries.isolated.sample");
    attrs.putValue("Manifest-Version", "1");

    ModelledResource res = modellingManager.getModelledResource(
        new File("sample_2.0.0.jar").toURI().toString(),
        attrs,
        Collections.EMPTY_LIST, Collections.EMPTY_LIST);

    repoGen.generateRepository("repo.xml", Arrays.asList(res), new FileOutputStream("repo.xml"));
View Full Code Here

  protected ModelledResource instantiateBundleResource() throws Exception
  {
    File file = new File(TEST_APP_MANIFEST_PATH, MANIFEST_MF);
    Manifest man = new Manifest(new FileInputStream(file));

    ModelledResource br = new ModelledResourceImpl(null, man.getMainAttributes(), null, null);
    return br;
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.application.modelling.ModelledResource

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.