com.softslate.commerce.businessobjects.shipping
Class BasicShippingProcessor

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

public class BasicShippingProcessor
extends BaseShippingProcessor
implements ShippingProcessor

Loads shipping options and processes shipping charges in the store. This implementation looks up the shipping methods and rates configured in the npcShippingMethod and npcShippingRates tables, which provide for number of table-based shipping methods.

BasicShippingProcessor is the default implementation of the ShippingProcessor interface for the application.

Version:
$Id: BasicShippingProcessor.java,v 1.3 2004/10/28 15:07:13 dtobey Exp $
Author:
David Tobey
See Also:
ShippingProcessor

Field Summary
(package private) static org.apache.commons.logging.Log log
           
 
Fields inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
 
Fields inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
 
Constructor Summary
BasicShippingProcessor()
           
 
Method Summary
 java.util.Collection computeShippingOptions(java.util.Collection methodsAndRates)
           
 java.util.Collection loadActiveMethodsAndRates()
           
 java.util.Collection loadActiveRatesByMethodCode(java.lang.String code)
           
 java.util.Collection loadShippingOptions()
          Load the shipping options related to this ShippingProcessor.
 int processShipping()
           
 
Methods inherited from class com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
getShippingOption, processShipping, setShippingOption, updateTotalsAndStatuses
 
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
formatPrice, getBusinessObjectFactory, getDaoFactory, getSettingsBean, getUser, initialize, setBusinessObjectFactory, setDaoFactory, setSettingsBean, setUser
 
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessObject
formatDateTime, parseDateTime, prepareRequestData, sendHTTPPost
 
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
processShipping
 
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
 

Field Detail

log

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

BasicShippingProcessor

public BasicShippingProcessor()
Method Detail

loadShippingOptions

public java.util.Collection loadShippingOptions()
                                         throws java.lang.Exception
Description copied from interface: ShippingProcessor
Load the shipping options related to this ShippingProcessor.

Shipping options might include, for example, ground, 2-day air, bulk, etc.

The Collection returned should be a collection of Map objects that must include the following keys:

Specified by:
loadShippingOptions in interface ShippingProcessor
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

loadActiveMethodsAndRates

public java.util.Collection loadActiveMethodsAndRates()
                                               throws java.lang.Exception
Throws:
java.lang.Exception

loadActiveRatesByMethodCode

public java.util.Collection loadActiveRatesByMethodCode(java.lang.String code)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

computeShippingOptions

public java.util.Collection computeShippingOptions(java.util.Collection methodsAndRates)
                                            throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © SoftSlate, Inc. 2003–2005