updateItemAdjustment(itemAdjustment, adjustment);
}
} else {
// Add a new adjustment
final OrderItemPriceDetailAdjustment newItemAdjustment;
ExtensionResultHolder resultHolder = new ExtensionResultHolder();
if (extensionManager != null) {
extensionManager.getProxy().createOrderItemPriceDetailAdjustment(resultHolder, itemDetail);
}
if (resultHolder != null && resultHolder.getContextMap().containsKey("OrderItemPriceDetailAdjustment")) {
newItemAdjustment = (OrderItemPriceDetailAdjustment) resultHolder.getContextMap().get("OrderItemPriceDetailAdjustment");
} else {
newItemAdjustment = offerDao.createOrderItemPriceDetailAdjustment();
}
newItemAdjustment.init(itemDetail, adjustment.getOffer(), null);
updateItemAdjustment(newItemAdjustment, adjustment);