Package org.apache.aries.application.management

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


   
    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

   
    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

   
    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

    _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

    _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

Related Classes of org.apache.aries.application.management.AriesApplicationResolver

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.