use of org.jboss.galleon.config.FeaturePackDepsConfig in project galleon by wildfly.
the class ProvisioningRuntimeBuilder method findFeatureSpec.
private ResolvedFeatureSpec findFeatureSpec(FeaturePackRuntimeBuilder origin, String name, boolean switchOrigin) throws ProvisioningException {
final FeaturePackDepsConfig fpDeps;
if (origin != null) {
if (origin.isFlagOn(FeaturePackRuntimeBuilder.VISIT)) {
return null;
}
final ResolvedFeatureSpec fs = origin.getFeatureSpec(name);
if (fs != null) {
if (switchOrigin) {
currentOrigin = origin;
}
return fs;
}
fpDeps = origin.getSpec();
setFlag(origin, FeaturePackRuntimeBuilder.VISIT);
} else {
fpDeps = config;
}
if (!fpDeps.hasFeaturePackDeps()) {
return null;
}
for (FeaturePackConfig fpDep : fpDeps.getFeaturePackDeps()) {
final ResolvedFeatureSpec fs = findFeatureSpec(layout.getFeaturePack(fpDep.getLocation().getProducer()), name, switchOrigin);
if (fs != null) {
return fs;
}
}
return null;
}
use of org.jboss.galleon.config.FeaturePackDepsConfig in project galleon by wildfly.
the class ProvisioningRuntimeBuilder method getFeatureGroupSpec.
private FeatureGroup getFeatureGroupSpec(FeaturePackRuntimeBuilder origin, String name) throws ProvisioningException {
final FeaturePackDepsConfig fpDeps;
if (origin != null) {
if (origin.isFlagOn(FeaturePackRuntimeBuilder.VISIT)) {
return null;
}
final FeatureGroup fg = origin.getFeatureGroupSpec(name);
if (fg != null) {
currentOrigin = origin;
return fg;
}
fpDeps = origin.getSpec();
setFlag(origin, FeaturePackRuntimeBuilder.VISIT);
} else {
fpDeps = config;
}
if (!fpDeps.hasFeaturePackDeps()) {
return null;
}
for (FeaturePackConfig fpDep : fpDeps.getFeaturePackDeps()) {
final FeatureGroup fg = getFeatureGroupSpec(layout.getFeaturePack(fpDep.getLocation().getProducer()), name);
if (fg != null) {
return fg;
}
}
return null;
}
Aggregations