Package org.apache.ofbiz.product.product
Class ProductEvents
java.lang.Object
org.apache.ofbiz.product.product.ProductEvents
Product Information Related Events
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
addProductFeatures
(HttpServletRequest request, HttpServletResponse response) static String
addProductTags
(HttpServletRequest request, HttpServletResponse response) Event add product tagsstatic String
addProductToCategories
(HttpServletRequest request, HttpServletResponse response) static String
addProductToComparisonList
(HttpServletRequest request, HttpServletResponse response) static String
checkStoreCustomerRole
(HttpServletRequest request, HttpServletResponse response) If ProductStore.requireCustomerRole == Y then the loggedin user must be associated with the store in the customer role.protected static void
checkUpdateFeatureApplByDescription
(String productId, GenericValue product, String description, String productFeatureTypeId, GenericValue productFeatureType, String productFeatureApplTypeId, Timestamp nowTimestamp, Delegator delegator, Set<String> descriptionsToRemove, Set<String> descriptionsRemoved) static String
clearAllLastViewed
(HttpServletRequest request, HttpServletResponse response) Event to clear the last viewed history (products/categories/searchs)static String
clearLastViewedCategories
(HttpServletRequest request, HttpServletResponse response) Event to clear the last viewed categoriesstatic String
clearLastViewedProducts
(HttpServletRequest request, HttpServletResponse response) Event to clear the last vieweed productsstatic String
clearProductComparisonList
(HttpServletRequest request, HttpServletResponse response) static List<GenericValue>
getProductCompareList
(HttpServletRequest request) static BigDecimal
parseBigDecimalFromParameter
(String bigDecimalString, HttpServletRequest request) Return nulls for empty strings, as the entity engine can deal with nulls.static String
removeFeatureApplsByFeatureTypeId
(HttpServletRequest request, HttpServletResponse response) static String
removeProductFeatureAppl
(HttpServletRequest request, HttpServletResponse response) static String
removeProductFromComparisonList
(HttpServletRequest request, HttpServletResponse response) static String
setDefaultStoreSettings
(HttpServletRequest request, HttpServletResponse response) Simple event to set the users initial locale and currency Uom based on website product storestatic String
tellAFriend
(HttpServletRequest request, HttpServletResponse response) static String
updateAllKeywords
(HttpServletRequest request, HttpServletResponse response) Updates/adds keywords for all productsstatic String
updateProductAssoc
(HttpServletRequest request, HttpServletResponse response) Updates ProductAssoc information according to UPDATE_MODE parameterstatic String
updateProductCategoryMember
(HttpServletRequest request, HttpServletResponse response) static String
updateProductQuickAdminSelFeat
(HttpServletRequest request, HttpServletResponse response) static String
updateProductQuickAdminShipping
(HttpServletRequest request, HttpServletResponse response)
-
Constructor Details
-
ProductEvents
public ProductEvents()
-
-
Method Details
-
updateAllKeywords
Updates/adds keywords for all products- Parameters:
request
- HTTPRequest object for the current requestresponse
- HTTPResponse object for the current request- Returns:
- String specifying the exit status of this event
-
updateProductAssoc
Updates ProductAssoc information according to UPDATE_MODE parameter- Parameters:
request
- The HTTPRequest object for the current requestresponse
- The HTTPResponse object for the current request- Returns:
- String specifying the exit status of this event
-
clearLastViewedCategories
public static String clearLastViewedCategories(HttpServletRequest request, HttpServletResponse response) Event to clear the last viewed categories -
clearLastViewedProducts
public static String clearLastViewedProducts(HttpServletRequest request, HttpServletResponse response) Event to clear the last vieweed products -
clearAllLastViewed
Event to clear the last viewed history (products/categories/searchs) -
updateProductQuickAdminShipping
public static String updateProductQuickAdminShipping(HttpServletRequest request, HttpServletResponse response) -
updateProductQuickAdminSelFeat
public static String updateProductQuickAdminSelFeat(HttpServletRequest request, HttpServletResponse response) -
checkUpdateFeatureApplByDescription
protected static void checkUpdateFeatureApplByDescription(String productId, GenericValue product, String description, String productFeatureTypeId, GenericValue productFeatureType, String productFeatureApplTypeId, Timestamp nowTimestamp, Delegator delegator, Set<String> descriptionsToRemove, Set<String> descriptionsRemoved) throws GenericEntityException - Throws:
GenericEntityException
-
removeFeatureApplsByFeatureTypeId
public static String removeFeatureApplsByFeatureTypeId(HttpServletRequest request, HttpServletResponse response) -
removeProductFeatureAppl
public static String removeProductFeatureAppl(HttpServletRequest request, HttpServletResponse response) -
addProductToCategories
public static String addProductToCategories(HttpServletRequest request, HttpServletResponse response) -
updateProductCategoryMember
public static String updateProductCategoryMember(HttpServletRequest request, HttpServletResponse response) -
addProductFeatures
-
setDefaultStoreSettings
public static 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 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.
-
tellAFriend
-
getProductCompareList
-
addProductToComparisonList
public static String addProductToComparisonList(HttpServletRequest request, HttpServletResponse response) -
removeProductFromComparisonList
public static String removeProductFromComparisonList(HttpServletRequest request, HttpServletResponse response) -
clearProductComparisonList
public static String clearProductComparisonList(HttpServletRequest request, HttpServletResponse response) -
parseBigDecimalFromParameter
public static BigDecimal parseBigDecimalFromParameter(String bigDecimalString, HttpServletRequest request) throws GeneralException 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:
GeneralException
-
addProductTags
Event add product tags
-