public class ResetDatabase
extends java.lang.Object
Data that IS removed:
Modifier and Type | Class and Description |
---|---|
class |
ResetDatabase.ResetOptions
Reset Options
|
Modifier and Type | Field and Description |
---|---|
private KKAdminIf |
adminEng |
private java.io.BufferedWriter |
bw |
private boolean |
categoriesShared |
private boolean |
customersShared |
private static java.lang.String |
DEFAULT_KONAKARTADMIN_PROPS_FILENAME
The default KonaKartAdmin Properties file name
|
private int |
defaultLanguage |
private boolean |
directMode |
private int |
engineMode |
static org.apache.commons.logging.Log |
log
logger
|
private java.lang.String |
outputFilename |
private java.lang.String |
password |
private boolean |
productsShared |
private java.lang.String |
propsFileName |
private java.lang.String |
sessionId |
private java.lang.String |
storeId |
(package private) static java.lang.String |
usage |
private java.lang.String |
username |
Constructor and Description |
---|
ResetDatabase()
Empty Constructor
|
ResetDatabase(KKAdminIf adEng)
Constructor that takes an Admin Engine
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
addStoreIdInWhereClause(java.lang.String statement,
boolean addStoreIdClause) |
private void |
checkSessionIsAdmin() |
void |
emptyDatabase(java.lang.String[] args)
Empty Database using the specified command line args
|
private void |
executeStatement(java.lang.String statement)
Execute statement that works for multi database testing
|
KKAdminIf |
getAdminEng() |
java.io.BufferedWriter |
getBw() |
int |
getDefaultLanguage() |
int |
getEngineMode() |
java.lang.String |
getOutputFilename() |
java.lang.String |
getPassword() |
java.lang.String |
getPropsFileName() |
java.lang.String |
getSessionId() |
java.lang.String |
getStoreId() |
java.lang.String |
getUsername() |
boolean |
isCategoriesShared() |
boolean |
isCustomersShared() |
boolean |
isDirectMode() |
private boolean |
isEnterprise() |
boolean |
isProductsShared() |
static void |
main(java.lang.String[] args) |
void |
removeAuditData()
Remove the Audit Data
|
void |
removeBaskets()
Remove the Customer Baskets
|
void |
removeBookings()
Remove the Bookings
|
void |
removeCatalogs()
Remove the Catalogs
|
void |
removeCategories()
Remove the Categories
|
void |
removeCoupons()
Remove the Coupons
|
void |
removeCustomAttributes()
Remove the Custom Attributes
|
void |
removeCustomAttributeTemplates()
Remove the Custom Attributes Templates
|
void |
removeExpressions()
Remove the Expressions
|
void |
removeManufacturers()
Remove the Manufacturers
|
void |
removeMiscItems()
Remove the MiscItems and the MiscItemTypes
|
void |
removeOrders()
Remove the Orders
|
void |
removePaymentSchedules()
Delete all existing payment schedules
|
void |
removeProductOptions()
Remove the Product Options
|
void |
removeProducts()
Remove the Products
|
void |
removePromotions()
Remove the Promotions
|
void |
removeSubscriptions()
Remove the Subscriptions
|
void |
removeTags()
Delete all tags
|
void |
removeWishLists()
Remove the WishLists
|
void |
resetDatabase()
Reset the database
|
void |
resetDatabaseWithOptions(ResetDatabase.ResetOptions resetOptions)
Reset the database
|
void |
setAdminEng(KKAdminIf adminEng) |
void |
setBw(java.io.BufferedWriter bw) |
void |
setCategoriesShared(boolean categoriesShared) |
void |
setCustomersShared(boolean customersShared) |
void |
setDirectMode(boolean directMode) |
void |
setEngineMode(int engineMode) |
void |
setOutputFilename(java.lang.String outputFilename) |
void |
setPassword(java.lang.String password) |
void |
setProductsShared(boolean productsShared) |
void |
setPropsFileName(java.lang.String propsFileName) |
void |
setSessionId(java.lang.String sessionId) |
void |
setStoreId(java.lang.String storeId) |
void |
setUsername(java.lang.String username) |
private void |
write(java.lang.String str) |
private void |
writeDebug(java.lang.String str) |
private void |
writeInfo(java.lang.String str) |
private void |
writeline() |
private void |
writeWarning(java.lang.String str) |
static final java.lang.String usage
public static org.apache.commons.logging.Log log
private static final java.lang.String DEFAULT_KONAKARTADMIN_PROPS_FILENAME
private java.lang.String propsFileName
private int engineMode
private boolean customersShared
private boolean productsShared
private boolean categoriesShared
private boolean directMode
private java.lang.String storeId
private java.lang.String username
private java.lang.String password
private java.lang.String outputFilename
private java.lang.String sessionId
private KKAdminIf adminEng
private java.io.BufferedWriter bw
private int defaultLanguage
public ResetDatabase()
public ResetDatabase(KKAdminIf adEng)
adEng
- KKAdminIf enginepublic static void main(java.lang.String[] args)
args
- the argspublic void emptyDatabase(java.lang.String[] args)
args
- the argspublic void resetDatabase() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void resetDatabaseWithOptions(ResetDatabase.ResetOptions resetOptions) throws KKAdminException
resetOptions
- defines reset optionsKKAdminException
- an unexpected exception in the KonaKart Admin engineprivate void checkSessionIsAdmin() throws KKAdminException
KKAdminException
public void removeCustomAttributes() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeCustomAttributeTemplates() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeSubscriptions() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removePromotions() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeExpressions() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeOrders() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeMiscItems() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeWishLists() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeAuditData() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeManufacturers() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeProducts() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeProductOptions() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeCoupons() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeCatalogs() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeBaskets() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeCategories() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeBookings() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removePaymentSchedules() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void removeTags() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin engineprivate java.lang.String addStoreIdInWhereClause(java.lang.String statement, boolean addStoreIdClause)
private void executeStatement(java.lang.String statement) throws org.apache.torque.TorqueException
statement
- the statementorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)private void writeline() throws java.io.IOException
java.io.IOException
private void write(java.lang.String str)
private void writeDebug(java.lang.String str)
private void writeInfo(java.lang.String str)
private void writeWarning(java.lang.String str)
private boolean isEnterprise() throws KKAdminException
KKAdminException
public java.lang.String getPropsFileName()
public void setPropsFileName(java.lang.String propsFileName)
propsFileName
- the propsFileName to setpublic int getEngineMode()
public void setEngineMode(int engineMode)
engineMode
- the engineMode to setpublic boolean isCustomersShared()
public void setCustomersShared(boolean customersShared)
customersShared
- the customersShared to setpublic boolean isProductsShared()
public void setProductsShared(boolean productsShared)
productsShared
- the productsShared to setpublic boolean isCategoriesShared()
public void setCategoriesShared(boolean categoriesShared)
categoriesShared
- the categoriesShared to setpublic java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- the username to setpublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the password to setpublic java.lang.String getOutputFilename()
public void setOutputFilename(java.lang.String outputFilename)
outputFilename
- the outputFilename to setpublic java.lang.String getSessionId()
public void setSessionId(java.lang.String sessionId)
sessionId
- the sessionId to setpublic KKAdminIf getAdminEng() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void setAdminEng(KKAdminIf adminEng)
adminEng
- the adminEng to setpublic java.lang.String getStoreId()
public void setStoreId(java.lang.String storeId)
storeId
- the storeId to setpublic java.io.BufferedWriter getBw()
public void setBw(java.io.BufferedWriter bw)
bw
- the bw to setpublic int getDefaultLanguage() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic boolean isDirectMode()
public void setDirectMode(boolean directMode)
directMode
- the directMode to setCopyright © 2018 DS Data Systems UK Ltd.