Search in sources :

Example 26 with FeatureConfig

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");
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Example 27 with FeatureConfig

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");
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Example 28 with FeatureConfig

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");
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Example 29 with FeatureConfig

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());
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Example 30 with FeatureConfig

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;
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Aggregations

FeatureConfig (org.jboss.galleon.config.FeatureConfig)76 StateDiffPlugin (org.jboss.galleon.plugin.StateDiffPlugin)8 FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)6 FeaturePackCreator (org.jboss.galleon.creator.FeaturePackCreator)5 Test (org.junit.Test)4 Map (java.util.Map)3 FeatureId (org.jboss.galleon.spec.FeatureId)3 LinkedHashMap (java.util.LinkedHashMap)2 XMLStreamException (javax.xml.stream.XMLStreamException)2 ProvisioningDescriptionException (org.jboss.galleon.ProvisioningDescriptionException)2 ProvisioningConfig (org.jboss.galleon.config.ProvisioningConfig)2 HashMap (java.util.HashMap)1 ProvisioningException (org.jboss.galleon.ProvisioningException)1 ConfigId (org.jboss.galleon.config.ConfigId)1 FeatureGroup (org.jboss.galleon.config.FeatureGroup)1 FeaturePackConfig (org.jboss.galleon.config.FeaturePackConfig)1 ResolvedSpecId (org.jboss.galleon.runtime.ResolvedSpecId)1 FeaturePackSpec (org.jboss.galleon.spec.FeaturePackSpec)1 SpecId (org.jboss.galleon.spec.SpecId)1 BasicStateDiffPlugin (org.jboss.galleon.userchanges.persist.test.BasicStateDiffPlugin)1