Class ProductEvents


  • public class ProductEvents
    extends java.lang.Object
    Product Information Related Events
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • ProductEvents

        public ProductEvents()
    • Method Detail

      • updateAllKeywords

        public static java.lang.String updateAllKeywords​(HttpServletRequest request,
                                                         HttpServletResponse response)
        Updates/adds keywords for all products
        Parameters:
        request - HTTPRequest object for the current request
        response - HTTPResponse object for the current request
        Returns:
        String specifying the exit status of this event
      • updateProductAssoc

        public static java.lang.String updateProductAssoc​(HttpServletRequest request,
                                                          HttpServletResponse response)
        Updates ProductAssoc information according to UPDATE_MODE parameter
        Parameters:
        request - The HTTPRequest object for the current request
        response - The HTTPResponse object for the current request
        Returns:
        String specifying the exit status of this event
      • clearLastViewedCategories

        public static java.lang.String clearLastViewedCategories​(HttpServletRequest request,
                                                                 HttpServletResponse response)
        Event to clear the last viewed categories
      • clearLastViewedProducts

        public static java.lang.String clearLastViewedProducts​(HttpServletRequest request,
                                                               HttpServletResponse response)
        Event to clear the last vieweed products
      • clearAllLastViewed

        public static java.lang.String clearAllLastViewed​(HttpServletRequest request,
                                                          HttpServletResponse response)
        Event to clear the last viewed history (products/categories/searchs)
      • checkUpdateFeatureApplByDescription

        protected static void checkUpdateFeatureApplByDescription​(java.lang.String productId,
                                                                  GenericValue product,
                                                                  java.lang.String description,
                                                                  java.lang.String productFeatureTypeId,
                                                                  GenericValue productFeatureType,
                                                                  java.lang.String productFeatureApplTypeId,
                                                                  java.sql.Timestamp nowTimestamp,
                                                                  Delegator delegator,
                                                                  java.util.Set<java.lang.String> descriptionsToRemove,
                                                                  java.util.Set<java.lang.String> descriptionsRemoved)
                                                           throws GenericEntityException
        Throws:
        GenericEntityException
      • setDefaultStoreSettings

        public static java.lang.String setDefaultStoreSettings​(HttpServletRequest request,
                                                               HttpServletResponse response)
        Simple event to set the users initial locale and currency Uom based on website product store
      • checkStoreCustomerRole

        public static java.lang.String checkStoreCustomerRole​(HttpServletRequest request,
                                                              HttpServletResponse response)
        If ProductStore.requireCustomerRole == Y then the loggedin user must be associated with the store in the customer role. This event method is called from the ProductEvents.storeCheckLogin and ProductEvents.storeLogin
        Parameters:
        request -
        response -
        Returns:
        String with response, maybe "success" or "error" if logged in user is not associated with the ProductStore in the CUSTOMER role.
      • parseDoubleForEntity

        @Deprecated
        public static java.lang.Double parseDoubleForEntity​(java.lang.String doubleString)
                                                     throws java.lang.NumberFormatException
        Deprecated.
        Throws:
        java.lang.NumberFormatException
      • parseBigDecimalForEntity

        public static java.math.BigDecimal parseBigDecimalForEntity​(java.lang.String bigDecimalString)
                                                             throws java.lang.NumberFormatException
        Return nulls for empty strings, as the entity engine can deal with nulls. This will provide blanks in fields where BigDecimal display. Blank meaning null, vs. 0 which means 0
        Parameters:
        bigDecimalString -
        Returns:
        a BigDecimal for the parsed value
        Throws:
        java.lang.NumberFormatException