|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.shipping.BaseShippingProcessor
public abstract class BaseShippingProcessor
Abstract class that provides methods useful for
ShippingProcessor implementations.
| Field Summary | |
|---|---|
private java.util.Collection |
availableOptions
|
java.lang.Integer |
currentDropShipperID
|
java.util.Collection |
dropShipperIDs
|
java.util.Collection |
dropShippers
|
(package private) static org.apache.commons.logging.Log |
log
|
private java.lang.String |
shippingOption
|
| Constructor Summary | |
|---|---|
BaseShippingProcessor()
|
|
| Method Summary | |
|---|---|
java.lang.String |
doEstimatedDeliveryDate(java.lang.Integer deliveryDays)
|
java.lang.Double |
findPackageWeight(OrderShippingRule osr)
|
java.util.Collection |
getAvailableOptions()
|
java.lang.String |
getShippingOption()
|
boolean |
isPackageOkToCreate(OrderShippingRule osr)
|
abstract java.util.Collection |
loadShippingOptions()
|
java.util.Collection |
loadShippingOptions(java.util.Map argument)
Load the shipping options related to this ShippingProcessor. |
java.util.Collection |
mergeRates(java.util.Collection mergedRates,
java.util.Collection rates)
|
boolean |
orderHasGiftCertificatesOnly(Order order)
|
abstract int |
processShipping()
|
java.util.Map |
processShipping(java.util.Map parameters)
Assists with processing of shipping charges. |
java.util.Collection |
retrieveDropShippersFromOrder(Order order)
Returns a Collection of Manufacturer objects associated with the order items in the given order, whose "isDropShipper" flag is set to true. |
void |
setAvailableOptions(java.util.Collection availableOptions)
|
void |
setShippingOption(java.lang.String string)
|
void |
updateOrderWithOption()
Sets the option the user selected in the user's order, by default in the order delivery's status details field. |
void |
updateOrderWithOptionPrice()
Sets the shipping price in the order based on the option the user selected. |
void |
updateTotalsAndStatuses()
Updates the totals and statuses of a user's order with a new shipping charge included. |
void |
updateTotalsAndStatusesInDatabase()
|
boolean |
verifyOption()
Verifies that the option the user selected is allowed by checking it against the Collection of avialable options. |
| 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.core.BusinessObject |
|---|
initialize |
| Field Detail |
|---|
static org.apache.commons.logging.Log log
private java.lang.String shippingOption
private java.util.Collection availableOptions
public java.util.Collection dropShipperIDs
public java.util.Collection dropShippers
public java.lang.Integer currentDropShipperID
| Constructor Detail |
|---|
public BaseShippingProcessor()
| Method Detail |
|---|
public java.lang.String getShippingOption()
public void setShippingOption(java.lang.String string)
public java.util.Collection getAvailableOptions()
public void setAvailableOptions(java.util.Collection availableOptions)
public java.util.Collection loadShippingOptions(java.util.Map argument)
throws java.lang.Exception
ShippingProcessorShippingProcessor.
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:
String code for the shipping option
under this shipping processor. E.g., "GROUND".String name of the shipping option for
diplay to users. E.g., "Ground".String and including currency formatting, for display to
the user.Double.
loadShippingOptions in interface ShippingProcessorargument - A Map containing information from the current request.
Collection of Map objects that
contain the code, name, and price for each shipping option
related to this ShippingProcessor.
java.lang.Exception
public abstract java.util.Collection loadShippingOptions()
throws java.lang.Exception
java.lang.Exception
public abstract int processShipping()
throws java.lang.Exception
java.lang.Exception
public java.util.Map processShipping(java.util.Map parameters)
throws java.lang.Exception
Map of parameters to this
BaseShippingProcessor instance and calls
processShipping() followed by
updateTotalsAndStatuses() to update the order's totals.
Finally, writes the new totals to the database using
OrderGatewayDAO.updateOrderAndDelivery(boolean, com.softslate.commerce.businessobjects.order.Order, com.softslate.commerce.businessobjects.order.OrderDelivery).
processShipping in interface ShippingProcessorparameters - A Map containing the shipping infofmation submitted by the
user. It should contain a key named
shippingOption that contains the
code of the shipping option selected by the
user.
java.lang.Exceptionpublic boolean verifyOption()
public void updateOrderWithOption()
public void updateOrderWithOptionPrice()
public void updateTotalsAndStatuses()
throws java.lang.Exception
Order and that order's first
OrderDelivery are updated with new price totals, and
subtotals.
java.lang.Exception
public void updateTotalsAndStatusesInDatabase()
throws java.lang.Exception
java.lang.Exception
public java.util.Collection retrieveDropShippersFromOrder(Order order)
throws java.lang.Exception
order -
java.lang.Exceptionpublic boolean isPackageOkToCreate(OrderShippingRule osr)
public java.lang.Double findPackageWeight(OrderShippingRule osr)
public java.util.Collection mergeRates(java.util.Collection mergedRates,
java.util.Collection rates)
public java.lang.String doEstimatedDeliveryDate(java.lang.Integer deliveryDays)
public boolean orderHasGiftCertificatesOnly(Order order)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||