Package org.apache.ofbiz.product.store
Class ProductStoreWorker
- java.lang.Object
-
- org.apache.ofbiz.product.store.ProductStoreWorker
-
public final class ProductStoreWorker extends java.lang.Object
ProductStoreWorker - Worker class for store related functionality
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
autoSaveCart(Delegator delegator, java.lang.String productStoreId)
static boolean
autoSaveCart(GenericValue productStore)
static int
checkSurveyResponse(HttpServletRequest request, java.lang.String surveyId)
Returns the number of responses for this survey by partystatic int
checkSurveyResponse(Delegator delegator, java.lang.String partyId, java.lang.String productStoreId, java.lang.String surveyId)
Returns the number of responses for this survey by partystatic java.lang.String
determineSingleFacilityForStore(Delegator delegator, java.lang.String productStoreId)
static java.util.List<GenericValue>
getAvailableStoreShippingMethods(Delegator delegator, java.lang.String productStoreId, GenericValue shippingAddress, java.util.List<java.math.BigDecimal> itemSizes, java.util.Map<java.lang.String,java.math.BigDecimal> featureIdMap, java.math.BigDecimal weight, java.math.BigDecimal orderTotal)
static java.lang.String
getDefaultProductStoreEmailScreenLocation(java.lang.String emailType)
static GenericValue
getProductStore(java.lang.String productStoreId, Delegator delegator)
static GenericValue
getProductStore(ServletRequest request)
static java.lang.String
getProductStoreId(ServletRequest request)
static java.lang.String
getProductStorePaymentProperties(ServletRequest request, java.lang.String paymentMethodTypeId, java.lang.String paymentServiceTypeEnumId, boolean anyServiceType)
static java.lang.String
getProductStorePaymentProperties(Delegator delegator, java.lang.String productStoreId, java.lang.String paymentMethodTypeId, java.lang.String paymentServiceTypeEnumId, boolean anyServiceType)
static GenericValue
getProductStorePaymentSetting(Delegator delegator, java.lang.String productStoreId, java.lang.String paymentMethodTypeId, java.lang.String paymentServiceTypeEnumId, boolean anyServiceType)
static java.lang.String
getProductStorePayToPartyId(java.lang.String productStoreId, Delegator delegator)
static java.lang.String
getProductStorePayToPartyId(GenericValue productStore)
static GenericValue
getProductStoreShipmentMethod(Delegator delegator, java.lang.String productStoreId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId)
static java.util.List<GenericValue>
getProductStoreShipmentMethods(Delegator delegator, java.lang.String productStoreId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId)
static java.util.List<GenericValue>
getProductSurveys(Delegator delegator, java.lang.String productStoreId, java.lang.String productId, java.lang.String surveyApplTypeId)
static java.util.List<GenericValue>
getProductSurveys(Delegator delegator, java.lang.String productStoreId, java.lang.String productId, java.lang.String surveyApplTypeId, java.lang.String parentProductId)
static ProductStoreSurveyWrapper
getRandomSurveyWrapper(HttpServletRequest request, java.lang.String groupName)
static ProductStoreSurveyWrapper
getRandomSurveyWrapper(Delegator delegator, java.lang.String productStoreId, java.lang.String groupName, java.lang.String partyId, java.util.Map<java.lang.String,java.lang.Object> passThruFields)
static java.lang.String
getStoreCurrencyUomId(HttpServletRequest request)
static java.util.Locale
getStoreLocale(HttpServletRequest request)
static java.util.TimeZone
getStoreTimeZone(HttpServletRequest request)
static java.util.List<GenericValue>
getSurveys(Delegator delegator, java.lang.String productStoreId, java.lang.String groupName, java.lang.String productId, java.lang.String surveyApplTypeId, java.lang.String parentProductId)
static boolean
isStoreInventoryAvailable(java.lang.String productStoreId, ProductConfigWrapper productConfig, java.math.BigDecimal quantity, Delegator delegator, LocalDispatcher dispatcher)
check inventory availability for the given catalog, product, quantity, etcstatic boolean
isStoreInventoryAvailable(ServletRequest request, GenericValue product, java.math.BigDecimal quantity)
static boolean
isStoreInventoryAvailable(ServletRequest request, ProductConfigWrapper productConfig, java.math.BigDecimal quantity)
static boolean
isStoreInventoryRequired(ServletRequest request, GenericValue product)
static boolean
isStoreInventoryRequiredAndAvailable(ServletRequest request, GenericValue product, java.math.BigDecimal quantity, java.lang.Boolean wantRequired, java.lang.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 Detail
-
getProductStore
public static GenericValue getProductStore(java.lang.String productStoreId, Delegator delegator)
-
getProductStore
public static GenericValue getProductStore(ServletRequest request)
-
getProductStoreId
public static java.lang.String getProductStoreId(ServletRequest request)
-
getStoreCurrencyUomId
public static java.lang.String getStoreCurrencyUomId(HttpServletRequest request)
-
getStoreLocale
public static java.util.Locale getStoreLocale(HttpServletRequest request)
-
getStoreTimeZone
public static java.util.TimeZone getStoreTimeZone(HttpServletRequest request)
-
determineSingleFacilityForStore
public static java.lang.String determineSingleFacilityForStore(Delegator delegator, java.lang.String productStoreId)
-
autoSaveCart
public static boolean autoSaveCart(Delegator delegator, java.lang.String productStoreId)
-
autoSaveCart
public static boolean autoSaveCart(GenericValue productStore)
-
getProductStorePayToPartyId
public static java.lang.String getProductStorePayToPartyId(java.lang.String productStoreId, Delegator delegator)
-
getProductStorePayToPartyId
public static java.lang.String getProductStorePayToPartyId(GenericValue productStore)
-
getProductStorePaymentProperties
public static java.lang.String getProductStorePaymentProperties(ServletRequest request, java.lang.String paymentMethodTypeId, java.lang.String paymentServiceTypeEnumId, boolean anyServiceType)
-
getProductStorePaymentProperties
public static java.lang.String getProductStorePaymentProperties(Delegator delegator, java.lang.String productStoreId, java.lang.String paymentMethodTypeId, java.lang.String paymentServiceTypeEnumId, boolean anyServiceType)
-
getProductStorePaymentSetting
public static GenericValue getProductStorePaymentSetting(Delegator delegator, java.lang.String productStoreId, java.lang.String paymentMethodTypeId, java.lang.String paymentServiceTypeEnumId, boolean anyServiceType)
-
getProductStoreShipmentMethods
public static java.util.List<GenericValue> getProductStoreShipmentMethods(Delegator delegator, java.lang.String productStoreId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId)
-
getProductStoreShipmentMethod
public static GenericValue getProductStoreShipmentMethod(Delegator delegator, java.lang.String productStoreId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId)
-
getAvailableStoreShippingMethods
public static java.util.List<GenericValue> getAvailableStoreShippingMethods(Delegator delegator, java.lang.String productStoreId, GenericValue shippingAddress, java.util.List<java.math.BigDecimal> itemSizes, java.util.Map<java.lang.String,java.math.BigDecimal> featureIdMap, java.math.BigDecimal weight, java.math.BigDecimal orderTotal)
-
getRandomSurveyWrapper
public static ProductStoreSurveyWrapper getRandomSurveyWrapper(HttpServletRequest request, java.lang.String groupName)
-
getRandomSurveyWrapper
public static ProductStoreSurveyWrapper getRandomSurveyWrapper(Delegator delegator, java.lang.String productStoreId, java.lang.String groupName, java.lang.String partyId, java.util.Map<java.lang.String,java.lang.Object> passThruFields)
-
getProductSurveys
public static java.util.List<GenericValue> getProductSurveys(Delegator delegator, java.lang.String productStoreId, java.lang.String productId, java.lang.String surveyApplTypeId)
-
getProductSurveys
public static java.util.List<GenericValue> getProductSurveys(Delegator delegator, java.lang.String productStoreId, java.lang.String productId, java.lang.String surveyApplTypeId, java.lang.String parentProductId)
-
getSurveys
public static java.util.List<GenericValue> getSurveys(Delegator delegator, java.lang.String productStoreId, java.lang.String groupName, java.lang.String productId, java.lang.String surveyApplTypeId, java.lang.String parentProductId)
-
checkSurveyResponse
public static int checkSurveyResponse(HttpServletRequest request, java.lang.String surveyId)
Returns the number of responses for this survey by party
-
checkSurveyResponse
public static int checkSurveyResponse(Delegator delegator, java.lang.String partyId, java.lang.String productStoreId, java.lang.String surveyId)
Returns the number of responses for this survey by party
-
isStoreInventoryRequired
public static boolean isStoreInventoryRequired(ServletRequest request, GenericValue product)
-
isStoreInventoryAvailable
public static boolean isStoreInventoryAvailable(ServletRequest request, GenericValue product, java.math.BigDecimal quantity)
-
isStoreInventoryRequiredAndAvailable
public static boolean isStoreInventoryRequiredAndAvailable(ServletRequest request, GenericValue product, java.math.BigDecimal quantity, java.lang.Boolean wantRequired, java.lang.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, java.math.BigDecimal quantity)
-
isStoreInventoryAvailable
public static boolean isStoreInventoryAvailable(java.lang.String productStoreId, ProductConfigWrapper productConfig, java.math.BigDecimal quantity, Delegator delegator, LocalDispatcher dispatcher)
check inventory availability for the given catalog, product, quantity, etc
-
getDefaultProductStoreEmailScreenLocation
public static java.lang.String getDefaultProductStoreEmailScreenLocation(java.lang.String emailType)
-
-