// add the composites into the domain model
for (Artifact artifact : contribution.getArtifacts()) {
if (artifact.getModel() instanceof Composite) {
Composite composite = (Composite)artifact.getModel();
CompositeModel compositeModel = domainModelFactory.createComposite();
compositeModel.setCompositeQName(composite.getName());
compositeModel.setComposite(composite);
contributionModel.getComposites().put(compositeModel.getCompositeQName(), compositeModel);
}
}
// add the deployable composite info to the domain model
for (Composite composite : contribution.getDeployables()) {
CompositeModel compositeModel = contributionModel.getComposites().get(composite.getName());
if (compositeModel != null){
contributionModel.getDeployableComposites().put(compositeModel.getCompositeQName(), compositeModel);
} else {
throw new DomainException("Deployable composite name " +
composite.getName() +
" doesn't match a composite in the contribution " +
contributionURI );