public ProvisioningRuntime getRuntime(ProvisioningConfig provisioningConfig) throws ProvisioningException { return getRuntimeInternal(newConfigLayout(provisioningConfig, Collections.emptyMap()), null); }
/** * (Re-)provisions the current installation to the desired specification. * * @param provisioningConfig the desired installation specification * @param options feature-pack plug-ins options * @throws ProvisioningException in case provisioning fails */ public void provision(ProvisioningConfig provisioningConfig, Map<String, String> options) throws ProvisioningException { try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = newConfigLayout(provisioningConfig, options)) { doProvision(layout, getFsDiff(), false); } }
/** * Goes back to the previous provisioning state recorded in the provisioning state history. * If the history is empty, the method throws an exception. * * @throws ProvisioningException in case of a failure */ public void undo() throws ProvisioningException { try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = newConfigLayout(StateHistoryUtils.readUndoConfig(home, log), Collections.emptyMap())) { doProvision(layout, getFsDiff(), true); } }
/** * Provision the state described in the specified XML file. * * @param provisioningXml file describing the desired provisioned state * @param options feature-pack plug-ins options * @throws ProvisioningException in case provisioning fails */ public void provision(Path provisioningXml, Map<String, String> options) throws ProvisioningException { try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = newConfigLayout(ProvisioningXmlParser.parse(provisioningXml), options)) { doProvision(layout, getFsDiff(), false); } }