@Override public void visitPlugin(InstallPlugin plugin) throws ProvisioningException { plugin.postInstall(ProvisioningRuntime.this); } }, InstallPlugin.class);
@Override public void visitPlugin(StateDiffPlugin plugin) throws ProvisioningException { plugin.diff(diffProvider); } }, StateDiffPlugin.class);
@Override public void visitPlugin(InstallPlugin plugin) throws ProvisioningException { plugin.preInstall(ProvisioningRuntime.this); } }, InstallPlugin.class);
handler.prepare(this); ResolvedSpecId lastHandledSpecId = null; for(ResolvedFeature feature : features) { if(feature.isBranchStart()) { handler.startBranch(); handler.startBatch(); handler.nextFeaturePack(feature.spec.id.producer.getLocation().getFPID()); handler.nextSpec(feature.spec); lastHandledSpecId = feature.getSpecId(); handler.nextFeature(feature); if(feature.isBatchEnd()) { handler.endBatch(); handler.endBranch(); handler.done();
@Override public void handle(ProvisionedConfigHandler handler) throws ProvisioningException { if (!hasFeatures()) { return; } handler.prepare(this); ResolvedSpecId lastHandledSpecId = null; for(ProvisionedFeature feature : features) { if(!feature.getSpecId().equals(lastHandledSpecId)) { if (lastHandledSpecId == null || !feature.getSpecId().getProducer().equals(lastHandledSpecId.getProducer())) { handler.nextFeaturePack(feature.getSpecId().getProducer().getLocation().getFPID()); } // TODO: complete spec isn't available here, but specId is enough for marshalling handler.nextSpec(new ResolvedFeatureSpec(feature.getSpecId(), null, FeatureSpec.builder().build())); lastHandledSpecId = feature.getSpecId(); } handler.nextFeature(feature); } handler.done(); }
@Override public void visitPlugin(InstallPlugin plugin) throws ProvisioningException { processOptions(plugin.getOptions().values(), extraOptions, recognizedOptions, overridenOptions); }}, InstallPlugin.class);
@Override public PluginOption build() { return new PluginOption(this); } }
public String getCustomContent() { if (customContent == null) { return null; } return customContent.getInfo(); }
public static Builder builder(String name) { return new Builder(name); }
@Override public void visitPlugin(StateDiffPlugin plugin) throws ProvisioningException { diffOptions.addAll(plugin.getOptions().values()); } };
@Override public Map<String, ProvisioningOption> getOptions() { if(pluginOptions == null) { final List<ProvisioningOption> options= initPluginOptions(); if(options.isEmpty()) { pluginOptions = Collections.emptyMap(); } else if(options.size() == 1) { final ProvisioningOption option = options.get(0); pluginOptions = Collections.singletonMap(option.getName(), option); } else { pluginOptions = new HashMap<>(options.size()); for(int i = 0; i < options.size(); ++i) { final ProvisioningOption option = options.get(i); pluginOptions.put(option.getName(), option); } } } return pluginOptions; }
PackageInfo(PackageRuntime pkg, Identity identity, CliPlugin plugin) throws IOException, ProvisioningException { this.pkg = pkg; this.fpid = pkg.getFeaturePackRuntime().getFPID(); this.identity = identity; this.contentDir = pkg.getContentDir(); this.spec = pkg.getSpec(); customContent = plugin == null ? null : plugin.handlePackageContent(pkg); if (customContent == null) { fillContent(); } }
@Override public void visitPlugin(InstallPlugin plugin) throws ProvisioningException { pluginOptions.addAll(plugin.getOptions().values()); } };
@Override public void visitPlugin(InstallPlugin plugin) throws ProvisioningException { installOptions.addAll(plugin.getOptions().values()); } };