Class WeightPackageSession

java.lang.Object
org.apache.ofbiz.shipment.weightPackage.WeightPackageSession
All Implemented Interfaces:
Serializable

public class WeightPackageSession extends Object implements Serializable
The type Weight package session.
See Also:
  • Constructor Details

  • Method Details

    • getDispatcher

      public LocalDispatcher getDispatcher()
      Gets dispatcher.
      Returns:
      the dispatcher
    • getDelegator

      public Delegator 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 id
      packageWeight - the package weight
      packageLength - the package length
      packageWidth - the package width
      packageHeight - the package height
      shipmentBoxTypeId - 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

      public String getFacilityId()
      Gets facility id.
      Returns:
      the facility id
    • setFacilityId

      public void setFacilityId(String facilityId)
      Sets facility id.
      Parameters:
      facilityId - the facility id
    • getPrimaryOrderId

      public String getPrimaryOrderId()
      Gets primary order id.
      Returns:
      the primary order id
    • setPrimaryOrderId

      public void setPrimaryOrderId(String primaryOrderId)
      Sets primary order id.
      Parameters:
      primaryOrderId - the primary order id
    • getPrimaryShipGroupSeqId

      public String getPrimaryShipGroupSeqId()
      Gets primary ship group seq id.
      Returns:
      the primary ship group seq id
    • setPrimaryShipGroupSeqId

      public void setPrimaryShipGroupSeqId(String primaryShipGrpSeqId)
      Sets primary ship group seq id.
      Parameters:
      primaryShipGrpSeqId - the primary ship grp seq id
    • setPicklistBinId

      public void setPicklistBinId(String picklistBinId)
      Sets picklist bin id.
      Parameters:
      picklistBinId - the picklist bin id
    • getPicklistBinId

      public String getPicklistBinId()
      Gets picklist bin id.
      Returns:
      the picklist bin id
    • setEstimatedShipCost

      public void setEstimatedShipCost(BigDecimal estimatedShipCost)
      Sets estimated ship cost.
      Parameters:
      estimatedShipCost - the estimated ship cost
    • getEstimatedShipCost

      public BigDecimal getEstimatedShipCost()
      Gets estimated ship cost.
      Returns:
      the estimated ship cost
    • setActualShipCost

      public void setActualShipCost(BigDecimal actualShipCost)
      Sets actual ship cost.
      Parameters:
      actualShipCost - the actual ship cost
    • getActualShipCost

      public BigDecimal getActualShipCost()
      Gets actual ship cost.
      Returns:
      the actual ship cost
    • getShipmentId

      public String getShipmentId()
      Gets shipment id.
      Returns:
      the shipment id
    • setShipmentId

      public void setShipmentId(String shipmentId)
      Sets shipment id.
      Parameters:
      shipmentId - the shipment id
    • getInvoiceId

      public String getInvoiceId()
      Gets invoice id.
      Returns:
      the invoice id
    • setInvoiceId

      public void setInvoiceId(String invoiceId)
      Sets invoice id.
      Parameters:
      invoiceId - the invoice id
    • getWeightUomId

      public String getWeightUomId()
      Gets weight uom id.
      Returns:
      the weight uom id
    • setWeightUomId

      public void setWeightUomId(String weightUomId)
      Sets weight uom id.
      Parameters:
      weightUomId - the weight uom id
    • getDimensionUomId

      public String getDimensionUomId()
      Gets dimension uom id.
      Returns:
      the dimension uom id
    • setCarrierPartyId

      public void setCarrierPartyId(String carrierPartyId)
      Sets carrier party id.
      Parameters:
      carrierPartyId - the carrier party id
    • setDimensionUomId

      public void setDimensionUomId(String dimensionUomId)
      Sets dimension uom id.
      Parameters:
      dimensionUomId - the dimension uom id
    • getShippableWeight

      public BigDecimal getShippableWeight(String orderId)
      Gets shippable weight.
      Parameters:
      orderId - the order id
      Returns:
      the shippable weight
    • getPackedLines

      public List<WeightPackageSessionLine> getPackedLines()
      Gets packed lines.
      Returns:
      the packed lines
    • getPackedLines

      public List<WeightPackageSessionLine> getPackedLines(String orderId)
      Gets packed lines.
      Parameters:
      orderId - the order id
      Returns:
      the packed lines
    • getPackedLine

      public WeightPackageSessionLine getPackedLine(int weightPackageSeqId)
      Gets packed line.
      Parameters:
      weightPackageSeqId - the weight package seq id
      Returns:
      the packed line
    • setPackageWeight

      public void setPackageWeight(BigDecimal packageWeight, int weightPackageSeqId)
      Sets package weight.
      Parameters:
      packageWeight - the package weight
      weightPackageSeqId - the weight package seq id
    • setPackageLength

      public void setPackageLength(BigDecimal packageLength, int weightPackageSeqId)
      Sets package length.
      Parameters:
      packageLength - the package length
      weightPackageSeqId - the weight package seq id
    • setPackageWidth

      public void setPackageWidth(BigDecimal packageWidth, int weightPackageSeqId)
      Sets package width.
      Parameters:
      packageWidth - the package width
      weightPackageSeqId - the weight package seq id
    • setPackageHeight

      public void setPackageHeight(BigDecimal packageHeight, int weightPackageSeqId)
      Sets package height.
      Parameters:
      packageHeight - the package height
      weightPackageSeqId - the weight package seq id
    • setShipmentBoxTypeId

      public void setShipmentBoxTypeId(String shipmentBoxTypeId, int weightPackageSeqId)
      Sets shipment box type id.
      Parameters:
      shipmentBoxTypeId - the shipment box type id
      weightPackageSeqId - 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

      public void clearPackedLines(String orderId)
      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 id
      locale - the locale
      calculateOnlineShippingRateFromUps - 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 id
      calculateOnlineShippingRateFromUps - the calculate online shipping rate from ups
      Returns:
      the boolean
      Throws:
      GeneralException - the general exception
    • upsShipmentConfirm

      protected BigDecimal upsShipmentConfirm() throws GeneralException
      Ups shipment confirm big decimal.
      Returns:
      the big decimal
      Throws:
      GeneralException - the general exception
    • upsShipmentAccept

      protected void upsShipmentAccept() throws GeneralException
      Ups shipment accept.
      Throws:
      GeneralException - the general exception
    • diffInShipCost

      protected boolean diffInShipCost(BigDecimal actualShippingCost) throws GeneralException
      Diff in ship cost boolean.
      Parameters:
      actualShippingCost - the actual shipping cost
      Returns:
      the boolean
      Throws:
      GeneralException - the general exception
    • createPackages

      protected void createPackages(String orderId) throws GeneralException
      Create packages.
      Parameters:
      orderId - the order id
      Throws:
      GeneralException - the general exception
    • changeOrderItemStatus

      protected void changeOrderItemStatus(String orderId) throws GeneralException
      Change order item status.
      Parameters:
      orderId - the order id
      Throws:
      GeneralException - the general exception
    • applyItemsToPackages

      protected void applyItemsToPackages(String orderId) throws GeneralException
      Apply items to packages.
      Parameters:
      orderId - the order id
      Throws:
      GeneralException - the general exception
    • updateShipmentRouteSegments

      protected void updateShipmentRouteSegments(String orderId) throws GeneralException
      Update shipment route segments.
      Parameters:
      orderId - the order id
      Throws:
      GeneralException - the general exception
    • setShipmentToPacked

      protected void setShipmentToPacked() throws GeneralException
      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 group
      orderId - the order id
      productStoreId - the product store id
      shippableItemInfo - the shippable item info
      shippableTotal - the shippable total
      shippableWeight - the shippable weight
      shippableQuantity - 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 id
      shipmentMethodTypeId - the shipment method type id
      carrierPartyId - the carrier party id
      carrierRoleTypeId - the carrier role type id
      orderId - the order id
      productStoreId - the product store id
      shippableItemInfo - the shippable item info
      shippableTotal - the shippable total
      shippableWeight - the shippable weight
      shippableQuantity - 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 id
      calculateOnlineShippingRateFromUps - the calculate online shipping rate from ups
      Throws:
      GeneralException - the general exception
    • getOrderedQuantity

      protected Integer getOrderedQuantity(String orderId)
      Gets ordered quantity.
      Parameters:
      orderId - the order id
      Returns:
      the ordered quantity