Package org.broadleafcommerce.common.extension

Examples of org.broadleafcommerce.common.extension.ExtensionResultHolder


        log.debug(tc.toString());
    }
   
    @Override
    public void preValidateCartOperation(Order cart) {
        ExtensionResultHolder erh = new ExtensionResultHolder();
        extensionManager.getProxy().preValidateCartOperation(cart, erh);
        if (erh.getThrowable() instanceof IllegalCartOperationException) {
            throw ((IllegalCartOperationException) erh.getThrowable());
        } else if (erh.getThrowable() != null) {
            throw new RuntimeException(erh.getThrowable());
        }
    }
View Full Code Here


                    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);
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.common.extension.ExtensionResultHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.