Class ShippingEvents
- java.lang.Object
-
- org.apache.ofbiz.order.shoppingcart.shipping.ShippingEvents
-
public class ShippingEvents extends java.lang.Object
ShippingEvents - Events used for processing shipping fees
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description ShippingEvents()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.math.BigDecimal
getExternalShipEstimate(LocalDispatcher dispatcher, GenericValue storeShipMeth, java.util.Map<java.lang.String,java.lang.Object> context)
static java.math.BigDecimal
getGenericShipEstimate(LocalDispatcher dispatcher, GenericValue storeShipMeth, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.lang.String
getShipEstimate(HttpServletRequest request, HttpServletResponse response)
static java.util.Map<java.lang.String,java.lang.Object>
getShipEstimate(LocalDispatcher dispatcher, Delegator delegator, OrderReadHelper orh, java.lang.String shipGroupSeqId)
static java.util.Map<java.lang.String,java.lang.Object>
getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, java.lang.String orderTypeId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId, java.lang.String shippingContactMechId, java.lang.String productStoreId, java.lang.String supplierPartyId, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> itemInfo, java.math.BigDecimal shippableWeight, java.math.BigDecimal shippableQuantity, java.math.BigDecimal shippableTotal, java.lang.String partyId, java.lang.String productStoreShipMethId)
static java.util.Map<java.lang.String,java.lang.Object>
getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, java.lang.String orderTypeId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId, java.lang.String shippingContactMechId, java.lang.String productStoreId, java.lang.String supplierPartyId, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> itemInfo, java.math.BigDecimal shippableWeight, java.math.BigDecimal shippableQuantity, java.math.BigDecimal shippableTotal, java.lang.String partyId, java.lang.String productStoreShipMethId, java.math.BigDecimal totalAllowance)
static java.util.Map<java.lang.String,java.lang.Object>
getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, java.lang.String orderTypeId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId, java.lang.String shippingContactMechId, java.lang.String productStoreId, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> itemInfo, java.math.BigDecimal shippableWeight, java.math.BigDecimal shippableQuantity, java.math.BigDecimal shippableTotal, java.lang.String partyId, java.lang.String productStoreShipMethId)
static java.util.Map<java.lang.String,java.lang.Object>
getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, ShoppingCart cart, int groupNo)
static java.lang.String
getShipmentCustomMethod(Delegator delegator, java.lang.String shipmentCustomMethodId)
static java.util.List<GenericValue>
getShipmentTimeEstimates(Delegator delegator, java.lang.String shipmentMethodTypeId, java.lang.String partyId, java.lang.String roleTypeId, java.util.List<java.lang.String> geoIdFroms, java.util.List<java.lang.String> geoIdTos)
static java.util.List<GenericValue>
getShipmentTimeEstimates(Delegator delegator, java.lang.String shipmentMethodTypeId, java.lang.String partyId, java.lang.String roleTypeId, GenericValue shippingAddress, GenericValue originAddress)
static GenericValue
getShippingOriginContactMech(Delegator delegator, java.lang.String supplierPartyId)
Attempts to get the supplier's shipping origin address and failing that, the general location.static GenericValue
getShippingOriginContactMechFromFacility(Delegator delegator, java.lang.String facilityId)
static GenericValue
getShippingTimeEstimate(GenericValue storeCarrierShipMethod, java.util.List<GenericValue> shippingTimeEstimates)
Return theGenericValue
ShipmentTimeEstimate matching the carrier shipment methodstatic java.lang.Double
getShippingTimeEstimateInDay(LocalDispatcher dispatcher, GenericValue storeCarrierShipMethod, java.util.List<GenericValue> shippingTimeEstimates)
Return the number of days estimated for shipping
-
-
-
Method Detail
-
getShipEstimate
public static java.lang.String getShipEstimate(HttpServletRequest request, HttpServletResponse response)
-
getShipGroupEstimate
public static java.util.Map<java.lang.String,java.lang.Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, ShoppingCart cart, int groupNo)
-
getShipEstimate
public static java.util.Map<java.lang.String,java.lang.Object> getShipEstimate(LocalDispatcher dispatcher, Delegator delegator, OrderReadHelper orh, java.lang.String shipGroupSeqId)
-
getShipGroupEstimate
public static java.util.Map<java.lang.String,java.lang.Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, java.lang.String orderTypeId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId, java.lang.String shippingContactMechId, java.lang.String productStoreId, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> itemInfo, java.math.BigDecimal shippableWeight, java.math.BigDecimal shippableQuantity, java.math.BigDecimal shippableTotal, java.lang.String partyId, java.lang.String productStoreShipMethId)
-
getShipGroupEstimate
public static java.util.Map<java.lang.String,java.lang.Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, java.lang.String orderTypeId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId, java.lang.String shippingContactMechId, java.lang.String productStoreId, java.lang.String supplierPartyId, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> itemInfo, java.math.BigDecimal shippableWeight, java.math.BigDecimal shippableQuantity, java.math.BigDecimal shippableTotal, java.lang.String partyId, java.lang.String productStoreShipMethId)
-
getShipGroupEstimate
public static java.util.Map<java.lang.String,java.lang.Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, java.lang.String orderTypeId, java.lang.String shipmentMethodTypeId, java.lang.String carrierPartyId, java.lang.String carrierRoleTypeId, java.lang.String shippingContactMechId, java.lang.String productStoreId, java.lang.String supplierPartyId, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> itemInfo, java.math.BigDecimal shippableWeight, java.math.BigDecimal shippableQuantity, java.math.BigDecimal shippableTotal, java.lang.String partyId, java.lang.String productStoreShipMethId, java.math.BigDecimal totalAllowance)
-
getGenericShipEstimate
public static java.math.BigDecimal getGenericShipEstimate(LocalDispatcher dispatcher, GenericValue storeShipMeth, java.util.Map<java.lang.String,? extends java.lang.Object> context) throws GeneralException
- Throws:
GeneralException
-
getShipmentCustomMethod
public static java.lang.String getShipmentCustomMethod(Delegator delegator, java.lang.String shipmentCustomMethodId)
-
getExternalShipEstimate
public static java.math.BigDecimal getExternalShipEstimate(LocalDispatcher dispatcher, GenericValue storeShipMeth, java.util.Map<java.lang.String,java.lang.Object> context) throws GeneralException
- Throws:
GeneralException
-
getShippingOriginContactMech
public static GenericValue getShippingOriginContactMech(Delegator delegator, java.lang.String supplierPartyId) throws GeneralException
Attempts to get the supplier's shipping origin address and failing that, the general location.- Throws:
GeneralException
-
getShippingOriginContactMechFromFacility
public static GenericValue getShippingOriginContactMechFromFacility(Delegator delegator, java.lang.String facilityId) throws GeneralException
- Throws:
GeneralException
-
getShipmentTimeEstimates
public static java.util.List<GenericValue> getShipmentTimeEstimates(Delegator delegator, java.lang.String shipmentMethodTypeId, java.lang.String partyId, java.lang.String roleTypeId, GenericValue shippingAddress, GenericValue originAddress)
-
getShipmentTimeEstimates
public static java.util.List<GenericValue> getShipmentTimeEstimates(Delegator delegator, java.lang.String shipmentMethodTypeId, java.lang.String partyId, java.lang.String roleTypeId, java.util.List<java.lang.String> geoIdFroms, java.util.List<java.lang.String> geoIdTos)
-
getShippingTimeEstimate
public static GenericValue getShippingTimeEstimate(GenericValue storeCarrierShipMethod, java.util.List<GenericValue> shippingTimeEstimates)
Return theGenericValue
ShipmentTimeEstimate matching the carrier shipment method- Parameters:
storeCarrierShipMethod
- ShipmentMethod used for estimationshippingTimeEstimates
- available configured estimation- Returns:
-
getShippingTimeEstimateInDay
public static java.lang.Double getShippingTimeEstimateInDay(LocalDispatcher dispatcher, GenericValue storeCarrierShipMethod, java.util.List<GenericValue> shippingTimeEstimates)
Return the number of days estimated for shipping- Parameters:
dispatcher
-storeCarrierShipMethod
- ShipmentMethod used for estimationshippingTimeEstimates
- available configured estimation- Returns:
-
-