com.softslate.commerce.businessobjects.shipping
Class FedExShippingProcessor

java.lang.Object
  extended by com.softslate.commerce.businessobjects.core.BaseBusinessObject
      extended by com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
          extended by com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
              extended by com.softslate.commerce.businessobjects.shipping.FedExShippingProcessor
All Implemented Interfaces:
BusinessObject, BusinessProcessor, ShippingProcessor

public class FedExShippingProcessor
extends BaseShippingProcessor
implements ShippingProcessor

Connects to the FedEx server for live online rates. Sends Web Service rate requests to the FedEx server and reads the responses from it. From the response, it builds a set of shipping options which get presented to the customer during checkout.

Author:
David Tobey
See Also:
ShippingProcessor, BaseShippingProcessor

Field Summary
(package private) static org.apache.commons.logging.Log log
           
 
Fields inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
currentDropShipperID, dropShipperIDs, dropShippers
 
Constructor Summary
FedExShippingProcessor()
           
 
Method Summary
private  com.fedex.rate.stub.RateRequest buildRateRequest(java.util.Map parameters)
           
 com.fedex.rate.stub.RequestedShipment buildRequestedShipment(java.util.Map parameters)
           
private  com.fedex.rate.stub.ClientDetail createClientDetail()
           
 com.fedex.rate.stub.RequestedPackageLineItem createPackage(java.util.Map parameters, OrderShippingRule osr, int count)
           
private  com.fedex.rate.stub.WebAuthenticationDetail createWebAuthenticationDetail()
           
 java.util.Collection doGlobalExtraCharge(java.util.Collection mergedRates)
           
 boolean isInCommaSeparatedString(java.lang.String value, java.lang.String commaSeparatedString)
           
private  boolean isResponseOk(com.fedex.rate.stub.NotificationSeverityType notificationSeverityType)
           
 java.util.Collection loadShippingOptions()
           
 java.lang.String lookUpNameFromCode(java.lang.String code)
           
 java.lang.String missingRequiredSettings()
           
private  java.util.Map processErrors(com.fedex.rate.stub.Notification[] notifications)
           
private  java.util.Map processRateResponse(java.util.Map parameters, com.fedex.rate.stub.RateReply reply)
           
 int processShipping()
           
 java.util.Map requestRates(java.util.Map parameters)
           
private  void updateEndPoint(com.fedex.rate.stub.RateServiceLocator serviceLocator)
           
 
Methods inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
doEstimatedDeliveryDate, findPackageWeight, getAvailableOptions, getShippingOption, isPackageOkToCreate, loadShippingOptions, mergeRates, orderHasGiftCertificatesOnly, processShipping, retrieveDropShippersFromOrder, setAvailableOptions, setShippingOption, updateOrderWithOption, updateOrderWithOptionPrice, updateTotalsAndStatuses, updateTotalsAndStatusesInDatabase, verifyOption
 
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getProductIDs, getSettings, getUser, initialize, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPPost, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setSettings, setUser, updateOrderTotals, updateOrderTotals, utils
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.softslate.commerce.businessobjects.shipping.ShippingProcessor
loadShippingOptions, processShipping
 
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
 

Field Detail

log

static org.apache.commons.logging.Log log
Constructor Detail

FedExShippingProcessor

public FedExShippingProcessor()
Method Detail

loadShippingOptions

public java.util.Collection loadShippingOptions()
                                         throws java.lang.Exception
Specified by:
loadShippingOptions in class BaseShippingProcessor
Throws:
java.lang.Exception

processShipping

public int processShipping()
                    throws java.lang.Exception
Specified by:
processShipping in class BaseShippingProcessor
Throws:
java.lang.Exception

requestRates

public java.util.Map requestRates(java.util.Map parameters)
                           throws java.lang.Exception
Throws:
java.lang.Exception

buildRateRequest

private com.fedex.rate.stub.RateRequest buildRateRequest(java.util.Map parameters)

buildRequestedShipment

public com.fedex.rate.stub.RequestedShipment buildRequestedShipment(java.util.Map parameters)

createPackage

public com.fedex.rate.stub.RequestedPackageLineItem createPackage(java.util.Map parameters,
                                                                  OrderShippingRule osr,
                                                                  int count)

processRateResponse

private java.util.Map processRateResponse(java.util.Map parameters,
                                          com.fedex.rate.stub.RateReply reply)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

isResponseOk

private boolean isResponseOk(com.fedex.rate.stub.NotificationSeverityType notificationSeverityType)

createClientDetail

private com.fedex.rate.stub.ClientDetail createClientDetail()

createWebAuthenticationDetail

private com.fedex.rate.stub.WebAuthenticationDetail createWebAuthenticationDetail()

processErrors

private java.util.Map processErrors(com.fedex.rate.stub.Notification[] notifications)

updateEndPoint

private void updateEndPoint(com.fedex.rate.stub.RateServiceLocator serviceLocator)

isInCommaSeparatedString

public boolean isInCommaSeparatedString(java.lang.String value,
                                        java.lang.String commaSeparatedString)

doGlobalExtraCharge

public java.util.Collection doGlobalExtraCharge(java.util.Collection mergedRates)

missingRequiredSettings

public java.lang.String missingRequiredSettings()

lookUpNameFromCode

public java.lang.String lookUpNameFromCode(java.lang.String code)


Copyright © SoftSlate, LLC 2003–2012