Package org.eclipse.equinox.internal.provisional.p2.metadata.query

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery


    }

    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

                return (haveLocale ? super.accept(object) : true);
            }
        };

        //Due to performance problems we restrict locale lookup to the current profile (see bug 233958)
        IProfileRegistry profileRegistry = null;
        try {
            profileRegistry = (IProfileRegistry) ServiceHolder.getProfileRegistry();
        } 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$
View Full Code Here

            return collector;
        }

        //If the query is not set, return the list of IUs which has the property "org.eclipse.equinox.p2.type.root"
        if (query == null) {
            query = new IUProfilePropertyQuery(profile, IInstallableUnit.PROP_PROFILE_ROOT_IU,
                    Boolean.TRUE.toString());
        }

        return queryable.query(query, collector, null);
    }
View Full Code Here

        }

        long size = 0;
        if (report.getReviewedInstallableUnits().length != 0) {
            size = getSize(plan,
                    plan.getProfileChangeRequest().getProfile(), engine, new ProvisioningContext(), null);
        }
        report.setInstallationSize(getFormattedSize(size));
        return report;
    }
View Full Code Here

    public abstract MultiStatus getInitialStatus();

    private ProvisioningPlan generateProvisioningPlan(ProfileChangeRequest profileChangeRequest)
            throws ProvisioningException {
        IPlanner planner = ServiceHolder.getPlanner();
        ProvisioningContext context = new ProvisioningContext();
        return planner.getProvisioningPlan(profileChangeRequest, context, new NullProgressMonitor());
    }
View Full Code Here

import org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet;
import org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect;

public class DownloadPhaseSet extends PhaseSet {
    public DownloadPhaseSet() {
        super(new Phase[]{new Collect(10)});
    }
View Full Code Here

        if (plan.getOperands().length == 0) {
            return 0;
        }
        long installPlanSize = 0;
        if (plan.getInstallerPlan() != null) {
            SizingPhaseSet set = new SizingPhaseSet(new Sizing(100, "Compute sizes"));
            IStatus status = engine.perform(profile, set, plan.getInstallerPlan().getOperands(), context, null);
            if (status.isOK()) {
                installPlanSize = set.getSizing().getDiskSize();
            }
        }
        SizingPhaseSet set = new SizingPhaseSet(new Sizing(100, "Compute sizes"));
        IStatus status = engine.perform(profile, set, plan.getOperands(), context, null);
        if (status.isOK()) {
            return installPlanSize + set.getSizing().getDiskSize();
        }
        return SIZE_UNAVAILABLE;
View Full Code Here

        if (plan.getOperands().length == 0) {
            return 0;
        }
        long installPlanSize = 0;
        if (plan.getInstallerPlan() != null) {
            SizingPhaseSet set = new SizingPhaseSet(new Sizing(100, "Compute sizes"));
            IStatus status = engine.perform(profile, set, plan.getInstallerPlan().getOperands(),
                    context, null);
            if (status.isOK()) {
                installPlanSize = set.getSizing().getDiskSize();
            }
        }
        SizingPhaseSet set = new SizingPhaseSet(new Sizing(100, "Compute sizes"));
        IStatus status = engine.perform(profile, set, plan.getOperands(), context, null);
        if (status.isOK()) {
            return installPlanSize + set.getSizing().getDiskSize();
        }
        return SIZE_UNAVAILABLE;
View Full Code Here

TOP

Related Classes of org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery

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.