private IStatus executePlan(IProvisioningPlan plan, ProvisioningContext provisioningContext, IProgressMonitor monitor) { IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME); IPhaseSet phaseSet = PhaseSetFactory.createDefaultPhaseSetExcluding(new String[] {PhaseSetFactory.PHASE_COLLECT, PhaseSetFactory.PHASE_CHECK_TRUST}); if (plan.getInstallerPlan() != null) { IStatus installerPlanStatus = engine.perform(plan.getInstallerPlan(), phaseSet, monitor); if (!installerPlanStatus.isOK()) return installerPlanStatus; applyConfiguration(true); } return engine.perform(plan, phaseSet, monitor); }
private IStatus setProperty(String key, String value, ProvisioningContext provisioningContext, IProgressMonitor monitor) { IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME); IProvisioningPlan plan = engine.createPlan(profile, provisioningContext); plan.setProfileProperty(key, value); IPhaseSet phaseSet = PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_PROPERTY}); return engine.perform(plan, phaseSet, monitor); }
IStatus status = engine.perform(plan, phaseSet, new NullProgressMonitor());
public static IStatus executePlan(IProvisioningPlan result, IEngine engine, IPhaseSet phaseSet, ProvisioningContext context, IProgressMonitor progress) { if (!result.getStatus().isOK()) return result.getStatus(); if (result.getInstallerPlan() != null) { IStatus installerPlanStatus = ((IEngine) result.getInstallerPlan().getProfile().getProvisioningAgent().getService(IEngine.SERVICE_NAME)).perform(result.getInstallerPlan(), phaseSet, progress); if (!installerPlanStatus.isOK()) return installerPlanStatus; Configurator configChanger = ServiceHelper.getService(DirectorActivator.context, Configurator.class); try { configChanger.applyConfiguration(); } catch (IOException e) { return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_error_applying_configuration, e); } } return engine.perform(result, phaseSet, progress); } }
if (plan.getInstallerPlan() != null) { ISizingPhaseSet sizingPhaseSet = PhaseSetFactory.createSizingPhaseSet(); IStatus status = engine.perform(plan.getInstallerPlan(), sizingPhaseSet, mon.newChild(100)); if (status.isOK()) installPlanSize = sizingPhaseSet.getDiskSize(); IStatus status = engine.perform(plan, sizingPhaseSet, mon.newChild(200)); if (status.isOK()) return installPlanSize + sizingPhaseSet.getDiskSize();
IStatus downloadStatus = getEngine().perform(downloadPlan, download, mon.newChild(300)); if (!downloadStatus.isOK()) { mon.done(); IStatus installerPlanStatus = getEngine().perform(plan.getInstallerPlan(), set, mon.newChild(100)); if (!installerPlanStatus.isOK()) { mon.done(); return getEngine().perform(plan, set, mon.newChild(500 - ticksUsed));
IStatus downloadStatus = getEngine().perform(downloadPlan, download, mon.newChild(300)); if (!downloadStatus.isOK()) { mon.done(); IStatus installerPlanStatus = getEngine().perform(plan.getInstallerPlan(), set, mon.newChild(100)); if (!installerPlanStatus.isOK()) { mon.done(); return getEngine().perform(plan, set, mon.newChild(500 - ticksUsed));
IStatus result = engine.perform(plan, phases, subMonitor.split(50)); if (!result.isOK()) { throw new CoreException(result);
plan.setProfileProperty(PROP_PROVISION_MODE, TargetDefinitionPersistenceHelper.MODE_PLANNER); plan.setProfileProperty(PROP_ALL_ENVIRONMENTS, Boolean.toString(false)); IStatus result = engine.perform(plan, phases, subMonitor.split(75));
IStatus result = engine.perform(plan, phases, subMonitor.split(100)); if (subMonitor.isCanceled()) { return;