Liferay 7.0-ce-m6

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, RenderRequest renderRequest, RenderResponse renderResponse)
           
static String getBreadcrumbs(ShoppingCategory category, RenderRequest renderRequest, RenderResponse renderResponse)
           
static ShoppingCart getCart(PortletRequest portletRequest)
           
static ShoppingCart getCart(ThemeDisplay themeDisplay)
           
static Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest, String emailFromAddress, String emailFromName)
           
static int getFieldsQuantitiesPos(ShoppingItem item, ShoppingItemField[] itemFields, String[] fieldsArray)
           
static String getItemFields(String itemId)
           
static long getItemId(String itemId)
           
static OrderByComparator<ShoppingItem> getItemOrderByComparator(String orderByCol, String orderByType)
           
static int getMinQuantity(ShoppingItem item)
           
static String getPayPalNotifyURL(ThemeDisplay themeDisplay)
           
static String getPayPalRedirectURL(ShoppingGroupServiceSettings shoppingGroupServiceSettings, ShoppingOrder order, double total, String returnURL, String notifyURL)
           
static String getPayPalReturnURL(PortletURL portletURL, ShoppingOrder order)
           
static String getPpPaymentStatus(ShoppingOrder order, javax.servlet.http.HttpServletRequest request)
           
static String getPpPaymentStatus(String ppPaymentStatus)
           
static boolean isInStock(ShoppingItem item)
           
static boolean isInStock(ShoppingItem item, ShoppingItemField[] itemFields, String[] fieldsArray, Integer orderedQuantity)
           
static boolean meetsMinOrder(ShoppingGroupServiceSettings shoppingGroupServiceSettings, 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
Throws:
PortalException

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
Throws:
PortalException

calculateAlternativeShipping

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

calculateCouponDiscount

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

calculateCouponDiscount

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

calculateDiscountPercent

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

calculateDiscountPrice

public static double calculateDiscountPrice(ShoppingItem item)

calculateDiscountPrice

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

calculateDiscountPrice

public static double calculateDiscountPrice(ShoppingItemPrice itemPrice)

calculateDiscountSubtotal

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

calculateInsurance

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

calculatePrice

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

calculateShipping

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

calculateSubtotal

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

calculateTax

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

calculateTotal

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

calculateTotal

public static double calculateTotal(ShoppingOrder order)

getBreadcrumbs

public static String getBreadcrumbs(long categoryId,
                                    RenderRequest renderRequest,
                                    RenderResponse renderResponse)
                             throws Exception
Throws:
Exception

getBreadcrumbs

public static String getBreadcrumbs(ShoppingCategory category,
                                    RenderRequest renderRequest,
                                    RenderResponse renderResponse)
                             throws Exception
Throws:
Exception

getCart

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

getCart

public static ShoppingCart getCart(ThemeDisplay themeDisplay)

getEmailDefinitionTerms

public static Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest,
                                                         String emailFromAddress,
                                                         String emailFromName)

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<ShoppingItem> getItemOrderByComparator(String orderByCol,
                                                                       String orderByType)

getMinQuantity

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

getPayPalNotifyURL

public static String getPayPalNotifyURL(ThemeDisplay themeDisplay)

getPayPalRedirectURL

public static String getPayPalRedirectURL(ShoppingGroupServiceSettings shoppingGroupServiceSettings,
                                          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.http.HttpServletRequest request)

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(ShoppingGroupServiceSettings shoppingGroupServiceSettings,
                                    Map<ShoppingCartItem,Integer> items)
                             throws PortalException
Throws:
PortalException

Liferay 7.0-ce-m6