com.konakartadmin.bl
Class AdminDataIntegrityMgr

java.lang.Object
  extended by com.konakartadmin.bl.AdminBaseMgr
      extended by com.konakartadmin.bl.AdminDataIntegrityMgr
All Implemented Interfaces:
AdminDataIntegrityMgrIf

public class AdminDataIntegrityMgr
extends AdminBaseMgr
implements AdminDataIntegrityMgrIf

The AdminDataIntegrityMgr - for checking Data Integrity


Nested Class Summary
 
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr
AdminBaseMgr.StaticData
 
Field Summary
protected static org.apache.commons.logging.Log log
          the log
 
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
 
Constructor Summary
AdminDataIntegrityMgr(KKAdminIf eng)
          Constructor
 
Method Summary
 boolean checkCustomerGroups(AdminDataIntegrityOptions dataIntegrityOptions)
          Checks the integrity of Customer Groups
 boolean checkDataIntegrity(AdminDataIntegrityOptions dataIntegrityOptions)
          Checks the integrity of data in the specified area in the KonaKart database
 boolean checkMiscItemTypes(AdminDataIntegrityOptions dataIntegrityOptions)
          Checks the integrity of Misc Item Types
 boolean checkOrderStatuses(AdminDataIntegrityOptions dataIntegrityOptions)
          Checks the integrity of Order Statuses
private  java.lang.String custGroupHashKey(AdminCustomerGroup cg)
           
private  java.lang.String custGroupHashKey(int cgId, int langId)
           
private  AdminCustomerGroup[] getAllCustomerGroups()
          This returns all the CustomerGroups in the database - but be careful because it will return rows for languages that may not be available in the current mode.
private  AdminMiscItemType[] getAllMiscItemTypes()
          This returns all the Misc Item Types in the database - visible to the current store.
private  AdminOrderStatus[] getAllOrderStatuses()
          This returns all the Order Statuses in the database - but be careful because it will return rows for languages that may not be available in the current mode.
private  java.lang.String miscItemTypeHashKey(AdminMiscItemType mit)
           
private  java.lang.String miscItemTypeHashKey(int mitId, int langId)
           
private  java.lang.String orderStatusHashKey(AdminOrderStatus os)
           
private  java.lang.String orderStatusHashKey(int osId, int langId)
           
 void refreshConfigs()
          Refresh the configuration of the Admin Data Integrity Manager
 
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, getNewCriteria, getPostSearchText, getPreSearchText, getPropertyValue, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, manageException, 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
 

Field Detail

log

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

Constructor Detail

AdminDataIntegrityMgr

public AdminDataIntegrityMgr(KKAdminIf eng)
                      throws java.lang.Exception
Constructor

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

checkDataIntegrity

public boolean checkDataIntegrity(AdminDataIntegrityOptions dataIntegrityOptions)
                           throws org.apache.torque.TorqueException,
                                  com.workingdogs.village.DataSetException,
                                  KKAdminException
Description copied from interface: AdminDataIntegrityMgrIf
Checks the integrity of data in the specified area in the KonaKart database

Specified by:
checkDataIntegrity in interface AdminDataIntegrityMgrIf
Parameters:
dataIntegrityOptions - Defines the options to use for the data integrity check
Returns:
true if data integrity problems were found, otherwise false
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

checkOrderStatuses

public boolean checkOrderStatuses(AdminDataIntegrityOptions dataIntegrityOptions)
                           throws org.apache.torque.TorqueException,
                                  com.workingdogs.village.DataSetException,
                                  KKAdminException
Checks the integrity of Order Statuses

Specified by:
checkOrderStatuses in interface AdminDataIntegrityMgrIf
Parameters:
dataIntegrityOptions - Defines the options to use for the data integrity check
Returns:
returns true if problems were found with the integrity, otherwise returns true if there were no problems found.
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

orderStatusHashKey

private java.lang.String orderStatusHashKey(AdminOrderStatus os)

orderStatusHashKey

private java.lang.String orderStatusHashKey(int osId,
                                            int langId)

getAllOrderStatuses

private AdminOrderStatus[] getAllOrderStatuses()
                                        throws org.apache.torque.TorqueException,
                                               com.workingdogs.village.DataSetException,
                                               KKAdminException
This returns all the Order Statuses in the database - but be careful because it will return rows for languages that may not be available in the current mode. It will not return languages that are marked for display-only.

Returns:
Returns a non-null array of AdminOrderStatus objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

checkCustomerGroups

public boolean checkCustomerGroups(AdminDataIntegrityOptions dataIntegrityOptions)
                            throws org.apache.torque.TorqueException,
                                   com.workingdogs.village.DataSetException,
                                   KKAdminException
Checks the integrity of Customer Groups

Specified by:
checkCustomerGroups in interface AdminDataIntegrityMgrIf
Parameters:
dataIntegrityOptions - Defines the options to use for the data integrity check
Returns:
true if data integrity problems were found, otherwise false
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

custGroupHashKey

private java.lang.String custGroupHashKey(AdminCustomerGroup cg)

custGroupHashKey

private java.lang.String custGroupHashKey(int cgId,
                                          int langId)

getAllCustomerGroups

private AdminCustomerGroup[] getAllCustomerGroups()
                                           throws org.apache.torque.TorqueException,
                                                  com.workingdogs.village.DataSetException,
                                                  KKAdminException
This returns all the CustomerGroups in the database - but be careful because it will return rows for languages that may not be available in the current mode.

Returns:
Returns a non-null array of AdminCustomerGroup objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

checkMiscItemTypes

public boolean checkMiscItemTypes(AdminDataIntegrityOptions dataIntegrityOptions)
                           throws org.apache.torque.TorqueException,
                                  com.workingdogs.village.DataSetException,
                                  KKAdminException
Checks the integrity of Misc Item Types

Specified by:
checkMiscItemTypes in interface AdminDataIntegrityMgrIf
Parameters:
dataIntegrityOptions - Defines the options to use for the data integrity check
Returns:
true if data integrity problems were found, otherwise false
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

miscItemTypeHashKey

private java.lang.String miscItemTypeHashKey(AdminMiscItemType mit)

miscItemTypeHashKey

private java.lang.String miscItemTypeHashKey(int mitId,
                                             int langId)

getAllMiscItemTypes

private AdminMiscItemType[] getAllMiscItemTypes()
                                         throws org.apache.torque.TorqueException,
                                                com.workingdogs.village.DataSetException,
                                                KKAdminException
This returns all the Misc Item Types in the database - visible to the current store.

Returns:
Returns a non-null array of AdminMiscItemTypes objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

refreshConfigs

public void refreshConfigs()
                    throws java.lang.Exception
Refresh the configuration of the Admin Data Integrity Manager

Overrides:
refreshConfigs in class AdminBaseMgr
Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.