removeProductDocument(product);
}
if (p == null) {
// not in index
throw new CatalogException(
"Attempt to remove metadata to a product: ["
+ product.getProductName()
+ "] that isn't in the index or the local cache!");
}
Metadata currMet = p.getMetadata();
List<Element> metadataTypes = null;
try {
metadataTypes = valLayer.getElements(product.getProductType());
} catch (ValidationLayerException e) {
e.printStackTrace();
throw new CatalogException(
"ValidationLayerException when trying to obtain element list for product type: "
+ product.getProductType().getName()
+ ": Message: " + e.getMessage());
}