public Response getChecksums(@PathParam("modulename") String moduleName,
@PathParam("modulePart") String modulePart) {
// Fetch all of the module parts given the module name. This case
// handles if the module part is null (in which case all module parts)
ChecksumManager checksumManager = ChecksumManager.getChecksumManager();
Map<DeployedAsset, File> partMap = AssetDeployer.getFileMap(moduleName, modulePart);
logger.warning("Fetching checksums for module " + moduleName + " part " +
modulePart);
// Create a checksum list from all of the individual module parts and
// put them into a single map.
ChecksumList checksumList = new ChecksumList();
for (DeployedAsset deployedAsset : partMap.keySet()) {
// Create an proper AssetDeployer using the module name and module
// part. Add to the master list.
ModuleAssetDescriptor mad = new ModuleAssetDescriptor(
deployedAsset.moduleName, deployedAsset.assetType, null);
ChecksumFactory factory = checksumManager.getChecksumFactory(mad);
ChecksumList partList = factory.getChecksumList(mad, ChecksumAction.DO_NOT_GENERATE);
if (partList != null) {
logger.info("Adding found part " + deployedAsset.assetType +
" with size " + partList.getChecksumMap().size());
checksumList.putChecksums(partList.getChecksumMap());