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:
com.konakart.bl.modules.shipping.ShippingInterface

public class Ups
extends BaseShippingModule
implements com.konakart.bl.modules.shipping.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


Field Summary
 
Fields inherited from class com.konakart.bl.modules.BaseModule
basePackage, log
 
Constructor Summary
Ups()
          Constructor
 
Method Summary
 com.konakart.app.ShippingQuote getQuote(com.konakart.app.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
getResourceBundle, isAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ups

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

Throws:
com.workingdogs.village.DataSetException
com.konakart.app.KKException
org.apache.torque.TorqueException
Method Detail

getQuote

public com.konakart.app.ShippingQuote getQuote(com.konakart.app.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 com.konakart.bl.modules.shipping.ShippingInterface
Parameters:
order - The order object
Returns:
Returns a ShippingQuote object
Throws:
java.lang.Exception

isAvailable

public boolean isAvailable()
                    throws com.konakart.app.KKException
Returns true or false

Specified by:
isAvailable in interface com.konakart.bl.modules.shipping.ShippingInterface
Throws:
com.konakart.app.KKException

setStaticVariables

public void setStaticVariables()
                        throws com.konakart.app.KKException
Sets some static variables during setup

Specified by:
setStaticVariables in interface com.konakart.bl.modules.shipping.ShippingInterface
Throws:
com.konakart.app.KKException


Copyright © 2006 DS Data Systems UK Ltd.