use of org.jboss.galleon.cli.model.ConfigInfo in project galleon by wildfly.
the class AbstractLayersCommand method getConfiguration.
protected ConfigInfo getConfiguration(State state) throws PathParserException, PathConsumerException, ProvisioningException, Exception {
String path = FeatureContainerPathConsumer.FINAL_CONFIGS_PATH + configuration + PathParser.PATH_SEPARATOR;
FeatureContainerPathConsumer consumer = new FeatureContainerPathConsumer(state.getContainer(), false);
PathParser.parse(path, consumer);
ConfigInfo ci = consumer.getConfig();
if (ci == null) {
throw new ProvisioningException("Not a valid config " + configuration);
}
return ci;
}
use of org.jboss.galleon.cli.model.ConfigInfo in project galleon by wildfly.
the class ConfigurationUtil method getConfig.
private static ConfigInfo getConfig(PmSession session, FPID fpid, String configuration) throws ProvisioningException, IOException, PathParserException, PathConsumerException {
String path = FeatureContainerPathConsumer.FINAL_CONFIGS_PATH + configuration + PathParser.PATH_SEPARATOR;
FeatureContainer full = FeatureContainers.fromFeaturePackId(session, fpid, null);
ConfigInfo ci = null;
try {
FeatureContainerPathConsumer consumer = new FeatureContainerPathConsumer(full, false);
PathParser.parse(path, consumer);
ci = consumer.getConfig();
} catch (PathParserException | PathConsumerException ex) {
// XXX OK, return null
}
return ci;
}
use of org.jboss.galleon.cli.model.ConfigInfo in project galleon by wildfly.
the class StateResetConfigCommand method getConfiguration.
protected ConfigInfo getConfiguration(State state) throws PathParserException, PathConsumerException, ProvisioningException, Exception {
String path = FeatureContainerPathConsumer.FINAL_CONFIGS_PATH + configuration + PathParser.PATH_SEPARATOR;
FeatureContainerPathConsumer consumer = new FeatureContainerPathConsumer(state.getContainer(), false);
PathParser.parse(path, consumer);
ConfigInfo ci = consumer.getConfig();
if (ci == null) {
throw new ProvisioningException("Not a valid config " + configuration);
}
return ci;
}
Aggregations