Package org.apache.aries.application.modelling

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


   
    // Filter out requirements satisfied by internal capabilities.
    Collection<ImportedPackage> result = new ArrayList<ImportedPackage>();
    for (ImportedPackage req : requirements)
    {
      ExportedPackage match = getPackageMatch(req, deployedContent);
      //If we didn't find a match then it must come from outside
      if (match == null)
      {
        result.add(req);
      }
View Full Code Here


   * @return an ExportedPackageImpl or null if no match is found.
   */
  private ExportedPackage getPackageMatch(ImportedPackage requirement, Collection<ModelledResource> bundles)
  {
    logger.debug(LOG_ENTRY, "getPackageMatch", new Object[]{requirement, bundles});
    ExportedPackage result = null;
   
    outer: for (ModelledResource bundle : bundles)
    {
      for (ExportedPackage pkg : bundle.getExportedPackages())
      {
View Full Code Here

    Collection<ImportedPackage> externalReqs = getExternalPackageRequirements();
    Collection<ModelledResource> usedUseBundles = new HashSet<ModelledResource>();
    for (ImportedPackage req : externalReqs)
    {
      // Find a match from the supplied bundle capabilities.
      ExportedPackage match = getPackageMatch(req, deployedUseBundle);
      if (match != null)
      {
          usedUseBundles.add(match.getBundle());
      }
    }
    logger.debug(LOG_EXIT, "getRequiredUseBundle", usedUseBundles);
    return usedUseBundles;
  }
View Full Code Here

    // Override Resolver behaviour.
    //ImportedBundle isolated = new ImportedBundleImpl ("test.isolated" , "1.0.0");
   
    // When we resolve isolated, we're going to get another bundle which has a dependency on isolated.
    Collection<ModelledResource> cmr = new ArrayList<ModelledResource>();
    ExportedPackage testIsolatedPkg = createExportedPackage ("test.isolated", "1.0.0",
        new String[] {"test.shared"}, new String[] {"test.isolated.pkg"});
    cmr.add (testIsolatedPkg.getBundle());
   
    ExportedPackage testSharedPkg = createExportedPackage ("test.shared", "1.0.0",
        new String[] {"test.isolated.pkg"}, new String[] {"test.shared"});
    cmr.add (testSharedPkg.getBundle());
    _resolver.addResult(cmr);
   
    // The second time DeploymentGenerator calls the Resolver, it will provide just
    // test.shared. The resolver will return test.shared _plus_ test.isolated.
    _resolver.addResult(cmr);
View Full Code Here

   */
  @Test
  public void checkMultipleCircularDependenciesDetected() throws Exception {
   
    Collection<ModelledResource> cmr = new ArrayList<ModelledResource>();
    ExportedPackage testIsolated1 = createExportedPackage ("test.isolated1", "1.0.0",
        new String[] {"test.isolated1","test.isolated2"}, new String[] {"test.shared1", "test.shared2"});
    cmr.add (testIsolated1.getBundle());
   
    ExportedPackage testIsolated2 = createExportedPackage ("test.isolated2", "1.0.0",
        new String[] {"test.isolated1","test.isolated2"}, new String[] {"test.shared1", "test.shared2"});
    cmr.add (testIsolated2.getBundle());
   
    ExportedPackage testShared1 = createExportedPackage ("test.shared1", "1.0.0",
        new String[] {"test.shared1", "test.shared2"}, new String[] {"test.isolated1","test.isolated2"});
    cmr.add (testShared1.getBundle());
   
    ExportedPackage testShared2 = createExportedPackage ("test.shared2", "1.0.0",
        new String[] {"test.shared1", "test.shared2"}, new String[] {"test.isolated1","test.isolated2"});
    cmr.add (testShared2.getBundle());
   
    _resolver.addResult(cmr);
   
    // The second time DeploymentGenerator calls the Resolver, it will provide just
    // test.shared. The resolver will return test.shared _plus_ test.isolated.
View Full Code Here

TOP

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

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.