/** * Query for available updates and patches for feature-packs in this layout. * * @param includeTransitive whether to include transitive dependencies into the result * @return available updates * @throws ProvisioningException in case of a failure */ public ProvisioningPlan getUpdates(boolean includeTransitive) throws ProvisioningException { final ProvisioningConfig config = getProvisioningConfig(); ProvisioningPlan plan; if (config == null) { plan = ProvisioningPlan.builder(); } else { try (ProvisioningLayout<?> layout = getLayoutFactory().newConfigLayout(config)) { plan = layout.getUpdates(includeTransitive); } } return plan; }
/** * Query for available updates and patches for specific producers. * If no producer is passed as an argument, the method will return * the update plan for only the feature-packs installed directly by the user. * * @param producers producers to include into the update plan * @return update plan * @throws ProvisioningException in case of a failure */ public ProvisioningPlan getUpdates(ProducerSpec... producers) throws ProvisioningException { final ProvisioningConfig config = getProvisioningConfig(); ProvisioningPlan plan; if (config == null) { plan = ProvisioningPlan.builder(); } else { try (ProvisioningLayout<?> layout = getLayoutFactory().newConfigLayout(config)) { plan = layout.getUpdates(producers); } } return plan; }
private ProvisioningPlan getUpdatesInternal(Collection<ProducerSpec> producers) throws ProvisioningException { final ProvisioningPlan plan = ProvisioningPlan.builder(); updatesTracker = getUpdatesTracker(); updatesTracker.starting(producers.size()); for(ProducerSpec producer : producers) { updatesTracker.processing(producer); final FeaturePackUpdatePlan fpPlan = getFeaturePackUpdate(producer); if(!fpPlan.isEmpty()) { plan.update(fpPlan); } updatesTracker.processed(producer); } updatesTracker.complete(); return plan; }
plan = mgr.getUpdates(resolved.toArray(arr)); } else { plan = ProvisioningPlan.builder();