org.broadleafcommerce.pricing.service.module
Class USPSShippingCalculationModule
java.lang.Object
org.broadleafcommerce.pricing.service.module.USPSShippingCalculationModule
- All Implemented Interfaces:
- ShippingModule
- Direct Known Subclasses:
- USPSSingleItemPerPackageShippingCalculationModule
public abstract class USPSShippingCalculationModule
- extends java.lang.Object
- implements ShippingModule
This module will utilize the USPSShippingCalculationService to take your fulfillment group
order items and calculate the total shipping rate. Developers must extend this class and
implement their own algorithm in the createPackages method for packaging individual items
into one or more boxes.
- Author:
- jfischer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected java.lang.String name
originationPostalCode
protected java.lang.String originationPostalCode
isDefaultModule
protected java.lang.Boolean isDefaultModule
shippingCalculationService
protected USPSShippingCalculationService shippingCalculationService
USPSShippingCalculationModule
public USPSShippingCalculationModule()
calculateShippingForFulfillmentGroup
public FulfillmentGroup calculateShippingForFulfillmentGroup(FulfillmentGroup fulfillmentGroup)
throws ShippingPriceException
- Specified by:
calculateShippingForFulfillmentGroup in interface ShippingModule
- Throws:
ShippingPriceException
deducePostage
protected USPSPostage deducePostage(USPSServiceResponseType responseType,
java.util.List<USPSContainerItemRequest> requestItems,
USPSContainerItemResponse itemResponse)
findRequestByPackageId
protected USPSContainerItemRequest findRequestByPackageId(java.lang.String packageId,
java.util.List<USPSContainerItemRequest> requestItems)
getName
public java.lang.String getName()
- Specified by:
getName in interface ShippingModule
setName
public void setName(java.lang.String name)
- Specified by:
setName in interface ShippingModule
createPackages
protected abstract java.util.List<USPSContainerItemRequest> createPackages(FulfillmentGroup fulfillmentGroup)
throws ShippingPriceException
- Throws:
ShippingPriceException
isValidModuleForService
public java.lang.Boolean isValidModuleForService(java.lang.String serviceName)
- Specified by:
isValidModuleForService in interface ShippingModule
getOriginationPostalCode
public java.lang.String getOriginationPostalCode()
setOriginationPostalCode
public void setOriginationPostalCode(java.lang.String originationPostalCode)
isDefaultModule
public java.lang.Boolean isDefaultModule()
- Specified by:
isDefaultModule in interface ShippingModule
setDefaultModule
public void setDefaultModule(java.lang.Boolean isDefaultModule)
- Specified by:
setDefaultModule in interface ShippingModule
Copyright © 2012. All Rights Reserved.