String rootPolicyPath = this.cleanse(CurationService.config
.getPolicyUploadPath());
String policyPath = new File(rootPolicyPath + policy).toURL()
.toExternalForm();
String[] policies = { policyPath };
XMLRepositoryManager repMgr = new XMLRepositoryManager(Arrays
.asList(policies));
ProductType productType = repMgr.getProductTypeByName(productTypeName);
productType.setTypeMetadata(metadata);
CurationXmlStructFactory.writeProductTypeXmlDocument(repMgr
.getProductTypes(), rootPolicyPath + policy + "/product-types.xml");
// refresh the config on the fm end
CurationService.config.getFileManagerClient().refreshConfigAndPolicy();