if (composites != null && composites.length > 1) {
// Create an aggregated composite that includes all the composites as Node API only takes one composite
String content = createDeploymentComposite(applicationClassLoader, composites);
// Create SCA contributions
for (String location : contributionURLs) {
contributions.add(new SCAContribution(location, location));
}
node =
factory.createSCANode("http://tuscany.apache.org/xmlns/sca/1.0/aggregated", content, contributions
.toArray(new SCAContribution[contributions.size()]));
} else {
for (String location : contributionURLs) {
contributions.add(new SCAContribution(location, location));
}
String composite = (composites != null && composites.length >= 1) ? composites[0] : null;
if (!contributions.isEmpty()) {
node =
factory.createSCANode(composite, contributions.toArray(new SCAContribution[contributions.size()]));