@Override
public Manifest generateDeploymentManifest(AriesApplication app, ResolveConstraint... constraints ) throws ResolverException
{
_logger.debug(LOG_ENTRY, "generateDeploymentManifest", new Object[]{app, constraints});
ApplicationMetadata appMetadata = app.getApplicationMetadata();
Collection<ModelledResource> byValueBundles = null;
try {
// find out blueprint information
byValueBundles = getByValueBundles(app);
// find out by value bundles and then by reference bundles
} catch (Exception e) {
throw new ResolverException (e);
}
Collection<Content> bundlesToResolve = new ArrayList<Content>();
bundlesToResolve.addAll(appMetadata.getApplicationContents());
bundlesToResolve.addAll(app.getApplicationMetadata().getUseBundles());
//If we pass in provision bundles (e.g. import deployment manifest sanity check), we add them into our bundlesToResolve set.
// This is because we want to make sure all bundles we passed into resolver the same as what we are going to get from resolver.
List<Content> restrictedReqs = new ArrayList<Content>();
for (ResolveConstraint constraint : constraints ) {
Content content = ContentFactory.parseContent(constraint.getBundleName(), constraint.getVersionRange().toString());
restrictedReqs.add(content);
}
DeployedBundles deployedBundles = generateDeployedBundles (appMetadata,
byValueBundles, restrictedReqs);
Manifest man = generateDeploymentManifest(appMetadata.getApplicationSymbolicName(),
appMetadata.getApplicationVersion().toString(), deployedBundles);
_logger.debug(LOG_EXIT, "generateDeploymentManifest", new Object[] {man});
return man;
}