com.konakart.bl.modules.shipping
Class ShippingMgr

java.lang.Object
  extended by com.konakart.bl.BaseMgr
      extended by com.konakart.bl.modules.shipping.ShippingMgr
All Implemented Interfaces:
ShippingMgrIf

public class ShippingMgr
extends BaseMgr
implements ShippingMgrIf

Shipping Manager


Nested Class Summary
protected  class ShippingMgr.SortOrderComparator
           
protected  class ShippingMgr.StaticData
          Used to store the static data of this manager
 
Field Summary
protected static java.lang.String BOTH
           
protected static java.lang.String FREE_SHIPPING
           
protected static java.lang.String FREE_SHIPPING_DESCRIPTION
           
protected static java.lang.String FREE_SHIPPING_OVER
           
protected static java.lang.String FREE_SHIPPING_TITLE
           
protected static java.lang.String INTERNATIONAL
           
protected static org.apache.commons.logging.Log log
          the log
protected static java.lang.String MODULE_SHIPPING_INSTALLED
           
protected static java.lang.String mutex
           
protected static java.lang.String NATIONAL
           
protected static java.util.HashMap<java.util.Locale,java.util.ResourceBundle> resourceBundleMap
           
protected static java.lang.String SHIPPING_BOX_PADDING
           
protected static java.lang.String SHIPPING_BOX_WEIGHT
           
protected static java.lang.String SHIPPING_DESTINATION
           
protected static java.lang.String SHIPPING_MAX_WEIGHT
           
protected static java.lang.String SHIPPING_ORIGIN_COUNTRY
           
protected static java.lang.String SHIPPING_ORIGIN_ZIP
           
protected static java.util.Map<java.lang.String,ShippingMgr.StaticData> staticDataHM
          Hash Map that contains the static data
protected static java.lang.String STORE_COUNTRY
           
 
Fields inherited from class com.konakart.bl.BaseMgr
templateBaseDir
 
Constructor Summary
ShippingMgr(KKEngIf eng)
          Constructor
 
Method Summary
protected  void checkOrder(Order order)
          Checks the order to see whether all compulsory attributes are present
protected  java.lang.String getJavaModuleName(java.lang.String moduleName)
          Whatever the module name is, the package name is the module name in lowercase and the class name starts with an upper case character
 java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
          The resource bundle is fetched for the locale and stored in a static hash table.
protected  ShippingInfo getShippingInfo()
           
 ShippingQuote getShippingQuote(OrderIf order, java.lang.String moduleName, int languageId)
          Returns a single ShippingQuote object for an order.
 ShippingQuote[] getShippingQuotes(OrderIf order, int languageId)
          Returns an array of available ShippingQuote objects for an order.
protected  ShippingQuote[] getShippingQuotesPrivate(OrderIf order, java.lang.String moduleName, int languageId)
           
 void refreshConfigs()
          Refresh Configuration Variables
 
Methods inherited from class com.konakart.bl.BaseMgr
addInsertAttr, addInsertAttr, checkRequired, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getLangMgr, getManuMgr, getMiscItemMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getPromMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, isEnterprise, isMultiStoreShareCustomers, isMultiStoreShareProducts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
the log


mutex

protected static java.lang.String mutex

resourceBundleMap

protected static java.util.HashMap<java.util.Locale,java.util.ResourceBundle> resourceBundleMap

staticDataHM

protected static java.util.Map<java.lang.String,ShippingMgr.StaticData> staticDataHM
Hash Map that contains the static data


SHIPPING_ORIGIN_COUNTRY

protected static final java.lang.String SHIPPING_ORIGIN_COUNTRY
See Also:
Constant Field Values

SHIPPING_ORIGIN_ZIP

protected static final java.lang.String SHIPPING_ORIGIN_ZIP
See Also:
Constant Field Values

SHIPPING_MAX_WEIGHT

protected static final java.lang.String SHIPPING_MAX_WEIGHT
See Also:
Constant Field Values

SHIPPING_BOX_WEIGHT

protected static final java.lang.String SHIPPING_BOX_WEIGHT
See Also:
Constant Field Values

SHIPPING_BOX_PADDING

protected static final java.lang.String SHIPPING_BOX_PADDING
See Also:
Constant Field Values

MODULE_SHIPPING_INSTALLED

protected static final java.lang.String MODULE_SHIPPING_INSTALLED
See Also:
Constant Field Values

FREE_SHIPPING

protected static final java.lang.String FREE_SHIPPING
See Also:
Constant Field Values

FREE_SHIPPING_OVER

protected static final java.lang.String FREE_SHIPPING_OVER
See Also:
Constant Field Values

SHIPPING_DESTINATION

protected static final java.lang.String SHIPPING_DESTINATION
See Also:
Constant Field Values

STORE_COUNTRY

protected static final java.lang.String STORE_COUNTRY
See Also:
Constant Field Values

NATIONAL

protected static final java.lang.String NATIONAL
See Also:
Constant Field Values

INTERNATIONAL

protected static final java.lang.String INTERNATIONAL
See Also:
Constant Field Values

BOTH

protected static final java.lang.String BOTH
See Also:
Constant Field Values

FREE_SHIPPING_TITLE

protected static final java.lang.String FREE_SHIPPING_TITLE
See Also:
Constant Field Values

FREE_SHIPPING_DESCRIPTION

protected static final java.lang.String FREE_SHIPPING_DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

ShippingMgr

public ShippingMgr(KKEngIf eng)
            throws java.lang.Exception
Constructor

Parameters:
eng -
Throws:
java.lang.Exception
Method Detail

refreshConfigs

public void refreshConfigs()
                    throws java.lang.Exception
Refresh Configuration Variables

Specified by:
refreshConfigs in interface ShippingMgrIf
Throws:
java.lang.Exception

getShippingInfo

protected ShippingInfo getShippingInfo()
                                throws KKException
Returns:
Returns a partially filled in ShippingInfo object
Throws:
KKException

getShippingQuotes

public ShippingQuote[] getShippingQuotes(OrderIf order,
                                         int languageId)
                                  throws java.lang.Exception
Description copied from interface: ShippingMgrIf
Returns an array of available ShippingQuote objects for an order.

Specified by:
getShippingQuotes in interface ShippingMgrIf
Parameters:
order -
languageId -
Returns:
An array of shipping quotes
Throws:
java.lang.Exception

getShippingQuote

public ShippingQuote getShippingQuote(OrderIf order,
                                      java.lang.String moduleName,
                                      int languageId)
                               throws java.lang.Exception
Description copied from interface: ShippingMgrIf
Returns a single ShippingQuote object for an order. The shipping module used is the one referenced by moduleName.

Specified by:
getShippingQuote in interface ShippingMgrIf
Parameters:
order -
moduleName -
languageId -
Returns:
A shipping quote
Throws:
java.lang.Exception

getShippingQuotesPrivate

protected ShippingQuote[] getShippingQuotesPrivate(OrderIf order,
                                                   java.lang.String moduleName,
                                                   int languageId)
                                            throws java.lang.Exception
Parameters:
order -
languageId -
Returns:
An array of shipping quotes
Throws:
java.lang.Exception

getJavaModuleName

protected java.lang.String getJavaModuleName(java.lang.String moduleName)
Whatever the module name is, the package name is the module name in lowercase and the class name starts with an upper case character

Parameters:
moduleName -
Returns:
Returns the java compatible name

checkOrder

protected void checkOrder(Order order)
                   throws KKException
Checks the order to see whether all compulsory attributes are present

Parameters:
order -
Throws:
KKException

getResourceBundle

public java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
                                           throws KKException
The resource bundle is fetched for the locale and stored in a static hash table. Next time around it is retrieved from the hash table.

Specified by:
getResourceBundle in interface ShippingMgrIf
Parameters:
locale -
Returns:
The resource bundle referenced by the locale
Throws:
KKException


Copyright © 2011 DS Data Systems UK Ltd.