/**
* Use Description, Name and IconPath.
*/
private static ProductSectionType createProductSection(final TemplateDto disk) throws Exception
{
ProductSectionType product = new ProductSectionType();
product.setInfo(CIMTypesUtils.createMsg(disk.getDescription(), "0"));
product.setProduct(CIMTypesUtils.createMsg(disk.getName(), "0"));
product.getCategoryOrProperty().add(createProperty("user", disk.getLoginUser()));
product.getCategoryOrProperty().add(createProperty("password", disk.getLoginPassword()));
final String diskIcon = disk.getIconUrl();
if (diskIcon != null)
{
Icon icon = OVFProductUtils.createIcon(50, 50, "jpg", diskIcon); // XXX icon
// details
OVFProductUtils.addProductIcon(product, icon);
}
// warn
product.getOtherAttributes().put(new QName("CategoryName"), disk.getCategoryName());
return product;
}