@Override public IProvisioningAgent getProvisioningAgent() { return profile.getProvisioningAgent(); }
public ProvisioningPlan(IStatus status, IProfile profile, Operand[] operands, ProvisioningContext context, IProvisioningPlan installerPlan) { Assert.isNotNull(profile); this.status = status; this.profile = profile; if (operands != null) this.operands.addAll(Arrays.asList(operands)); this.context = (context == null) ? new ProvisioningContext(profile.getProvisioningAgent()) : context; this.installerPlan = installerPlan; }
public ProvisioningPlan(IStatus status, IProfile profile, Operand[] operands, ProvisioningContext context, IProvisioningPlan installerPlan) { Assert.isNotNull(profile); this.status = status; this.profile = profile; if (operands != null) this.operands.addAll(Arrays.asList(operands)); this.context = (context == null) ? new ProvisioningContext(profile.getProvisioningAgent()) : context; this.installerPlan = installerPlan; }
public static IStatus validateProfile(IProfile profile) { IPlanner planner = (IPlanner) profile.getProvisioningAgent().getService(IPlanner.SERVICE_NAME); IProfileChangeRequest pcr = planner.createChangeRequest(profile); ProvisioningContext ctx = new ProvisioningContext(profile.getProvisioningAgent()); ctx.setMetadataRepositories(new URI[0]); return planner.getProvisioningPlan(pcr, ctx, null).getStatus(); } }
public static IStatus validateProfile(IProfile profile) { IPlanner planner = (IPlanner) profile.getProvisioningAgent().getService(IPlanner.SERVICE_NAME); IProfileChangeRequest pcr = planner.createChangeRequest(profile); ProvisioningContext ctx = new ProvisioningContext(profile.getProvisioningAgent()); ctx.setMetadataRepositories(new URI[0]); return planner.getProvisioningPlan(pcr, ctx, null).getStatus(); } }
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); } }