return output;
}
private void encodeLatestFile(List<Object> latestFilesOutput, Product p)
throws MalformedURLException {
FileManagerUtils fm = new FileManagerUtils(PCSService.conf.getFmUrl());
p.setProductType(fm.safeGetProductTypeById(p.getProductType()
.getProductTypeId()));
p.setProductReferences(fm.safeGetProductReferences(p));
Metadata prodMet = fm.safeGetMetadata(p);
if (prodMet == null)
prodMet = new Metadata();
Map<String, Object> fileOutput = new HashMap<String, Object>();
fileOutput.put("filepath", fm.getFilePath(p));
fileOutput.put("receivedTime", prodMet.getMetadata("CAS."
+ CoreMetKeys.PRODUCT_RECEVIED_TIME) != null ? prodMet
.getMetadata("CAS." + CoreMetKeys.PRODUCT_RECEVIED_TIME) : "UNKNOWN");
latestFilesOutput.add(fileOutput);
}