public PlannerResolutionJob(String label, ProvisioningSession session, String profileId, ProfileChangeRequest request, ProvisioningContext context, IFailedStatusEvaluator evaluator, MultiStatus additionalStatus) { super(label, session); this.request = request; this.profileId = profileId; if (context == null) firstPass = new ProvisioningContext(session.getProvisioningAgent()); else firstPass = context; this.evaluator = evaluator; Assert.isNotNull(additionalStatus); this.additionalStatus = additionalStatus; }
/** * Create an operation using the provided provisioning session. * Unless otherwise specified by the client, the operation is * performed on the currently running profile. * * @param session the provisioning session providing the services */ protected ProfileChangeOperation(ProvisioningSession session) { this.session = session; this.profileId = IProfileRegistry.SELF; this.context = new ProvisioningContext(session.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; }
/** * Create an operation using the provided provisioning session. * Unless otherwise specified by the client, the operation is * performed on the currently running profile. * * @param session the provisioning session providing the services */ protected ProfileChangeOperation(ProvisioningSession session) { this.session = session; this.profileId = IProfileRegistry.SELF; this.context = new ProvisioningContext(session.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 PlannerResolutionJob(String label, ProvisioningSession session, String profileId, ProfileChangeRequest request, ProvisioningContext context, IFailedStatusEvaluator evaluator, MultiStatus additionalStatus) { super(label, session); this.request = request; this.profileId = profileId; if (context == null) firstPass = new ProvisioningContext(session.getProvisioningAgent()); else firstPass = context; this.evaluator = evaluator; Assert.isNotNull(additionalStatus); this.additionalStatus = additionalStatus; }
private ProvisioningContext createProvisioningContext(Collection<URI> repos, IProvisioningAgent agent) { ProvisioningContext ctx = new ProvisioningContext(agent); if (repos != null) { ctx.setMetadataRepositories(repos.toArray(new URI[repos.size()])); ctx.setArtifactRepositories(repos.toArray(new URI[repos.size()])); } return ctx; }
private ProvisioningContext createProvisioningContext(Collection<URI> repos, IProvisioningAgent agent) { ProvisioningContext ctx = new ProvisioningContext(agent); if (repos != null) { ctx.setMetadataRepositories(repos.toArray(new URI[repos.size()])); ctx.setArtifactRepositories(repos.toArray(new URI[repos.size()])); } return ctx; }
protected IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) { checkArguments(iprofile, phaseSet, operands, context, monitor); if (context == null) context = new ProvisioningContext(agent); if (monitor == null) monitor = new NullProgressMonitor(); ActionManager actionManager = (ActionManager) agent.getService(ActionManager.SERVICE_NAME); return phaseSet.validate(actionManager, iprofile, operands, context, monitor); }
protected IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) { checkArguments(iprofile, phaseSet, operands, context, monitor); if (context == null) context = new ProvisioningContext(agent); if (monitor == null) monitor = new NullProgressMonitor(); ActionManager actionManager = (ActionManager) agent.getService(ActionManager.SERVICE_NAME); return phaseSet.validate(actionManager, iprofile, operands, context, monitor); }
@Override ProvisioningContext getFirstPassProvisioningContext() { ProvisioningContext pc = new ProvisioningContext(session.getProvisioningAgent()); pc.setMetadataRepositories(new URI[0]); pc.setArtifactRepositories(new URI[0]); return pc; }
private ProvisioningContext makeProvisioningContext(URI[] repos) { if (repos != null) { ProvisioningContext context = new ProvisioningContext(getSession().getProvisioningAgent()); context.setMetadataRepositories(repos); context.setArtifactRepositories(repos); return context; } // look everywhere return new ProvisioningContext(getSession().getProvisioningAgent()); }
@Override ProvisioningContext getFirstPassProvisioningContext() { ProvisioningContext pc = new ProvisioningContext(session.getProvisioningAgent()); pc.setMetadataRepositories(new URI[0]); pc.setArtifactRepositories(new URI[0]); return pc; }
protected ProvisioningContext getProvisioningContext() { if (operation != null) { return operation.getProvisioningContext(); } return new ProvisioningContext(ui.getSession().getProvisioningAgent()); }
private ProvisioningContext createNoRepoContext(ProfileChangeRequest request) { ProvisioningContext noRepoContext = new ProvisioningContext(agent); noRepoContext.setMetadataRepositories(new URI[0]); noRepoContext.setArtifactRepositories(new URI[0]); noRepoContext.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString()); noRepoContext.setExtraInstallableUnits(new ArrayList<>(request.getProfile() .query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor()).toUnmodifiableSet())); return noRepoContext; }
public ProvisioningContext getProvisioningContext() { ProvisioningContext context = new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent()); context.setArtifactRepositories(artiURIs); context.setMetadataRepositories(metaURIs); return context; } }
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(); } }
private ProvisioningContext getProvisioningContext() { ProvisioningContext context = new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent()); if (hasQueryable() && getQueryable() instanceof IRepository<?>) { context.setMetadataRepositories(new URI[] {((IRepository<?>) getQueryable()).getLocation()}); } return context; }
protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) { IPlanner planner = getPlanner(); IProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID); if (iuToBeUpdated.getId().equals(getIU().getId())) request.remove(iuToBeUpdated); request.add(getIU()); return planner.getProvisioningPlan(request, new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent()), monitor); }