use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ConfigLayerIncludedInModelOnlyConfigTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).addParam(FeatureParameterSpec.create("p3", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base-prod1").setParam("p2", "base")).addPackageDep("base").build()).addConfig(ConfigModel.builder("model1", null).setProperty("prop1", "value1").includeLayer("base").build()).newPackage("base").writeContent("base.txt", "base");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ConfigLayerWithExcludedOptionalLayerDepTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).addParam(FeatureParameterSpec.create("p3", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base-prod1").setParam("p2", "base")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("main").addLayerDep("base", true).addFeature(new FeatureConfig("specA").setParam("id", "main-prod1").setParam("p2", "main")).addPackageDep("main").build()).newPackage("base").writeContent("base.txt", "base").getFeaturePack().newPackage("main").writeContent("main.txt", "main");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ConfigLayerWithOptionalLayerDepTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).addParam(FeatureParameterSpec.create("p3", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base-prod1").setParam("p2", "base")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("main").addLayerDep("base", true).addFeature(new FeatureConfig("specA").setParam("id", "main-prod1").setParam("p2", "main")).addPackageDep("main").build()).newPackage("base").writeContent("base.txt", "base").getFeaturePack().newPackage("main").writeContent("main.txt", "main");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class BasicFeatureSpecPatchingTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack(fp1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "fp1")).addParam(FeatureParameterSpec.create("p2", "fp1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("id", "1").setParam("p1", "config")).build());
fp1Patch1 = newFpl("prod1", "1", "1.0.0.Patch1.Final");
creator.newFeaturePack(fp1Patch1.getFPID()).setPatchFor(fp1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "fp1")).addParam(FeatureParameterSpec.create("p2", "patched")).addParam(FeatureParameterSpec.create("p3", "patched")).build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class FeatureConfigXmlParser method parse.
@Override
public FeatureConfig parse(final Reader input) throws XMLStreamException {
final FeatureConfig config = new FeatureConfig();
XmlParsers.parse(input, config);
return config;
}
Aggregations