Search in sources :

Example 1 with StateDiffPlugin

use of org.jboss.galleon.plugin.StateDiffPlugin in project galleon by wildfly.

the class ProvisioningManager method getDiffMergedConfig.

private ProvisioningDiffProvider getDiffMergedConfig() throws ProvisioningException {
    final FsDiff diff = getFsDiff();
    if (diff == null || diff.isEmpty()) {
        return null;
    }
    try (ProvisioningLayout<FeaturePackRuntimeBuilder> layout = layoutFactory.newConfigLayout(getProvisioningConfig(), ProvisioningRuntimeBuilder.FP_RT_FACTORY, false)) {
        final ProvisioningDiffProvider diffProvider = ProvisioningDiffProvider.newInstance(layout, getProvisionedState(), diff, log);
        layout.visitPlugins(new FeaturePackPluginVisitor<StateDiffPlugin>() {

            @Override
            public void visitPlugin(StateDiffPlugin plugin) throws ProvisioningException {
                plugin.diff(diffProvider);
            }
        }, StateDiffPlugin.class);
        return diffProvider;
    }
}
Also used : FeaturePackRuntimeBuilder(org.jboss.galleon.runtime.FeaturePackRuntimeBuilder) ProvisioningDiffProvider(org.jboss.galleon.diff.ProvisioningDiffProvider) FsDiff(org.jboss.galleon.diff.FsDiff) StateDiffPlugin(org.jboss.galleon.plugin.StateDiffPlugin)

Aggregations

FsDiff (org.jboss.galleon.diff.FsDiff)1 ProvisioningDiffProvider (org.jboss.galleon.diff.ProvisioningDiffProvider)1 StateDiffPlugin (org.jboss.galleon.plugin.StateDiffPlugin)1 FeaturePackRuntimeBuilder (org.jboss.galleon.runtime.FeaturePackRuntimeBuilder)1