// Read the contribution
Contribution contribution;
try {
contribution = contribution(contributionURI, contributionItem.getAlternate());
} catch (ContributionReadException e) {
throw new NotFoundException(key);
}
// Find the specified deployable composite
QName qname = compositeQName(key);
for (Composite deployable: contribution.getDeployables()) {
if (qname.equals(deployable.getName())) {
// find the deployable composite
deployable = contribution.getModelResolver().resolveModel(Composite.class, deployable);
if (deployable.isUnresolved()) {
throw new NotFoundException(key);
}
// Return an item describing the deployable composite
return item(contribution, deployable);
}
}
throw new NotFoundException(key);
}