Examples of AriesApplicationResolver


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

   
    private void install(DeploymentMetadataFactory deploymentFactory) throws Exception {

        BundleContext bundleContext = bundle.getBundleContext();
       
        AriesApplicationResolver resolver = null;
        PackageAdmin packageAdmin = null;
       
        ServiceReference resolverRef = bundleContext.getServiceReference(AriesApplicationResolver.class.getName());
        ServiceReference packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
                             
View Full Code Here

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

   
    private void install(DeploymentMetadataFactory deploymentFactory) throws Exception {

        BundleContext bundleContext = bundle.getBundleContext();
       
        AriesApplicationResolver resolver = null;
        PackageAdmin packageAdmin = null;
       
        ServiceReference resolverRef = bundleContext.getServiceReference(AriesApplicationResolver.class.getName());
        ServiceReference packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
                             
View Full Code Here

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

   
    private void install() throws Exception {

        BundleContext bundleContext = bundle.getBundleContext();
       
        AriesApplicationResolver resolver = null;

        ServiceReference ref = bundleContext.getServiceReference(AriesApplicationResolver.class.getName());

        if (ref != null) {
            resolver = (AriesApplicationResolver) bundleContext.getService(ref);
        }

        if (resolver == null) {
            throw new ManagementException("AriesApplicationResolver service not found");
        }

        DeploymentMetadata meta = application.getDeploymentMetadata();
       
        List<DeploymentContent> bundlesToInstall = new ArrayList<DeploymentContent>();
        bundlesToInstall.addAll(meta.getApplicationDeploymentContents());
        bundlesToInstall.addAll(meta.getApplicationProvisionBundles());
       
        applicationBundles = new HashSet<Bundle>();
        try {
            for (DeploymentContent content : bundlesToInstall) {
                String bundleSymbolicName = content.getContentName();
                Version bundleVersion = content.getExactVersion();

                BundleInfo bundleInfo = null;

                for (BundleInfo info : application.getBundleInfo()) {
                    if (info.getSymbolicName().equals(bundleSymbolicName)
                        && info.getVersion().equals(bundleVersion)) {
                        bundleInfo = info;
                        break;
                    }
                }

                if (bundleInfo == null) {
                    // call out to the bundle repository.
                    bundleInfo = resolver.getBundleInfo(bundleSymbolicName, bundleVersion);
                }

                if (bundleInfo == null) {
                    throw new ManagementException("Cound not find bundles: " + bundleSymbolicName + "_" + bundleVersion);
                }
View Full Code Here

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

   
    private void install(DeploymentMetadataFactory deploymentFactory) throws Exception {

        BundleContext bundleContext = bundle.getBundleContext();
       
        AriesApplicationResolver resolver = null;
        PackageAdmin packageAdmin = null;
       
        ServiceReference resolverRef = bundleContext.getServiceReference(AriesApplicationResolver.class.getName());
        ServiceReference packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
                             
View Full Code Here

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

    _application = app;
    _bundles = new HashMap<BundleInfo, Bundle>();
   
    DeploymentMetadata meta = _application.getDeploymentMetadata();
   
    AriesApplicationResolver resolver = null;
   
    ServiceReference ref = b.getServiceReference(AriesApplicationResolver.class.getName());

    if (ref != null) resolver = (AriesApplicationResolver) b.getService(ref);
   
    if (resolver == null) {
      throw new ManagementException(new ServiceException(AriesApplicationResolver.class.getName(), ServiceException.UNREGISTERED));
    }
   
    try {
      List<DeploymentContent> bundlesToInstall = new ArrayList<DeploymentContent>(meta.getApplicationDeploymentContents());
      bundlesToInstall.addAll(meta.getApplicationProvisionBundles());
     
      for (DeploymentContent content : bundlesToInstall) {
        String bundleSymbolicName = content.getContentName();
        Version bundleVersion = content.getExactVersion();
       
        BundleInfo bundleInfo = null;
       
        for (BundleInfo info : _application.getBundleInfo()) {
          if (info.getSymbolicName().equals(bundleSymbolicName) &&
              info.getVersion().equals(bundleVersion)) {
            bundleInfo = info;
            break;
          }
        }
       
        if (bundleInfo == null) {
          // call out to the bundle repository.
          bundleInfo = resolver.getBundleInfo(bundleSymbolicName, bundleVersion);
        }
       
        if (bundleInfo == null) {
          throw new ManagementException("Cound not find bundles: " + bundleSymbolicName + "_" + bundleVersion);
        }
View Full Code Here

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

    _application = app;
    _bundles = new HashMap<BundleInfo, Bundle>();
   
    DeploymentMetadata meta = _application.getDeploymentMetadata();
               
    AriesApplicationResolver resolver = null;
    PackageAdmin packageAdmin = null;
   
    ServiceReference resolverRef = b.getServiceReference(AriesApplicationResolver.class.getName());
    ServiceReference packageAdminRef = b.getServiceReference(PackageAdmin.class.getName());
   
View Full Code Here

Examples of org.apache.aries.application.management.spi.resolve.AriesApplicationResolver

     
      ModelledResourceManager mrm = context().getService(ModelledResourceManager.class);
      ModelledResource aBundle = mrm.getModelledResource(FileSystem.getFSRoot(new File("a.bundle.jar")));
      ModelledResource bBundle = mrm.getModelledResource(FileSystem.getFSRoot(new File("b.bundle.jar")));
     
      AriesApplicationResolver resolver = context().getService(AriesApplicationResolver.class);
      return resolver.resolveInIsolation("test.app", "1.0.0",
              Arrays.asList(aBundle, bBundle),
              Arrays.<Content>asList(ContentFactory.parseContent("a.bundle", "1.0.0"), ContentFactory.parseContent("b.bundle", "1.0.0")));
  }
View Full Code Here

Examples of org.apache.aries.application.management.spi.resolve.AriesApplicationResolver

    _application = app;
    _bundles = new HashMap<BundleInfo, Bundle>();
   
    DeploymentMetadata meta = _application.getDeploymentMetadata();
               
    AriesApplicationResolver resolver = null;
    PackageAdmin packageAdmin = null;
   
    ServiceReference resolverRef = b.getServiceReference(AriesApplicationResolver.class.getName());
    ServiceReference packageAdminRef = b.getServiceReference(PackageAdmin.class.getName());
   
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.