com.konakartadmin.blif
Interface AdminStoreMgrIf

All Known Implementing Classes:
AdminCommunityStoreMgr, AdminStoreMgr

public interface AdminStoreMgrIf

AdminStoreMgrIf


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.
 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.
 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
 

Method Detail

getStores

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

Parameters:
configFile - the name of the properties file
Returns:
an array of AdminStore objects
Throws:
KKAdminException - thrown when there are problems reading the properties file

getStores

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.

Parameters:
kkConfig - A configuration that has already been read
Returns:
an array of AdminStore objects
Throws:
KKAdminException

getStoresDB

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

Parameters:
search - the generic Admin search object that defines the AdminStore objects to search for. If null we use the default AdminSearch 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

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

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

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

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

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

Parameters:
storeId - A Store id
Throws:
KKAdminException

doesStoreExistDB

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

Parameters:
storeId - store id
Returns:
True if the zone exists
Throws:
KKAdminException
org.apache.torque.TorqueException

insertStore

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

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

cloneStore

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

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:
java.lang.Exception
org.apache.torque.TorqueException
KKAdminException

updateStoreDB

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

Parameters:
updateObj - An AdminStore object
Throws:
KKAdminException

getNewCriteria

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.

Returns:
Returns a new KKCriteria object


Copyright © 2011 DS Data Systems UK Ltd.