use of org.jboss.galleon.config.ProvisioningConfig in project galleon by wildfly.
the class ProvisioningManager method uninstall.
/**
* Uninstalls the specified feature-pack.
*
* @param fpid feature-pack ID
* @param pluginOptions provisioning plugin options
* @throws ProvisioningException in case of a failure
*/
public void uninstall(FeaturePackLocation.FPID fpid, Map<String, String> pluginOptions) throws ProvisioningException {
ProvisioningConfig config = getProvisioningConfig();
if (config == null || !config.hasFeaturePackDeps()) {
throw new ProvisioningException(Errors.unknownFeaturePack(fpid));
}
try (ProvisioningLayout<FeaturePackRuntimeBuilder> layout = getLayoutFactory().newConfigLayout(config, ProvisioningRuntimeBuilder.FP_RT_FACTORY, false)) {
layout.uninstall(resolveUniverseSpec(fpid.getLocation()).getFPID(), pluginOptions);
doProvision(layout, getFsDiff(), false);
}
}
use of org.jboss.galleon.config.ProvisioningConfig in project galleon by wildfly.
the class State method popState.
private ProvisioningConfig popState(Action action, PmSession pmSession) throws IOException, ProvisioningException {
action.undoAction(builder);
try {
ProvisioningConfig newConfig = buildNewConfig(pmSession);
stack.remove();
return newConfig;
} catch (IOException | ProvisioningException ex) {
action.doAction(config, builder);
throw ex;
}
}
Aggregations