public class AdminCustomerMgrEE extends AdminCustomerMgr implements AdminCustomerMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminCustomerMgrEE.CustomerComparator
Used to sort the Customers by their second name
|
AdminBaseMgr.StaticData
availableChars, availableLowerChars, availableNumericChars, availableSpecialChars, availableUpperChars, DEFAULT_DELETE_REVIEWS, DEFAULT_PASSWORD_CHARACTERS, log
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminCustomerMgrEE(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addChildrenToCustomer(int parentId,
AdminCustomer[] children)
The array of AdminCustomer children objects are given the parent id passed in as a parameter.
|
protected void |
addVendorOrderBy(com.konakart.db.KKCriteria c,
AdminVendorSearch vendorSearch)
Add Vendor OrderBy
|
protected int |
addVendorSearchCriteria(com.konakart.db.KKCriteria c,
AdminVendorSearch vendorSearch)
Adds search criteria to the query depending on what is in the vendorSearch object
|
void |
addVendorToStore(int vendorId,
java.lang.String vendorStoreId)
Associates a vendor with a store
|
void |
checkUniquenessForRegistration(AdminCustomerRegistration custReg,
boolean force)
Check uniqueness for the username, telephone and telephone1
|
void |
checkUniquenessForUpdate(AdminUpdateCustomerOptions options,
AdminCustomer currentCust,
AdminCustomer cust)
Check uniqueness for the username, telephone and telephone1
|
AdminCloneCustomerResult |
cloneCustomer(int superUserId,
int cloneCustId,
java.lang.String[] stores)
This API call is used to clone customers across multiple stores and is only available when in
multi-store single DB, non shared customer mode.
|
void |
createMailingList(AdminCustomerSearch search,
AdminMailListOptions listOptions)
Create a mailing list file on disk that contains a record for every customer defined by the
AdminCustomerSearch object.
|
private java.lang.String |
csvItem(java.lang.String item)
Write a safe CSV item.
|
int |
deleteCustomer(int custId)
Calls super.deleteCustomer() and writes an updateObject message to the queue if enabled.
|
AdminDeleteCustomerResult |
deleteCustomerMultiStore(int superUserId,
int customerId,
java.lang.String[] stores)
This API call is used to delete customers across multiple stores and is only available when
in multi-store single DB, non shared customer mode.
|
void |
deleteVendor(int vendorId)
Delete a vendor
|
boolean |
doesVendorExist(int vendorId)
Return true if the vendor exists.
|
private java.lang.String |
escapeDoubleQuotes(java.lang.String in) |
protected AdminCountry |
getDestCountry(KKAdminIf destEng,
AdminCountry sourceCountry,
java.lang.String store)
Utility method that returns the country object for the destination country.
|
protected AdminZone |
getDestZone(KKAdminIf destEng,
AdminCountry destCountry,
AdminZone sourceZone,
java.lang.String store)
Utility method that returns the zone object for the destination zone.
|
protected int |
getSessionExpiryTimeInSecs()
Utility method to create a session expiry time
|
protected AdminCountry |
getSourceCountry(AdminTaxMgrIf taxMgr,
java.util.HashMap<java.lang.Integer,AdminCountry> sourceCountryMap,
int countryId)
Utility method that returns the country object for the source country.
|
protected AdminZone |
getSourceZone(AdminTaxMgrIf taxMgr,
java.util.HashMap<java.lang.Integer,AdminZone> sourceZoneMap,
int zoneId)
Utility method that returns the zone object for the source zone.
|
AdminStore[] |
getStoresForCustomer(int superUserId,
java.lang.String emailAddress)
This API call is only available when in multi-store single DB, non shared customer mode.
|
int |
getVendorCount(AdminVendorSearch search)
Returns a count of the number of Vendors
|
AdminVendor |
getVendorForId(int vendorId)
Return a vendor for the numeric vendorId
|
AdminVendorSearchResult |
getVendors(AdminVendorSearch vendorSearch,
int offset,
int size)
Returns a set of Vendors that match the search criteria
|
int |
insertVendor(AdminVendor vendor)
Insert a vendor
|
void |
populateCustomerChildren(AdminCustomer[] parents,
boolean recursive)
Populates the child customers of the array of parent customers passed in as a parameter.
|
protected void |
populateCustomerChildren(AdminCustomer[] parents,
boolean recursive,
java.util.HashMap<java.lang.Integer,java.lang.String> idMap)
Populates the child customers of the array of parent customers passed in as a parameter.
|
void |
populateCustomerParents(AdminCustomer[] customers)
Populates the parent customer of the customers passed in as a parameter
|
void |
refreshConfigs()
Refresh the configuration of the Manager
|
int |
registerCustomer(AdminCustomerRegistration custReg)
Calls super.registerCustomer() and writes an updateObject message to the queue if enabled.
|
void |
updateCustomerWithOptions(AdminCustomer cust,
AdminUpdateCustomerOptions options)
Calls super.updateCustomerWithOptions() and writes an updateObject message to the queue if
enabled.
|
void |
updateVendor(AdminVendor vendor)
Update the vendor
|
void |
updateVendor(AdminVendor vendor,
java.sql.Connection con)
Update the vendor
|
void |
updateVendorReviewInfo(int vendorId)
The vendor referenced by the
vendorId parameter is updated with information
regarding the average rating and the number of reviews present for the vendor. |
protected void |
writeMailingListFooter(java.io.BufferedWriter bw,
int outputFormat)
Write the heading depending on the output format
|
protected void |
writeMailingListHeading(java.io.BufferedWriter bw,
int outputFormat)
Write the heading depending on the output format
|
protected void |
writeMailingListRow(java.io.BufferedWriter bw,
int outputFormat,
AdminCustomer cust)
Write the heading depending on the output format
|
addCustomerGroupOrderBy, addCustomerGroupSearchCriteria, addCustomerOrderBy, addCustomerSearchCriteria, deleteCustomerGroup, deleteCustomerReviews, deleteProductNotification, deleteReviews, doesCountryExist, doesCustomerExistForEmail, doesCustomerExistForId, doesCustomerExistForTelephone, doesCustomerExistForTelephone1, doesCustomerExistForUsername, doesZoneExist, forceRegisterCustomer, getAddressFormatTemplate, getAllAddressFormats, getAvailableChars, getCount, getCustomerForEmail, getCustomerForEmailWithOptions, getCustomerForId, getCustomerForIdWithOptions, getCustomerGroups, getCustomerGroupsPerPromotion, getCustomerIdForEmail, getCustomers, getCustomersCount, getCustomersLite, getDbPassword, getProductNotificationsForCustomer, getRandomPassword, getTagValue, incrementLogonCount, insertCustomerGroup, insertCustomerGroups, insertProductNotification, registerCustomerPrivate, resetCustomerPassword, resetCustomerPassword, resetCustomerPasswordSpecifyingEmail, sendTemplateEmailToCustomers, sendTemplateEmailToCustomersWithOptions, setAvailableChars, setCustGroupCriteriaWithStandardAttributes, setCustomerPassword, setCustomerPassword, updateCustomer, updateCustomerGroup, updateCustomerReviews
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteCustomerGroup, deleteProductNotification, doesCustomerExistForEmail, doesCustomerExistForId, doesCustomerExistForTelephone, doesCustomerExistForTelephone1, doesCustomerExistForUsername, forceRegisterCustomer, getAddressFormatTemplate, getAllAddressFormats, getCustomerForEmail, getCustomerForEmailWithOptions, getCustomerForId, getCustomerForIdWithOptions, getCustomerGroups, getCustomerGroupsPerPromotion, getCustomerIdForEmail, getCustomers, getCustomersCount, getCustomersLite, getDbPassword, getProductNotificationsForCustomer, getRandomPassword, incrementLogonCount, insertCustomerGroup, insertCustomerGroups, insertProductNotification, resetCustomerPassword, resetCustomerPasswordSpecifyingEmail, sendTemplateEmailToCustomers, sendTemplateEmailToCustomersWithOptions, setCustomerPassword, setCustomerPassword, updateCustomer, updateCustomerGroup
public AdminCustomerMgrEE(KKAdminIf eng) throws java.lang.Exception
eng
- the Admin enginejava.lang.Exception
- an unexpected exceptionpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminCustomerMgrIf
refreshConfigs
in class AdminCustomerMgr
java.lang.Exception
- an unexpected exceptionpublic void createMailingList(AdminCustomerSearch search, AdminMailListOptions listOptions) throws KKAdminException
AdminCustomerMgrIf
createMailingList
in interface AdminCustomerMgrIf
createMailingList
in class AdminCustomerMgr
search
- Customer search object - defines the set of customers to be included in the
mailing list to be createdlistOptions
- Mailing List Options - defines options about the mailing list to be created such
as its format and its name.KKAdminException
- an unexpected exception in the KonaKart Admin engineprotected void writeMailingListHeading(java.io.BufferedWriter bw, int outputFormat) throws java.io.IOException
bw
- the bwoutputFormat
- the outputFormatjava.io.IOException
- an unexpected IOException exceptionprotected void writeMailingListRow(java.io.BufferedWriter bw, int outputFormat, AdminCustomer cust) throws java.io.IOException
bw
- the bwoutputFormat
- the outputFormatcust
- the Customer recordjava.io.IOException
- an unexpected IOException exceptionprotected void writeMailingListFooter(java.io.BufferedWriter bw, int outputFormat) throws java.io.IOException
bw
- the bwoutputFormat
- the outputFormatjava.io.IOException
- an unexpected IOException exceptionprivate java.lang.String csvItem(java.lang.String item)
item
- the itemprivate java.lang.String escapeDoubleQuotes(java.lang.String in)
public void populateCustomerChildren(AdminCustomer[] parents, boolean recursive) throws java.lang.Exception
populateCustomerChildren
in class AdminCustomerMgr
parents
- An array of parent customersrecursive
- When set to true the population is recursive to retrieve the whole of the child
tree.java.lang.Exception
- an unexpected exceptionprotected void populateCustomerChildren(AdminCustomer[] parents, boolean recursive, java.util.HashMap<java.lang.Integer,java.lang.String> idMap) throws java.lang.Exception
parents
- An array of parent customersrecursive
- When set to true the population is recursive to retrieve the whole of the child
tree.idMap
- Hash map to stop recursionjava.lang.Exception
- an unexpected exceptionpublic void addChildrenToCustomer(int parentId, AdminCustomer[] children) throws java.lang.Exception
addChildrenToCustomer
in interface AdminCustomerMgrIf
addChildrenToCustomer
in class AdminCustomerMgr
parentId
- ParentId set on the AdminCustomer children objects passed in as a parameterchildren
- An array of AdminCustomer objectsjava.lang.Exception
- an unexpected exceptionpublic void populateCustomerParents(AdminCustomer[] customers) throws java.lang.Exception
populateCustomerParents
in class AdminCustomerMgr
customers
- An array of customersjava.lang.Exception
- an unexpected exceptionpublic void checkUniquenessForRegistration(AdminCustomerRegistration custReg, boolean force) throws java.lang.Exception
checkUniquenessForRegistration
in class AdminCustomerMgr
custReg
- the custRegforce
- the forcejava.lang.Exception
- an unexpected exceptionpublic void checkUniquenessForUpdate(AdminUpdateCustomerOptions options, AdminCustomer currentCust, AdminCustomer cust) throws java.lang.Exception
checkUniquenessForUpdate
in class AdminCustomerMgr
options
- the optionscurrentCust
- The current customer referred to by the session idcust
- The object containing the new customer datajava.lang.Exception
- an unexpected exceptionpublic int insertVendor(AdminVendor vendor) throws java.lang.Exception
insertVendor
in interface AdminCustomerMgrIf
insertVendor
in class AdminCustomerMgr
vendor
- the vendorjava.lang.Exception
- an unexpected exceptionpublic void updateVendor(AdminVendor vendor) throws java.lang.Exception
updateVendor
in interface AdminCustomerMgrIf
updateVendor
in class AdminCustomerMgr
vendor
- the vendor - must already have a good IDjava.lang.Exception
- an unexpected exceptionpublic void updateVendor(AdminVendor vendor, java.sql.Connection con) throws java.lang.Exception
updateVendor
in interface AdminCustomerMgrIf
updateVendor
in class AdminCustomerMgr
vendor
- the vendor - must already have a good IDcon
- The connection in order to perform the update within an existing transactionjava.lang.Exception
- an unexpected exceptionpublic void deleteVendor(int vendorId) throws java.lang.Exception
deleteVendor
in interface AdminCustomerMgrIf
deleteVendor
in class AdminCustomerMgr
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionpublic boolean doesVendorExist(int vendorId) throws KKAdminException, org.apache.torque.TorqueException
vendorId
- the vendorIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminVendor getVendorForId(int vendorId) throws java.lang.Exception
getVendorForId
in interface AdminCustomerMgrIf
getVendorForId
in class AdminCustomerMgr
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionpublic AdminVendorSearchResult getVendors(AdminVendorSearch vendorSearch, int offset, int size) throws java.lang.Exception
getVendors
in interface AdminCustomerMgrIf
getVendors
in class AdminCustomerMgr
vendorSearch
- the definition of the search for vendors - can be nulloffset
- the offset in the dbsize
- the number of records from the specified offsetjava.lang.Exception
- an unexpected exceptionpublic int getVendorCount(AdminVendorSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- Search criteriaorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected int addVendorSearchCriteria(com.konakart.db.KKCriteria c, AdminVendorSearch vendorSearch) throws KKAdminException
c
- The KKCriteria objectvendorSearch
- The AdminVendorSearch objectKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void addVendorOrderBy(com.konakart.db.KKCriteria c, AdminVendorSearch vendorSearch)
c
- the cvendorSearch
- the vendorSearchpublic void updateVendorReviewInfo(int vendorId) throws java.lang.Exception
vendorId
parameter is updated with information
regarding the average rating and the number of reviews present for the vendor.updateVendorReviewInfo
in interface AdminCustomerMgrIf
updateVendorReviewInfo
in class AdminCustomerMgr
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionpublic void addVendorToStore(int vendorId, java.lang.String vendorStoreId) throws java.lang.Exception
addVendorToStore
in interface AdminCustomerMgrIf
addVendorToStore
in class AdminCustomerMgr
vendorId
- the vendorIdvendorStoreId
- the vendorStoreIdjava.lang.Exception
- an unexpected exceptionpublic int registerCustomer(AdminCustomerRegistration custReg) throws java.lang.Exception
registerCustomer
in interface AdminCustomerMgrIf
registerCustomer
in class AdminCustomerMgr
custReg
- the custRegjava.lang.Exception
- an unexpected exceptionpublic void updateCustomerWithOptions(AdminCustomer cust, AdminUpdateCustomerOptions options) throws java.lang.Exception
updateCustomerWithOptions
in interface AdminCustomerMgrIf
updateCustomerWithOptions
in class AdminCustomerMgr
cust
- the customer - must already have a good IDoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic int deleteCustomer(int custId) throws java.lang.Exception
deleteCustomer
in interface AdminCustomerMgrIf
deleteCustomer
in class AdminCustomerMgr
custId
- the custIdjava.lang.Exception
- an unexpected exceptionpublic AdminCloneCustomerResult cloneCustomer(int superUserId, int cloneCustId, java.lang.String[] stores) throws java.lang.Exception
Points to note:
cloneCustomer
in interface AdminCustomerMgrIf
cloneCustomer
in class AdminCustomerMgr
superUserId
- The id of the Super User making the API callcloneCustId
- The id of the customer to be clonedstores
- An array of destination store ids where the customer will be clonedjava.lang.Exception
- an unexpected exceptionprotected AdminCountry getSourceCountry(AdminTaxMgrIf taxMgr, java.util.HashMap<java.lang.Integer,AdminCountry> sourceCountryMap, int countryId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
taxMgr
- the taxMgrsourceCountryMap
- the sourceCountryMapcountryId
- the countryIdKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected AdminZone getSourceZone(AdminTaxMgrIf taxMgr, java.util.HashMap<java.lang.Integer,AdminZone> sourceZoneMap, int zoneId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
taxMgr
- the taxMgrsourceZoneMap
- the sourceZoneMapzoneId
- the zoneIdKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected AdminCountry getDestCountry(KKAdminIf destEng, AdminCountry sourceCountry, java.lang.String store) throws KKAdminException
destEng
- the destEngsourceCountry
- the sourceCountrystore
- the storeKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected AdminZone getDestZone(KKAdminIf destEng, AdminCountry destCountry, AdminZone sourceZone, java.lang.String store) throws KKAdminException
destEng
- the destEngdestCountry
- the destCountrysourceZone
- the sourceZonestore
- the storeKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected int getSessionExpiryTimeInSecs()
public AdminDeleteCustomerResult deleteCustomerMultiStore(int superUserId, int customerId, java.lang.String[] stores) throws java.lang.Exception
If the stores array contains the id of the KKAdmin Engine store, then the customer is also deleted from that store.
deleteCustomerMultiStore
in interface AdminCustomerMgrIf
deleteCustomerMultiStore
in class AdminCustomerMgr
superUserId
- The id of the Super User making the API callcustomerId
- The id of the customer to be deletedstores
- An array of store ids where the customer will be deletedjava.lang.Exception
- an unexpected exceptionpublic AdminStore[] getStoresForCustomer(int superUserId, java.lang.String emailAddress) throws java.lang.Exception
It is used to search for a customer using the email address, across multiple stores. The stores where the customer is present, are returned in an array in alphabetical order. It searches all stores regardless of their state (enabled, under maintenance or deleted). This state information is available on the returned AdminStore objects.
getStoresForCustomer
in interface AdminCustomerMgrIf
getStoresForCustomer
in class AdminCustomerMgr
superUserId
- The id of the Super User making the API callemailAddress
- The email address of the customer being searchedjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.