for (Iterator j = page.getPageProducts().iterator(); j
.hasNext();) {
Product p = (Product) j.next();
p.setProductReferences(fmgrClient.getProductReferences(p));
Metadata met = fmgrClient.getMetadata(p);
Reference r = ((Reference) p.getProductReferences().get(0));
String newLocPath = PathUtils.replaceEnvVariables(
this.pathSpec, met);
if (locationsMatch(r.getDataStoreReference(), newLocPath)) {
LOG.log(Level.INFO, "Current and New locations match. "+p.getProductName()+" was not moved.");
continue;
}
LOG.log(Level.INFO, "Moving product: ["
+ p.getProductName() + "] from: ["
+ new File(new URI(r.getDataStoreReference()))
+ "] to: [" + newLocPath + "]");
long timeBefore = System.currentTimeMillis();
fmgrClient.moveProduct(p, newLocPath);
long timeAfter = System.currentTimeMillis();
double seconds = ((timeAfter - timeBefore) * 1.0) / (1000.0);