Search in sources :

Example 1 with FeatureGroupSupport

use of org.jboss.galleon.config.FeatureGroupSupport in project galleon by wildfly.

the class ProvisioningRuntimeBuilder method popLayer.

private FeatureGroupSupport popLayer(ConfigModelStack layerStack) throws ProvisioningException {
    final FeatureGroupSupport fg = layerStack.peekAtGroup();
    if (!(fg instanceof ConfigLayerSpec)) {
        throw new ProvisioningException("Expected config layer but got " + fg);
    }
    final ConfigLayerSpec layer = (ConfigLayerSpec) fg;
    if (layer.hasLayerDeps()) {
        for (ConfigLayerDependency dep : layer.getLayerDeps()) {
            layerStack.addLayerDep(dep);
        }
    }
    layerStack.popGroup();
    return fg;
}
Also used : FeatureGroupSupport(org.jboss.galleon.config.FeatureGroupSupport) ProvisioningException(org.jboss.galleon.ProvisioningException) ConfigLayerSpec(org.jboss.galleon.spec.ConfigLayerSpec) ConfigLayerDependency(org.jboss.galleon.spec.ConfigLayerDependency)

Example 2 with FeatureGroupSupport

use of org.jboss.galleon.config.FeatureGroupSupport in project galleon by wildfly.

the class ProvisioningRuntimeBuilder method processFeatureGroup.

private void processFeatureGroup(FeatureGroupSupport includedFg) throws ProvisioningException {
    final boolean pushed = configStack.pushGroup(includedFg);
    final FeaturePackRuntimeBuilder originalOrigin = currentOrigin;
    try {
        final FeatureGroupSupport originalFg = getFeatureGroupSpec(includedFg.getName());
        if (originalFg.hasPackageDeps()) {
            processPackageDeps(originalFg, null);
        }
        if (!pushed) {
            return;
        }
        processConfigItemContainer(originalFg);
    } finally {
        currentOrigin = originalOrigin;
    }
    configStack.popGroup();
    if (includedFg.hasItems()) {
        processConfigItemContainer(includedFg);
    }
}
Also used : FeatureGroupSupport(org.jboss.galleon.config.FeatureGroupSupport)

Aggregations

FeatureGroupSupport (org.jboss.galleon.config.FeatureGroupSupport)2 ProvisioningException (org.jboss.galleon.ProvisioningException)1 ConfigLayerDependency (org.jboss.galleon.spec.ConfigLayerDependency)1 ConfigLayerSpec (org.jboss.galleon.spec.ConfigLayerSpec)1