use of org.jboss.galleon.xml.util.ElementNode in project galleon by wildfly.
the class PackageXmlWriter method writePackageDependency.
private static void writePackageDependency(ElementNode deps, PackageDependencySpec depSpec, String ns) {
final ElementNode depElement = addElement(deps, PackageDepsSpecXmlParser.PACKAGE, ns);
addAttribute(depElement, Attribute.NAME, depSpec.getName());
if (depSpec.isOptional()) {
if (depSpec.isPassive()) {
addAttribute(depElement, PackageDepsSpecXmlParser.Attribute.PASSIVE, TRUE);
} else {
addAttribute(depElement, PackageDepsSpecXmlParser.Attribute.OPTIONAL, TRUE);
}
}
}
use of org.jboss.galleon.xml.util.ElementNode in project galleon by wildfly.
the class ProvisioningXmlWriter method writeUniverseSpecs.
static void writeUniverseSpecs(FeaturePackDepsConfig fpDeps, final ElementNode parent) {
ElementNode universesEl = null;
UniverseSpec universeSpec = fpDeps.getDefaultUniverse();
if (universeSpec != null) {
universesEl = addElement(parent, Element.UNIVERSES.getLocalName(), parent.getNamespace());
writeUniverseConfig(universesEl, null, universeSpec.getFactory(), universeSpec.getLocation());
}
if (fpDeps.hasUniverseNamedSpecs()) {
if (universesEl == null) {
universesEl = addElement(parent, Element.UNIVERSES.getLocalName(), parent.getNamespace());
}
for (Map.Entry<String, UniverseSpec> universe : fpDeps.getUniverseNamedSpecs().entrySet()) {
writeUniverseConfig(universesEl, universe.getKey(), universe.getValue().getFactory(), universe.getValue().getLocation());
}
}
}
Aggregations