Package org.eclipse.equinox.p2.engine

Examples of org.eclipse.equinox.p2.engine.IProfile


        } catch (ProvisioningException e) {
            log.warn("Profile registry unavailable. Default language will be used.");
            return new Collector();
        }

        IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF);
        if (profile == null) {
            log.warn("Profile unavailable. Default language will be used.");
            return new Collector();
        }
        IUPropertyQuery iuQuery = new IUPropertyQuery(IInstallableUnit.PROP_TYPE_FRAGMENT, "true"); //$NON-NLS-1$
        Collector collected = profile.query(iuQuery, localeFragmentCollector, null);
        LocaleCollectorCache.put(locale, new SoftReference(collected));
        return collected;
    }
View Full Code Here


    }

    public ResolutionResult reviewProfileChangeAction(IProfile profile) throws ProvisioningException {
        ProvisioningPlan plan;
        IPlanner planner;
        IProfile currentProfile;
        IProfile snapshot = ProvisioningUtils.getProfile(IProfileRegistry.SELF, timestamp);
        if (snapshot == null) {
            throw new ProvisioningException("Invalid Profile Configuration");
        }

        planner = ServiceHolder.getPlanner();
View Full Code Here

    }

    public Collector perform() {
        Collector collector = new Collector();
        IQueryable queryable = queryContext.getQueryable();
        IProfile profile = ProvisioningUtils.getProfile();
        if (queryable == null || profile == null) {
            return collector;
        }

        Query query = new IUPropertyQuery(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());

        if (queryContext.isShowLatestVersionsOnly()) {
            query = new CompositeQuery(new Query[]{query, new LatestIUVersionQuery()});
        }

        collector = queryable.query(query, collector, null);

        if (queryContext.isHideAlreadyInstalled()) {
            Collector filteredCollection = new Collector();
            for (Iterator itr = collector.iterator(); itr.hasNext();) {
                IInstallableUnit iu = (IInstallableUnit) itr.next();

                Collector tmpCollector = profile.query(new InstallableUnitQuery(iu.getId()), new Collector(), null);
                if (tmpCollector.size() == 0) {
                    filteredCollection.accept(iu);
                    continue;
                }
                Iterator iter = tmpCollector.iterator();
View Full Code Here

    }

    public Collector perform() {
        Collector collector = new Collector();
        IQueryable queryable = queryContext.getQueryable();
        IProfile profile = ProvisioningUtils.getProfile();
        Query query = queryContext.getQuery();

        if (queryable == null || profile == null) {
            return collector;
        }
View Full Code Here

    injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
  }
 
  @Override
  public void stop(BundleContext context) throws Exception {
    IProvisioningAgent oldAgent = agent;
    agent = null;
    if (oldAgent != null) {
      oldAgent.stop();
    }
   
    injectors.clear();
   
    context = null;
View Full Code Here

      //updateRoamingProperties(profile);
      invokePrivate("updateRoamingProperties",
          new Class[]{IProfile.class}, new Object[]{profile});

      // EV: pull in private fields
      IProvisioningAgent targetAgent = (IProvisioningAgent)this.getPrivateField("targetAgent");
      List<URI> metadataRepositoryLocations = (List<URI>)this.getPrivateField("metadataRepositoryLocations");
      List<URI> artifactRepositoryLocations = (List<URI>)this.getPrivateField("artifactRepositoryLocations");
      boolean followReferences = ((Boolean)this.getPrivateField("followReferences")).booleanValue();
      String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = (String)this.getPrivateField("FOLLOW_ARTIFACT_REPOSITORY_REFERENCES");
View Full Code Here

  }

  @Override
  public void checkUpdate(final Callback<UpdateCheckData> callback) {
    try {
      IProvisioningAgent agent = getProvisioningAgent();
      final ProvisioningSession session = new ProvisioningSession(agent);
      Job o = new Job("Check for Updates") {
       
        @Override
        protected IStatus run(IProgressMonitor monitor) {
View Full Code Here

  }

  private IProvisioningAgent getProvisioningAgent() throws ProvisionException {
    ServiceReference<?> reference = Activator.getContext()
        .getServiceReference(IProvisioningAgent.SERVICE_NAME);
    IProvisioningAgent agent = (IProvisioningAgent) Activator.getContext()
        .getService(reference);
    return agent;
  }
View Full Code Here

 
  public IProvisioningAgent getProvisioningAgent() {
    if (agent == null) {
      ServiceReference<?> serviceReference = context.getServiceReference(IProvisioningAgentProvider.class.getName());
      if (serviceReference != null) {
        IProvisioningAgentProvider agentProvider = (IProvisioningAgentProvider) context.getService(serviceReference);
        if (agentProvider != null) {
          try {
            agent = agentProvider.createAgent(getStateLocation().toFile().toURI());
          } catch (ProvisionException e) {
            getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e));
          } catch (IllegalStateException e) {
            getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e));
          }
View Full Code Here

            }
          } catch (final Throwable _t) {
            if (_t instanceof IllegalStateException) {
              final IllegalStateException e = (IllegalStateException)_t;
            } else if (_t instanceof ProvisionException) {
              final ProvisionException e_1 = (ProvisionException)_t;
            } else if (_t instanceof OperationCanceledException) {
              final OperationCanceledException e_2 = (OperationCanceledException)_t;
            } else {
              throw Exceptions.sneakyThrow(_t);
            }
View Full Code Here

TOP

Related Classes of org.eclipse.equinox.p2.engine.IProfile

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.