@Override ProvisioningContext getFirstPassProvisioningContext() { // Set it back to no referencing for first pass in case we reuse this context. context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, null); return context; }
@Override ProvisioningContext getFirstPassProvisioningContext() { // Set it back to no referencing for first pass in case we reuse this context. context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, null); return context; }
/** * Creates a new provisioning context that includes all available metadata and * artifact repositories available to the specified provisioning agent. * * @param agent the provisioning agent from which to obtain any necessary services. */ public ProvisioningContext(IProvisioningAgent agent) { this.agent = agent; // null repos means look at them all metadataRepositories = null; artifactRepositories = null; setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, Boolean.TRUE.toString()); }
/** * Creates a new provisioning context that includes all available metadata and * artifact repositories available to the specified provisioning agent. * * @param agent the provisioning agent from which to obtain any necessary services. */ public ProvisioningContext(IProvisioningAgent agent) { this.agent = agent; // null repos means look at them all metadataRepositories = null; artifactRepositories = null; setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, Boolean.TRUE.toString()); }
public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) { // Follow metadata repository references if the first try fails // There should be real API for this! if (missingRequirement(failedPlan)) context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, Boolean.toString(true)); return context; } };
public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) { // Follow metadata repository references if the first try fails // There should be real API for this! if (missingRequirement(failedPlan)) context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, Boolean.toString(true)); return context; } };
private IProvisioningPlan resolve(IProfileChangeRequest temporaryRequest, IProgressMonitor monitor) { String explainPropertyBackup = null; try { temporaryRequest.setProfileProperty("_internal_user_defined_", "true"); //$NON-NLS-1$//$NON-NLS-2$ if (provisioningContext != null) { explainPropertyBackup = provisioningContext.getProperty(EXPLANATION_ENABLEMENT); provisioningContext.setProperty(EXPLANATION_ENABLEMENT, Boolean.FALSE.toString()); } return planner.getProvisioningPlan(temporaryRequest, provisioningContext, SubMonitor.convert(monitor)); } finally { if (provisioningContext != null) { if (explainPropertyBackup == null) provisioningContext.getProperties().remove(EXPLANATION_ENABLEMENT); else provisioningContext.setProperty(EXPLANATION_ENABLEMENT, explainPropertyBackup); } } }
private IProvisioningPlan resolve(IProfileChangeRequest temporaryRequest, IProgressMonitor monitor) { SubMonitor subMonitor = SubMonitor.convert(monitor, 1); String explainPropertyBackup = null; try { temporaryRequest.setProfileProperty("_internal_user_defined_", "true"); //$NON-NLS-1$//$NON-NLS-2$ if (provisioningContext != null) { explainPropertyBackup = provisioningContext.getProperty(EXPLANATION_ENABLEMENT); provisioningContext.setProperty(EXPLANATION_ENABLEMENT, Boolean.FALSE.toString()); } return planner.getProvisioningPlan(temporaryRequest, provisioningContext, subMonitor.split(1)); } finally { if (provisioningContext != null) { if (explainPropertyBackup == null) provisioningContext.getProperties().remove(EXPLANATION_ENABLEMENT); else provisioningContext.setProperty(EXPLANATION_ENABLEMENT, explainPropertyBackup); } } }
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; }
@Override public IProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor) { SubMonitor sub = SubMonitor.convert(monitor, ExpandWork); sub.setTaskName(Messages.Director_Task_Resolving_Dependencies); try { IProfileChangeRequest profileChangeRequest = FormerState.generateProfileDeltaChangeRequest(currentProfile, targetProfile); ProvisioningContext context = new ProvisioningContext(agent); if (context.getProperty(INCLUDE_PROFILE_IUS) == null) context.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString()); context.setExtraInstallableUnits(Arrays.asList( targetProfile.available(QueryUtil.createIUAnyQuery(), null).toArray(IInstallableUnit.class))); return getProvisioningPlan(profileChangeRequest, context, sub.newChild(ExpandWork / 2)); } finally { sub.done(); } }
context.setProperty(EXPLANATION, new Boolean(Tracing.DEBUG_RECONCILER).toString());