Liferay 6.2-ce-ga5

com.liferay.portlet.shopping.util
Class ShoppingUtil

java.lang.Object
  extended by com.liferay.portlet.shopping.util.ShoppingUtil

public class ShoppingUtil
extends Object


Constructor Summary
ShoppingUtil()
           
 
Method Summary
static double calculateActualPrice(ShoppingItem item)
           
static double calculateActualPrice(ShoppingItem item, int count)
           
static double calculateActualPrice(ShoppingItemPrice itemPrice)
           
static double calculateActualSubtotal(List<ShoppingOrderItem> orderItems)
           
static double calculateActualSubtotal(Map<ShoppingCartItem,Integer> items)
           
static double calculateAlternativeShipping(Map<ShoppingCartItem,Integer> items, int altShipping)
           
static double calculateCouponDiscount(Map<ShoppingCartItem,Integer> items, ShoppingCoupon coupon)
           
static double calculateCouponDiscount(Map<ShoppingCartItem,Integer> items, String stateId, ShoppingCoupon coupon)
           
static double calculateDiscountPercent(Map<ShoppingCartItem,Integer> items)
           
static double calculateDiscountPrice(ShoppingItem item)
           
static double calculateDiscountPrice(ShoppingItem item, int count)
           
static double calculateDiscountPrice(ShoppingItemPrice itemPrice)
           
static double calculateDiscountSubtotal(Map<ShoppingCartItem,Integer> items)
           
static double calculateInsurance(Map<ShoppingCartItem,Integer> items)
           
static double calculatePrice(ShoppingItem item, int count)
           
static double calculateShipping(Map<ShoppingCartItem,Integer> items)
           
static double calculateSubtotal(Map<ShoppingCartItem,Integer> items)
           
static double calculateTax(Map<ShoppingCartItem,Integer> items, String stateId)
           
static double calculateTotal(Map<ShoppingCartItem,Integer> items, String stateId, ShoppingCoupon coupon, int altShipping, boolean insure)
           
static double calculateTotal(ShoppingOrder order)
           
static String getBreadcrumbs(long categoryId, javax.servlet.jsp.PageContext pageContext, RenderRequest renderRequest, RenderResponse renderResponse)
           
static String getBreadcrumbs(ShoppingCategory category, javax.servlet.jsp.PageContext pageContext, RenderRequest renderRequest, RenderResponse renderResponse)
           
static ShoppingCart getCart(PortletRequest portletRequest)
           
static ShoppingCart getCart(ThemeDisplay themeDisplay)
           
static int getFieldsQuantitiesPos(ShoppingItem item, ShoppingItemField[] itemFields, String[] fieldsArray)
           
static String getItemFields(String itemId)
           
static long getItemId(String itemId)
           
static OrderByComparator getItemOrderByComparator(String orderByCol, String orderByType)
           
static int getMinQuantity(ShoppingItem item)
           
static String getPayPalNotifyURL(ThemeDisplay themeDisplay)
           
static String getPayPalRedirectURL(ShoppingPreferences preferences, ShoppingOrder order, double total, String returnURL, String notifyURL)
           
static String getPayPalReturnURL(PortletURL portletURL, ShoppingOrder order)
           
static String getPpPaymentStatus(ShoppingOrder order, javax.servlet.jsp.PageContext pageContext)
           
static String getPpPaymentStatus(String ppPaymentStatus)
           
static boolean isInStock(ShoppingItem item)
           
static boolean isInStock(ShoppingItem item, ShoppingItemField[] itemFields, String[] fieldsArray, Integer orderedQuantity)
           
static boolean meetsMinOrder(ShoppingPreferences preferences, Map<ShoppingCartItem,Integer> items)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingUtil

public ShoppingUtil()
Method Detail

calculateActualPrice

public static double calculateActualPrice(ShoppingItem item)

calculateActualPrice

public static double calculateActualPrice(ShoppingItem item,
                                          int count)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

calculateActualPrice

public static double calculateActualPrice(ShoppingItemPrice itemPrice)

calculateActualSubtotal

public static double calculateActualSubtotal(List<ShoppingOrderItem> orderItems)

calculateActualSubtotal

public static double calculateActualSubtotal(Map<ShoppingCartItem,Integer> items)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

calculateAlternativeShipping

public static double calculateAlternativeShipping(Map<ShoppingCartItem,Integer> items,
                                                  int altShipping)
                                           throws PortalException,
                                                  SystemException
Throws:
PortalException
SystemException

calculateCouponDiscount

public static double calculateCouponDiscount(Map<ShoppingCartItem,Integer> items,
                                             ShoppingCoupon coupon)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

calculateCouponDiscount

public static double calculateCouponDiscount(Map<ShoppingCartItem,Integer> items,
                                             String stateId,
                                             ShoppingCoupon coupon)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

calculateDiscountPercent

public static double calculateDiscountPercent(Map<ShoppingCartItem,Integer> items)
                                       throws PortalException,
                                              SystemException
Throws:
PortalException
SystemException

calculateDiscountPrice

public static double calculateDiscountPrice(ShoppingItem item)

calculateDiscountPrice

public static double calculateDiscountPrice(ShoppingItem item,
                                            int count)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

calculateDiscountPrice

public static double calculateDiscountPrice(ShoppingItemPrice itemPrice)

calculateDiscountSubtotal

public static double calculateDiscountSubtotal(Map<ShoppingCartItem,Integer> items)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

calculateInsurance

public static double calculateInsurance(Map<ShoppingCartItem,Integer> items)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

calculatePrice

public static double calculatePrice(ShoppingItem item,
                                    int count)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

calculateShipping

public static double calculateShipping(Map<ShoppingCartItem,Integer> items)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

calculateSubtotal

public static double calculateSubtotal(Map<ShoppingCartItem,Integer> items)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

calculateTax

public static double calculateTax(Map<ShoppingCartItem,Integer> items,
                                  String stateId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

calculateTotal

public static double calculateTotal(Map<ShoppingCartItem,Integer> items,
                                    String stateId,
                                    ShoppingCoupon coupon,
                                    int altShipping,
                                    boolean insure)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

calculateTotal

public static double calculateTotal(ShoppingOrder order)
                             throws SystemException
Throws:
SystemException

getBreadcrumbs

public static String getBreadcrumbs(long categoryId,
                                    javax.servlet.jsp.PageContext pageContext,
                                    RenderRequest renderRequest,
                                    RenderResponse renderResponse)
                             throws Exception
Throws:
Exception

getBreadcrumbs

public static String getBreadcrumbs(ShoppingCategory category,
                                    javax.servlet.jsp.PageContext pageContext,
                                    RenderRequest renderRequest,
                                    RenderResponse renderResponse)
                             throws Exception
Throws:
Exception

getCart

public static ShoppingCart getCart(PortletRequest portletRequest)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getCart

public static ShoppingCart getCart(ThemeDisplay themeDisplay)

getFieldsQuantitiesPos

public static int getFieldsQuantitiesPos(ShoppingItem item,
                                         ShoppingItemField[] itemFields,
                                         String[] fieldsArray)

getItemFields

public static String getItemFields(String itemId)

getItemId

public static long getItemId(String itemId)

getItemOrderByComparator

public static OrderByComparator getItemOrderByComparator(String orderByCol,
                                                         String orderByType)

getMinQuantity

public static int getMinQuantity(ShoppingItem item)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getPayPalNotifyURL

public static String getPayPalNotifyURL(ThemeDisplay themeDisplay)

getPayPalRedirectURL

public static String getPayPalRedirectURL(ShoppingPreferences preferences,
                                          ShoppingOrder order,
                                          double total,
                                          String returnURL,
                                          String notifyURL)

getPayPalReturnURL

public static String getPayPalReturnURL(PortletURL portletURL,
                                        ShoppingOrder order)

getPpPaymentStatus

public static String getPpPaymentStatus(ShoppingOrder order,
                                        javax.servlet.jsp.PageContext pageContext)

getPpPaymentStatus

public static String getPpPaymentStatus(String ppPaymentStatus)

isInStock

public static boolean isInStock(ShoppingItem item)

isInStock

public static boolean isInStock(ShoppingItem item,
                                ShoppingItemField[] itemFields,
                                String[] fieldsArray,
                                Integer orderedQuantity)

meetsMinOrder

public static boolean meetsMinOrder(ShoppingPreferences preferences,
                                    Map<ShoppingCartItem,Integer> items)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

Liferay 6.2-ce-ga5