com.konakartadmin.bl
Class AdminCommunityStoreMgr

java.lang.Object
  extended by com.konakartadmin.bl.AdminBaseMgr
      extended by com.konakartadmin.bl.AdminCommunityStoreMgr
All Implemented Interfaces:
AdminStoreMgrIf

public class AdminCommunityStoreMgr
extends AdminBaseMgr
implements AdminStoreMgrIf

The AdminCommunityStoreMgr - for Store-related functions of the Admin Application for the Community version


Nested Class Summary
 
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr
AdminBaseMgr.StaticData
 
Field Summary
 
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
 
Constructor Summary
AdminCommunityStoreMgr(KKAdminIf eng)
          Constructor
 
Method Summary
 void cloneStore(AdminNewStoreOptions options, java.lang.String storeToCloneId, AdminStore newStore, int userId)
          Insert a new store into the mall by cloning a specified store.
 void deleteStoreDB(java.lang.String storeId)
          Delete a Store from the Database
 boolean doesStoreExistDB(java.lang.String storeId)
          Return true if the store exists.
protected  void doInit(KKAdminIf eng)
           
 com.konakart.bl.KKCriteria getNewCriteria()
          Gets a new KKCriteria object from the super class ten takes off the storeId as we never want to add a where storeId= constraint when looking up these stores.
 AdminStore getStoreDBById(java.lang.String storeId)
          Return the AdminStore object from the database with the specified storeId
 AdminStore[] getStores(org.apache.commons.configuration.Configuration kkConfig)
          Get the stores supported by the server.
 AdminStore[] getStores(java.lang.String configFile)
          Get the stores supported by the server.
 AdminStoreSearchResult getStoresDB(AdminStoreSearch search, int offset, int size)
          Return the AdminStore objects defined by the search criteria.
protected  AdminStore[] getStoresPrivate()
          Just returns the default single store list.
 AdminStore getStoreStatusById(java.lang.String storeId)
          Return the status elements of the AdminStore object from the database with the specified storeId
 java.lang.String insertStore(AdminStore insertObj, int userId)
          Insert an AdminStore object
 void updateStoreDB(AdminStore updateObj)
          Update an AdminStore object
 
Methods inherited from class com.konakartadmin.bl.AdminBaseMgr
addInsertAttr, addInsertAttr, checkIntIsSet, checkRequired, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminHtmlMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminPublishProdMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getExportXMLData, getIntFromString, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getPostSearchText, getPreSearchText, getPropertyValue, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, manageException, refreshConfigs, removeCData, setAdminEng, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminCommunityStoreMgr

public AdminCommunityStoreMgr(KKAdminIf eng)
                       throws KKAdminException
Constructor

Parameters:
eng - KKAdminIf Admin Engine
Throws:
KKAdminException
Method Detail

doInit

protected void doInit(KKAdminIf eng)
               throws KKAdminException
Parameters:
eng -
Throws:
KKAdminException

getStores

public AdminStore[] getStores(java.lang.String configFile)
                       throws KKAdminException
Get the stores supported by the server.

Specified by:
getStores in interface AdminStoreMgrIf
Parameters:
configFile - the name of the properties file
Returns:
an array of AdminStore objects
Throws:
KKAdminException

getStores

public AdminStore[] getStores(org.apache.commons.configuration.Configuration kkConfig)
                       throws KKAdminException
Get the stores supported by the server. This version uses a KonaKart Configuration that has already been read rather than read a new one every time.

Specified by:
getStores in interface AdminStoreMgrIf
Parameters:
kkConfig - A configuration that has already been read
Returns:
an array of AdminStore objects
Throws:
KKAdminException

getStoresPrivate

protected AdminStore[] getStoresPrivate()
Just returns the default single store list.

Returns:
an array of AdminStore objects (actually the array always has just 1 element)

getStoresDB

public AdminStoreSearchResult getStoresDB(AdminStoreSearch search,
                                          int offset,
                                          int size)
                                   throws KKAdminException
Return the AdminStore objects defined by the search criteria.

Specified by:
getStoresDB in interface AdminStoreMgrIf
Parameters:
search - the Admin Store search object that defines the AdminStore objects to search for. If null we use the default AdminStoreSearch object.
offset - starting offset in database - so that you can page through results
size - size of the group that will be returned - the maximum number of records returned. If this is set to -1 (KonakartAdminConstants.NOT_SET) no limit is imposed.
Returns:
an AdminStoreSearchResult object
Throws:
KKAdminException

getStoreStatusById

public AdminStore getStoreStatusById(java.lang.String storeId)
                              throws KKAdminException
Return the status elements of the AdminStore object from the database with the specified storeId

Specified by:
getStoreStatusById in interface AdminStoreMgrIf
Parameters:
storeId - the storeId of the AdminStore object to retrieve.
Returns:
a partly-filled AdminStore object or null if the store isn't found
Throws:
KKAdminException

getStoreDBById

public AdminStore getStoreDBById(java.lang.String storeId)
                          throws KKAdminException
Return the AdminStore object from the database with the specified storeId

Specified by:
getStoreDBById in interface AdminStoreMgrIf
Parameters:
storeId - the storeId of the AdminStore object to retrieve.
Returns:
an AdminStore object or null if the store isn't found
Throws:
KKAdminException

deleteStoreDB

public void deleteStoreDB(java.lang.String storeId)
                   throws KKAdminException
Delete a Store from the Database

Specified by:
deleteStoreDB in interface AdminStoreMgrIf
Parameters:
storeId - A Store id
Throws:
KKAdminException

doesStoreExistDB

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

Specified by:
doesStoreExistDB in interface AdminStoreMgrIf
Parameters:
storeId - store id
Returns:
True if the zone exists
Throws:
KKAdminException
org.apache.torque.TorqueException - *throws KKAdminException

insertStore

public java.lang.String insertStore(AdminStore insertObj,
                                    int userId)
                             throws org.apache.torque.TorqueException,
                                    KKAdminException,
                                    java.lang.Exception
Insert an AdminStore object

Specified by:
insertStore in interface AdminStoreMgrIf
Parameters:
insertObj - An AdminStore object
userId - the user inserting the store
Returns:
returns the id of the inserted AdminStore object
Throws:
java.lang.Exception
KKAdminException
org.apache.torque.TorqueException

cloneStore

public void cloneStore(AdminNewStoreOptions options,
                       java.lang.String storeToCloneId,
                       AdminStore newStore,
                       int userId)
                throws KKAdminException
Insert a new store into the mall by cloning a specified store. Multi-Store Single DB only

Specified by:
cloneStore in interface AdminStoreMgrIf
Parameters:
options - Some options for defining how to execute the clone
storeToCloneId - the store the will be cloned to make the new store
newStore - the new store
userId - the user inserting the store
Throws:
KKAdminException

updateStoreDB

public void updateStoreDB(AdminStore updateObj)
                   throws KKAdminException
Update an AdminStore object

Specified by:
updateStoreDB in interface AdminStoreMgrIf
Parameters:
updateObj - An AdminStore object
Throws:
KKAdminException

getNewCriteria

public com.konakart.bl.KKCriteria getNewCriteria()
Gets a new KKCriteria object from the super class ten takes off the storeId as we never want to add a where storeId= constraint when looking up these stores.

Specified by:
getNewCriteria in interface AdminStoreMgrIf
Overrides:
getNewCriteria in class AdminBaseMgr
Returns:
Returns a new KKCriteria object


Copyright © 2011 DS Data Systems UK Ltd.