com.konakart.bl
Class StoreMgr

java.lang.Object
  extended by com.konakart.bl.BaseMgr
      extended by com.konakart.bl.StoreMgr
All Implemented Interfaces:
StoreMgrIf

public class StoreMgr
extends BaseMgr
implements StoreMgrIf

Manages all business logic relevant to the management of Stores for the Application Engine


Nested Class Summary
protected  class StoreMgr.StaticData
          Used to store the static data of this manager
 
Field Summary
protected static org.apache.commons.logging.Log log
          the log
protected static java.lang.String mutex
          Mutex for the Manager
protected static java.util.Map<java.lang.String,StoreMgr.StaticData> staticDataHM
          Hash Map that contains the static data
protected static int STORE_STATUS_TIMEOUT_SECS
          we read the store status from the db if it is older than this number of secs
 
Fields inherited from class com.konakart.bl.BaseMgr
templateBaseDir
 
Constructor Summary
StoreMgr(KKEngIf eng)
          Constructor
 
Method Summary
 boolean doesStoreExist(java.lang.String storeId)
          Return true if the store exists.
 Store getStore()
          Returns the store that this KonaKart engine is connected to.
 java.lang.String[] getStores()
          Get a list of stores from the database
 Store getStoreStatusById(java.lang.String storeId, boolean forceRefresh)
          Return the status elements of the Store object from the database with the specified storeId.
protected  Store getStoreStatusByIdPrivate(java.lang.String storeId)
          Return the status elements of the Store object from the database with the specified storeId
protected  void setCriteriaWithStandardAttributes(KKCriteria c)
          Set Standard Criteria
protected  void setCriteriaWithStatusAttributes(KKCriteria c)
          Set Criteria with status attributes
 
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

STORE_STATUS_TIMEOUT_SECS

protected static final int STORE_STATUS_TIMEOUT_SECS
we read the store status from the db if it is older than this number of secs

See Also:
Constant Field Values

log

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


mutex

protected static java.lang.String mutex
Mutex for the Manager


staticDataHM

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

Constructor Detail

StoreMgr

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

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

doesStoreExist

public boolean doesStoreExist(java.lang.String storeId)
                       throws org.apache.torque.TorqueException
Return true if the store exists.

Specified by:
doesStoreExist in interface StoreMgrIf
Parameters:
storeId - store id
Returns:
True if the Store exists
Throws:
org.apache.torque.TorqueException

getStores

public java.lang.String[] getStores()
                             throws org.apache.torque.TorqueException,
                                    com.workingdogs.village.DataSetException
Get a list of stores from the database

Specified by:
getStores in interface StoreMgrIf
Returns:
an array of Store names - from 0 to n elements
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getStoreStatusById

public Store getStoreStatusById(java.lang.String storeId,
                                boolean forceRefresh)
                         throws KKException
Return the status elements of the Store object from the database with the specified storeId. Since this method is called on every API call, to improve performance the status is cached and refreshed after a programmable number of seconds. A forced refresh of the cache occurs if forceRefresh is set to true.

Specified by:
getStoreStatusById in interface StoreMgrIf
Parameters:
storeId - the storeId of the Store object to retrieve.
forceRefresh - When set, the cached data is refreshed from the database
Returns:
a partly-filled Store object or null if the store isn't found
Throws:
KKException

getStoreStatusByIdPrivate

protected Store getStoreStatusByIdPrivate(java.lang.String storeId)
                                   throws KKException
Return the status elements of the Store object from the database with the specified storeId

Parameters:
storeId - the storeId of the Store object to retrieve.
Returns:
a partly-filled Store object or null if the store isn't found
Throws:
KKException

getStore

public Store getStore()
               throws KKException,
                      org.apache.torque.TorqueException,
                      com.workingdogs.village.DataSetException
Returns the store that this KonaKart engine is connected to.

Specified by:
getStore in interface StoreMgrIf
Returns:
Returns a Store object or null if the store isn't found
Throws:
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

setCriteriaWithStatusAttributes

protected void setCriteriaWithStatusAttributes(KKCriteria c)
Set Criteria with status attributes

Parameters:
c -

setCriteriaWithStandardAttributes

protected void setCriteriaWithStandardAttributes(KKCriteria c)
Set Standard Criteria

Parameters:
c -


Copyright © 2011 DS Data Systems UK Ltd.