com.konakart.bl.modules.shipping.ups
Class Ups

java.lang.Object
  extended by com.konakart.bl.modules.BaseModule
      extended by com.konakart.bl.modules.shipping.BaseShippingModule
          extended by com.konakart.bl.modules.shipping.ups.Ups
All Implemented Interfaces:
ShippingInterface

public class Ups
extends BaseShippingModule
implements ShippingInterface

This shipping module communicates with UPS to retrieve shipping rates. Using the Admin App you must set up the following configuration variables: UPS Module:

Shipping and Packaging under Configuration


Nested Class Summary
protected  class Ups.StaticData
          Used to store the static data of this module
 
Field Summary
 
Fields inherited from class com.konakart.bl.modules.shipping.BaseShippingModule
log
 
Fields inherited from class com.konakart.bl.modules.BaseModule
basePackage
 
Constructor Summary
Ups(KKEngIf eng)
          Constructor
 
Method Summary
 ShippingQuote getQuote(Order order, ShippingInfo info)
          We get a quote from UPS.
 boolean isAvailable()
          Returns true or false
 void setStaticVariables()
          Sets some static variables during setup
 
Methods inherited from class com.konakart.bl.modules.shipping.BaseShippingModule
checkForProducts, checkZone
 
Methods inherited from class com.konakart.bl.modules.BaseModule
getBasketMgr, getCatMgr, getConfigMgr, getConfiguration, getConfigurationValue, getConfigurationValueAsBigDecimalWithDefault, getConfigurationValueAsBool, getConfigurationValueAsIntWithDefault, getCurrMgr, getCustMgr, getEmailMgr, getEng, getLangMgr, getMultiStoreMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getPromMgr, getResourceBundle, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getTaxMgr, init, isAvailable, isAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ups

public Ups(KKEngIf eng)
    throws org.apache.torque.TorqueException,
           KKException,
           com.workingdogs.village.DataSetException
Constructor

Parameters:
eng -
Throws:
com.workingdogs.village.DataSetException
KKException
org.apache.torque.TorqueException
Method Detail

getQuote

public ShippingQuote getQuote(Order order,
                              ShippingInfo info)
                       throws java.lang.Exception
We get a quote from UPS. If we only get one quote back then we return a ShippingQuote object with the details of the quote. If we get back more than one quote then we create an array of ShippingQuote objects and attach them to the ShippingQuote object that we return. In this case all of the quotes must be in the array since the quote itself isn't processed. It becomes more complex when we have the shipment split into a number of packages. The split is done by the manager calling this method and is presented to us in an orderWeightList. For each item in the list, we call UPS and get back one or more quotes. We then have to add up the quotes and return them as single quotes that can be displayed on the screen.

Specified by:
getQuote in interface ShippingInterface
Parameters:
order - The order object
Returns:
Returns a ShippingQuote object
Throws:
java.lang.Exception

isAvailable

public boolean isAvailable()
                    throws KKException
Returns true or false

Specified by:
isAvailable in interface ShippingInterface
Returns:
True or False
Throws:
KKException

setStaticVariables

public void setStaticVariables()
                        throws KKException
Sets some static variables during setup

Specified by:
setStaticVariables in interface ShippingInterface
Throws:
KKException


Copyright © 2011 DS Data Systems UK Ltd.