Package org.apache.ofbiz.product.store
Class ProductStoreWorker
java.lang.Object
org.apache.ofbiz.product.store.ProductStoreWorker
ProductStoreWorker - Worker class for store related functionality
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
autoSaveCart
(Delegator delegator, String productStoreId) static boolean
autoSaveCart
(GenericValue productStore) static int
checkSurveyResponse
(HttpServletRequest request, String surveyId) Returns the number of responses for this survey by partystatic int
checkSurveyResponse
(Delegator delegator, String partyId, String productStoreId, String surveyId) Returns the number of responses for this survey by partystatic String
determineSingleFacilityForStore
(Delegator delegator, String productStoreId) static List<GenericValue>
getAvailableStoreShippingMethods
(Delegator delegator, String productStoreId, GenericValue shippingAddress, List<BigDecimal> itemSizes, Map<String, BigDecimal> featureIdMap, BigDecimal weight, BigDecimal orderTotal) static GenericValue
getProductStore
(String productStoreId, Delegator delegator) static GenericValue
getProductStore
(ServletRequest request) static String
getProductStoreId
(ServletRequest request) static String
getProductStorePaymentProperties
(ServletRequest request, String paymentMethodTypeId, String paymentServiceTypeEnumId, boolean anyServiceType) static String
getProductStorePaymentProperties
(Delegator delegator, String productStoreId, String paymentMethodTypeId, String paymentServiceTypeEnumId, boolean anyServiceType) static GenericValue
getProductStorePaymentSetting
(Delegator delegator, String productStoreId, String paymentMethodTypeId, String paymentServiceTypeEnumId, boolean anyServiceType) static String
getProductStorePayToPartyId
(String productStoreId, Delegator delegator) static String
getProductStorePayToPartyId
(GenericValue productStore) static GenericValue
getProductStoreShipmentMethod
(Delegator delegator, String productStoreId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId) static List<GenericValue>
getProductStoreShipmentMethods
(Delegator delegator, String productStoreId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId) static List<GenericValue>
getProductSurveys
(Delegator delegator, String productStoreId, String productId, String surveyApplTypeId) static List<GenericValue>
getProductSurveys
(Delegator delegator, String productStoreId, String productId, String surveyApplTypeId, String parentProductId) static ProductStoreSurveyWrapper
getRandomSurveyWrapper
(HttpServletRequest request, String groupName) static ProductStoreSurveyWrapper
getRandomSurveyWrapper
(Delegator delegator, String productStoreId, String groupName, String partyId, Map<String, Object> passThruFields) static String
getStoreCurrencyUomId
(HttpServletRequest request) static Locale
getStoreLocale
(HttpServletRequest request) static TimeZone
getStoreTimeZone
(HttpServletRequest request) static List<GenericValue>
getSurveys
(Delegator delegator, String productStoreId, String groupName, String productId, String surveyApplTypeId, String parentProductId) static boolean
isStoreInventoryAvailable
(String productStoreId, ProductConfigWrapper productConfig, BigDecimal quantity, Delegator delegator, LocalDispatcher dispatcher) check inventory availability for the given catalog, product, quantity, etcstatic boolean
isStoreInventoryAvailable
(ServletRequest request, GenericValue product, BigDecimal quantity) static boolean
isStoreInventoryAvailable
(ServletRequest request, ProductConfigWrapper productConfig, BigDecimal quantity) static boolean
isStoreInventoryRequired
(ServletRequest request, GenericValue product) static boolean
isStoreInventoryRequiredAndAvailable
(ServletRequest request, GenericValue product, BigDecimal quantity, Boolean wantRequired, Boolean wantAvailable) This method is used in the showcart pages to determine whether or not to show the inventory message and in the productdetail pages to determine whether or not to show the item as out of stock.
-
Method Details
-
getProductStore
-
getProductStore
-
getProductStoreId
-
getStoreCurrencyUomId
-
getStoreLocale
-
getStoreTimeZone
-
determineSingleFacilityForStore
-
autoSaveCart
-
autoSaveCart
-
getProductStorePayToPartyId
-
getProductStorePayToPartyId
-
getProductStorePaymentProperties
public static String getProductStorePaymentProperties(ServletRequest request, String paymentMethodTypeId, String paymentServiceTypeEnumId, boolean anyServiceType) -
getProductStorePaymentProperties
-
getProductStorePaymentSetting
public static GenericValue getProductStorePaymentSetting(Delegator delegator, String productStoreId, String paymentMethodTypeId, String paymentServiceTypeEnumId, boolean anyServiceType) -
getProductStoreShipmentMethods
-
getProductStoreShipmentMethod
-
getAvailableStoreShippingMethods
public static List<GenericValue> getAvailableStoreShippingMethods(Delegator delegator, String productStoreId, GenericValue shippingAddress, List<BigDecimal> itemSizes, Map<String, BigDecimal> featureIdMap, BigDecimal weight, BigDecimal orderTotal) -
getRandomSurveyWrapper
public static ProductStoreSurveyWrapper getRandomSurveyWrapper(HttpServletRequest request, String groupName) -
getRandomSurveyWrapper
-
getProductSurveys
-
getProductSurveys
-
getSurveys
-
checkSurveyResponse
Returns the number of responses for this survey by party -
checkSurveyResponse
public static int checkSurveyResponse(Delegator delegator, String partyId, String productStoreId, String surveyId) Returns the number of responses for this survey by party -
isStoreInventoryRequired
-
isStoreInventoryAvailable
public static boolean isStoreInventoryAvailable(ServletRequest request, GenericValue product, BigDecimal quantity) -
isStoreInventoryRequiredAndAvailable
public static boolean isStoreInventoryRequiredAndAvailable(ServletRequest request, GenericValue product, BigDecimal quantity, Boolean wantRequired, Boolean wantAvailable) This method is used in the showcart pages to determine whether or not to show the inventory message and in the productdetail pages to determine whether or not to show the item as out of stock.- Parameters:
request
- ServletRequest (or HttpServletRequest of course)product
- GenericValue representing the product in questionquantity
- Quantity desired.wantRequired
- If true then inventory required must be true for the result to be true, if false must be false; if null don't carewantAvailable
- If true then inventory avilable must be true for the result to be true, if false must be false; if null don't care
-
isStoreInventoryAvailable
public static boolean isStoreInventoryAvailable(ServletRequest request, ProductConfigWrapper productConfig, BigDecimal quantity) -
isStoreInventoryAvailable
public static boolean isStoreInventoryAvailable(String productStoreId, ProductConfigWrapper productConfig, BigDecimal quantity, Delegator delegator, LocalDispatcher dispatcher) check inventory availability for the given catalog, product, quantity, etc
-