Class WeightPackageSession
java.lang.Object
org.apache.ofbiz.shipment.weightPackage.WeightPackageSession
- All Implemented Interfaces:
Serializable
The type Weight package session.
- See Also:
-
Constructor Summary
ConstructorDescriptionWeightPackageSession
(LocalDispatcher dispatcher, GenericValue userLogin) WeightPackageSession
(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId) WeightPackageSession
(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId, String picklistBinId, String orderId, String shipGrpSeqId) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyItemsToPackages
(String orderId) Apply items to packages.protected void
changeOrderItemStatus
(String orderId) Change order item status.void
clearPackedLines
(String orderId) Clear packed lines.Complete string.boolean
completeShipment
(String orderId, String calculateOnlineShippingRateFromUps) Complete shipment boolean.protected void
createPackages
(String orderId) Create packages.void
createWeightPackageLine
(String orderId, BigDecimal packageWeight, BigDecimal packageLength, BigDecimal packageWidth, BigDecimal packageHeight, String shipmentBoxTypeId) Create weight package line.void
deletePackedLine
(int weightPackageSeqId) Delete packed line.protected boolean
diffInShipCost
(BigDecimal actualShippingCost) Diff in ship cost boolean.Gets actual ship cost.Gets delegator.Gets dimension uom id.Gets dispatcher.Gets estimated ship cost.Gets facility id.Gets invoice id.protected Integer
getOrderedQuantity
(String orderId) Gets ordered quantity.getPackedLine
(int weightPackageSeqId) Gets packed line.Gets packed lines.getPackedLines
(String orderId) Gets packed lines.Gets picklist bin id.Gets primary order id.Gets primary ship group seq id.getShipmentCostEstimate
(String shippingContactMechId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String orderId, String productStoreId, List<GenericValue> shippableItemInfo, BigDecimal shippableTotal, BigDecimal shippableWeight, BigDecimal shippableQuantity) Gets shipment cost estimate.getShipmentCostEstimate
(GenericValue orderItemShipGroup, String orderId, String productStoreId, List<GenericValue> shippableItemInfo, BigDecimal shippableTotal, BigDecimal shippableWeight, BigDecimal shippableQuantity) Gets shipment cost estimate.Gets shipment id.getShippableWeight
(String orderId) Gets shippable weight.int
Gets weight package seq id.Gets weight uom id.protected void
savePackagesInfo
(String orderId, String calculateOnlineShippingRateFromUps) Save packages info.void
setActualShipCost
(BigDecimal actualShipCost) Sets actual ship cost.void
setCarrierPartyId
(String carrierPartyId) Sets carrier party id.void
setDimensionAndShipmentBoxType
(int weightPackageSeqId) Sets dimension and shipment box type.void
setDimensionUomId
(String dimensionUomId) Sets dimension uom id.void
setEstimatedShipCost
(BigDecimal estimatedShipCost) Sets estimated ship cost.void
setFacilityId
(String facilityId) Sets facility id.void
setInvoiceId
(String invoiceId) Sets invoice id.void
setPackageHeight
(BigDecimal packageHeight, int weightPackageSeqId) Sets package height.void
setPackageLength
(BigDecimal packageLength, int weightPackageSeqId) Sets package length.void
setPackageWeight
(BigDecimal packageWeight, int weightPackageSeqId) Sets package weight.void
setPackageWidth
(BigDecimal packageWidth, int weightPackageSeqId) Sets package width.void
setPicklistBinId
(String picklistBinId) Sets picklist bin id.void
setPrimaryOrderId
(String primaryOrderId) Sets primary order id.void
setPrimaryShipGroupSeqId
(String primaryShipGrpSeqId) Sets primary ship group seq id.void
setShipmentBoxTypeId
(String shipmentBoxTypeId, int weightPackageSeqId) Sets shipment box type id.void
setShipmentId
(String shipmentId) Sets shipment id.protected void
Sets shipment to packed.void
setWeightUomId
(String weightUomId) Sets weight uom id.protected void
updateShipmentRouteSegments
(String orderId) Update shipment route segments.protected void
Ups shipment accept.protected BigDecimal
Ups shipment confirm big decimal.
-
Constructor Details
-
WeightPackageSession
public WeightPackageSession() -
WeightPackageSession
public WeightPackageSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId, String picklistBinId, String orderId, String shipGrpSeqId) -
WeightPackageSession
-
WeightPackageSession
-
-
Method Details
-
getDispatcher
Gets dispatcher.- Returns:
- the dispatcher
-
getDelegator
Gets delegator.- Returns:
- the delegator
-
createWeightPackageLine
public void createWeightPackageLine(String orderId, BigDecimal packageWeight, BigDecimal packageLength, BigDecimal packageWidth, BigDecimal packageHeight, String shipmentBoxTypeId) throws GeneralException Create weight package line.- Parameters:
orderId
- the order idpackageWeight
- the package weightpackageLength
- the package lengthpackageWidth
- the package widthpackageHeight
- the package heightshipmentBoxTypeId
- the shipment box type id- Throws:
GeneralException
- the general exception
-
getWeightPackageSeqId
public int getWeightPackageSeqId()Gets weight package seq id.- Returns:
- the weight package seq id
-
getFacilityId
Gets facility id.- Returns:
- the facility id
-
setFacilityId
Sets facility id.- Parameters:
facilityId
- the facility id
-
getPrimaryOrderId
Gets primary order id.- Returns:
- the primary order id
-
setPrimaryOrderId
Sets primary order id.- Parameters:
primaryOrderId
- the primary order id
-
getPrimaryShipGroupSeqId
Gets primary ship group seq id.- Returns:
- the primary ship group seq id
-
setPrimaryShipGroupSeqId
Sets primary ship group seq id.- Parameters:
primaryShipGrpSeqId
- the primary ship grp seq id
-
setPicklistBinId
Sets picklist bin id.- Parameters:
picklistBinId
- the picklist bin id
-
getPicklistBinId
Gets picklist bin id.- Returns:
- the picklist bin id
-
setEstimatedShipCost
Sets estimated ship cost.- Parameters:
estimatedShipCost
- the estimated ship cost
-
getEstimatedShipCost
Gets estimated ship cost.- Returns:
- the estimated ship cost
-
setActualShipCost
Sets actual ship cost.- Parameters:
actualShipCost
- the actual ship cost
-
getActualShipCost
Gets actual ship cost.- Returns:
- the actual ship cost
-
getShipmentId
Gets shipment id.- Returns:
- the shipment id
-
setShipmentId
Sets shipment id.- Parameters:
shipmentId
- the shipment id
-
getInvoiceId
Gets invoice id.- Returns:
- the invoice id
-
setInvoiceId
Sets invoice id.- Parameters:
invoiceId
- the invoice id
-
getWeightUomId
Gets weight uom id.- Returns:
- the weight uom id
-
setWeightUomId
Sets weight uom id.- Parameters:
weightUomId
- the weight uom id
-
getDimensionUomId
Gets dimension uom id.- Returns:
- the dimension uom id
-
setCarrierPartyId
Sets carrier party id.- Parameters:
carrierPartyId
- the carrier party id
-
setDimensionUomId
Sets dimension uom id.- Parameters:
dimensionUomId
- the dimension uom id
-
getShippableWeight
Gets shippable weight.- Parameters:
orderId
- the order id- Returns:
- the shippable weight
-
getPackedLines
Gets packed lines.- Returns:
- the packed lines
-
getPackedLines
Gets packed lines.- Parameters:
orderId
- the order id- Returns:
- the packed lines
-
getPackedLine
Gets packed line.- Parameters:
weightPackageSeqId
- the weight package seq id- Returns:
- the packed line
-
setPackageWeight
Sets package weight.- Parameters:
packageWeight
- the package weightweightPackageSeqId
- the weight package seq id
-
setPackageLength
Sets package length.- Parameters:
packageLength
- the package lengthweightPackageSeqId
- the weight package seq id
-
setPackageWidth
Sets package width.- Parameters:
packageWidth
- the package widthweightPackageSeqId
- the weight package seq id
-
setPackageHeight
Sets package height.- Parameters:
packageHeight
- the package heightweightPackageSeqId
- the weight package seq id
-
setShipmentBoxTypeId
Sets shipment box type id.- Parameters:
shipmentBoxTypeId
- the shipment box type idweightPackageSeqId
- the weight package seq id
-
deletePackedLine
public void deletePackedLine(int weightPackageSeqId) Delete packed line.- Parameters:
weightPackageSeqId
- the weight package seq id
-
setDimensionAndShipmentBoxType
public void setDimensionAndShipmentBoxType(int weightPackageSeqId) Sets dimension and shipment box type.- Parameters:
weightPackageSeqId
- the weight package seq id
-
clearPackedLines
Clear packed lines.- Parameters:
orderId
- the order id
-
complete
public String complete(String orderId, Locale locale, String calculateOnlineShippingRateFromUps) throws GeneralException Complete string.- Parameters:
orderId
- the order idlocale
- the localecalculateOnlineShippingRateFromUps
- the calculate online shipping rate from ups- Returns:
- the string
- Throws:
GeneralException
- the general exception
-
completeShipment
public boolean completeShipment(String orderId, String calculateOnlineShippingRateFromUps) throws GeneralException Complete shipment boolean.- Parameters:
orderId
- the order idcalculateOnlineShippingRateFromUps
- the calculate online shipping rate from ups- Returns:
- the boolean
- Throws:
GeneralException
- the general exception
-
upsShipmentConfirm
Ups shipment confirm big decimal.- Returns:
- the big decimal
- Throws:
GeneralException
- the general exception
-
upsShipmentAccept
Ups shipment accept.- Throws:
GeneralException
- the general exception
-
diffInShipCost
Diff in ship cost boolean.- Parameters:
actualShippingCost
- the actual shipping cost- Returns:
- the boolean
- Throws:
GeneralException
- the general exception
-
createPackages
Create packages.- Parameters:
orderId
- the order id- Throws:
GeneralException
- the general exception
-
changeOrderItemStatus
Change order item status.- Parameters:
orderId
- the order id- Throws:
GeneralException
- the general exception
-
applyItemsToPackages
Apply items to packages.- Parameters:
orderId
- the order id- Throws:
GeneralException
- the general exception
-
updateShipmentRouteSegments
Update shipment route segments.- Parameters:
orderId
- the order id- Throws:
GeneralException
- the general exception
-
setShipmentToPacked
Sets shipment to packed.- Throws:
GeneralException
- the general exception
-
getShipmentCostEstimate
public BigDecimal getShipmentCostEstimate(GenericValue orderItemShipGroup, String orderId, String productStoreId, List<GenericValue> shippableItemInfo, BigDecimal shippableTotal, BigDecimal shippableWeight, BigDecimal shippableQuantity) Gets shipment cost estimate.- Parameters:
orderItemShipGroup
- the order item ship grouporderId
- the order idproductStoreId
- the product store idshippableItemInfo
- the shippable item infoshippableTotal
- the shippable totalshippableWeight
- the shippable weightshippableQuantity
- the shippable quantity- Returns:
- the shipment cost estimate
-
getShipmentCostEstimate
public BigDecimal getShipmentCostEstimate(String shippingContactMechId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String orderId, String productStoreId, List<GenericValue> shippableItemInfo, BigDecimal shippableTotal, BigDecimal shippableWeight, BigDecimal shippableQuantity) Gets shipment cost estimate.- Parameters:
shippingContactMechId
- the shipping contact mech idshipmentMethodTypeId
- the shipment method type idcarrierPartyId
- the carrier party idcarrierRoleTypeId
- the carrier role type idorderId
- the order idproductStoreId
- the product store idshippableItemInfo
- the shippable item infoshippableTotal
- the shippable totalshippableWeight
- the shippable weightshippableQuantity
- the shippable quantity- Returns:
- the shipment cost estimate
-
savePackagesInfo
protected void savePackagesInfo(String orderId, String calculateOnlineShippingRateFromUps) throws GeneralException Save packages info.- Parameters:
orderId
- the order idcalculateOnlineShippingRateFromUps
- the calculate online shipping rate from ups- Throws:
GeneralException
- the general exception
-
getOrderedQuantity
Gets ordered quantity.- Parameters:
orderId
- the order id- Returns:
- the ordered quantity
-