public class CustomerMgrEE extends CustomerMgr implements CustomerMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
CustomerMgrEE.CustomerComparator
Used to sort the Customers by their second name
|
CustomerMgr.StaticData
CUST_TYPE_ADMIN_USER, CUST_TYPE_B2B_COMPANY_ADMIN, CUST_TYPE_DEFAULT_CUST, CUST_TYPE_NON_REGISTERED_CUST, CUST_TYPE_REGISTERED_CUST, DEFAULT_DELETE_REVIEWS, DEFAULT_DOB, DEFAULT_STRING, DEFAULT_STRING_SHORT, log, mutex, staticDataHM
templateBaseDir
Constructor and Description |
---|
CustomerMgrEE(KKEngIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addAddressToCustomer(java.lang.String sessionId,
AddressIf addr)
The export manager is called after an address is added (if it is the primary address) in
order to create an XML message and write it to a queue.
|
int |
addCreditCardToCustomer(CreditCardIf card,
CreditCardOptionsIf options)
Inserts a CreditCard object into the database.
|
int |
addCreditCardToCustomer(java.lang.String sessionId,
CreditCardIf card,
CreditCardOptionsIf options)
Inserts a CreditCard object into the database.
|
protected int |
addVendorSearchCriteria(KKCriteria c,
VendorSearchIf vendorSearch)
Adds search criteria to the query depending on what is in the vendorSearch object
|
void |
checkUniquenessForEdit(EditCustomerOptionsIf options,
CustomerIf currentCust,
CustomerIf cust)
Check uniqueness for the username, telephone and telephone1
|
void |
checkUniquenessForRegistration(CustomerRegistrationIf custReg,
boolean force)
Check uniqueness for the username, telephone and telephone1
|
void |
checkUniquenessForRegistration(CustomerRegistrationIf custReg,
boolean force,
java.sql.Connection con)
Check uniqueness for the username, telephone and telephone1
|
void |
deleteAddressFromCustomer(java.lang.String sessionId,
int addressId)
The address defined by customerId and addressId is deleted.
|
void |
deleteCreditCard(int customerId,
int cardId)
Deletes the credit card referenced by cardId that must belong to the customer with id
customerId
|
void |
deleteCreditCard(java.lang.String sessionId,
int cardId)
Deletes the credit card referenced by cardId that must belong to the logged in customer.
|
boolean |
doesVendorExist(int vendorId)
Figure out whether a vendor exists
|
void |
editCreditCard(java.lang.String sessionId,
CreditCardIf card,
CreditCardOptionsIf options)
Edit the credit card of a logged in customer referenced by sessionId.
|
void |
editCustomerAddress(java.lang.String sessionId,
AddressIf addr)
The export manager is called after a successful address edit (only if it is the primary
address) in order to create an XML message an write it to a queue.
|
void |
editCustomerWithOptions(java.lang.String sessionId,
CustomerIf cust,
EditCustomerOptionsIf options)
The export manager is called after a successful customer edit in order to create an XML
message an write it to a queue.
|
Address[] |
getAddressesPerVendor(VendorIf vendor)
Returns all of the addresses registered for the given vendor.
|
protected int |
getCount(KKCriteria c)
This method is mainly used for paging.
|
CreditCard[] |
getCreditCardsPerCustomer(int customerId,
CreditCardOptionsIf options)
Get an array of credit card objects for a logged in customer.
|
CreditCard[] |
getCreditCardsPerCustomer(java.lang.String sessionId,
CreditCardOptionsIf options)
Get an array of credit card objects for a logged in customer.
|
Vendor |
getVendorForId(int vendorId)
Returns the vendor object for the vendor defined by the given id.
|
Vendors |
getVendors(DataDescriptorIf dataDescIn,
VendorSearchIf searchIn) |
protected void |
manageVendorDataDescriptor(DataDescriptorIf dataDesc,
KKCriteria c)
Provides code to deal with the management of the DataDescriptor for vendors
|
void |
populateCustomerChildren(CustomerIf[] parents,
boolean recursive)
Populates the child customers of the array of parent customers passed in as a parameter.
|
void |
populateCustomerChildren(CustomerIf[] parents,
boolean recursive,
java.sql.Connection con)
Populates the child customers of the array of parent customers passed in as a parameter.
|
protected void |
populateCustomerChildren(CustomerIf[] 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.
|
protected void |
populateCustomerChildren(CustomerIf[] parents,
boolean recursive,
java.util.HashMap<java.lang.Integer,java.lang.String> idMap,
java.sql.Connection con)
Populates the child customers of the array of parent customers passed in as a parameter.
|
void |
populateCustomerParents(CustomerIf[] customers)
Populates the parent customer of the customers passed in as a parameter
|
void |
populateProductSuggestions(CustomerIf[] customers)
Populates the Product Suggestions for the customers passed in as a parameter
|
int |
registerCustomer(CustomerRegistrationIf custReg)
The export manager is called after a successful registration in order to create an XML
message an write it to a queue (if ERP Integration is enabled).
|
protected void |
setCreditCardCriteriaWithStandardAttributes(KKCriteria c)
Set the standard attributes
|
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 |
validateCreditCard(CreditCardIf card,
CreditCardOptionsIf options)
Validate the credit card
|
addCustomerNotifications, addProductNotificationToCustomer, addProductNotificationToCustomer, deleteCustomer, deleteCustomerNotifications, deleteCustomerReviews, deleteProductNotificationFromCustomer, deleteProductNotificationFromCustomer, deleteReviews, doesCountryExist, doesCountryExist, doesCustomerExistForEmail, doesCustomerExistForId, doesCustomerExistForTelephone, doesCustomerExistForTelephone1, doesCustomerExistForUsername, doesZoneExist, doesZoneExist, editCustomer, enableCustomer, escapeAddress, escapeCustomer, escapeCustomerRegistration, forceRegisterCustomer, getAddress, getAddressesPerCustomer, getAddressesPerCustomer, getAddressFormatTemplate, getAllCustomerGroups, getAllCustomerGroups, getCountryAndZonePerCustomer, getCountryAndZonePerCustomer, getCountryAndZonePerCustomer, getCustomer, getCustomerForEmail, getCustomerForEmail, getCustomerForEmailAndSetPassword, getCustomerForId, getCustomerForNotification, getCustomerGroup, getCustomerGroupFromCache, getCustomerGroupFromCache, getCustomers, getCustomers, getCustomerWithOptions, getCustomerWithOptions, getDefaultAddressPerCustomer, getDefaultAddressPerCustomer, getDefaultCustomer, getNameFromId, getProductNotificationsPerCustomer, getProductNotificationsPerCustomerWithOptions, getTempCustomerId, incrementLogonCount, isCustomerSubscribedToNewsletter, populateCustomerGroupHashMap, populateCustomerGroupHashMap, populateCustomerParents, refreshConfigs, registerCustomerPrivate, setAllAddrAttrs, setCustomerEmailVerified, setCustomerPassword, setCustomerPassword, setCustomerType, setDefaultAddressPerCustomer, updateCustomerReviews, useLocksForLogonCountIncrementer
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCustomerNotifications, addProductNotificationToCustomer, deleteCustomer, deleteCustomerNotifications, deleteProductNotificationFromCustomer, doesCustomerExistForEmail, doesCustomerExistForTelephone, doesCustomerExistForTelephone1, doesCustomerExistForUsername, doesZoneExist, editCustomer, enableCustomer, escapeAddress, escapeCustomer, escapeCustomerRegistration, forceRegisterCustomer, getAddress, getAddressesPerCustomer, getAddressFormatTemplate, getAllCustomerGroups, getCountryAndZonePerCustomer, getCountryAndZonePerCustomer, getCountryAndZonePerCustomer, getCustomer, getCustomerForEmail, getCustomerForEmail, getCustomerForEmailAndSetPassword, getCustomerForId, getCustomerGroup, getCustomerGroupFromCache, getCustomers, getCustomerWithOptions, getCustomerWithOptions, getDefaultAddressPerCustomer, getDefaultAddressPerCustomer, getDefaultCustomer, getNameFromId, getProductNotificationsPerCustomer, getProductNotificationsPerCustomerWithOptions, getTempCustomerId, incrementLogonCount, isCustomerSubscribedToNewsletter, refreshConfigs, registerCustomerPrivate, setAllAddrAttrs, setCustomerEmailVerified, setCustomerPassword, setCustomerPassword, setCustomerType, setDefaultAddressPerCustomer
public CustomerMgrEE(KKEngIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic void populateCustomerChildren(CustomerIf[] parents, boolean recursive) throws java.lang.Exception
populateCustomerChildren
in class CustomerMgr
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 exceptionpublic void populateCustomerChildren(CustomerIf[] parents, boolean recursive, java.sql.Connection con) throws java.lang.Exception
populateCustomerChildren
in class CustomerMgr
parents
- An array of parent customersrecursive
- When set to true the population is recursive to retrieve the whole of the child
tree.con
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected void populateCustomerChildren(CustomerIf[] 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 exceptionprotected void populateCustomerChildren(CustomerIf[] parents, boolean recursive, java.util.HashMap<java.lang.Integer,java.lang.String> idMap, java.sql.Connection con) 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 recursioncon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic void populateCustomerParents(CustomerIf[] customers) throws java.lang.Exception
populateCustomerParents
in class CustomerMgr
customers
- An array of customersjava.lang.Exception
- an unexpected exceptionpublic int registerCustomer(CustomerRegistrationIf custReg) throws java.lang.Exception
registerCustomer
in interface CustomerMgrIf
registerCustomer
in class CustomerMgr
custReg
- the custRegjava.lang.Exception
- an unexpected exceptionpublic void editCustomerWithOptions(java.lang.String sessionId, CustomerIf cust, EditCustomerOptionsIf options) throws java.lang.Exception
editCustomerWithOptions
in interface CustomerMgrIf
editCustomerWithOptions
in class CustomerMgr
sessionId
- the sessionIdcust
- the custoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic void editCustomerAddress(java.lang.String sessionId, AddressIf addr) throws java.lang.Exception
editCustomerAddress
in interface CustomerMgrIf
editCustomerAddress
in class CustomerMgr
sessionId
- the sessionIdaddr
- the addrjava.lang.Exception
- an unexpected exceptionpublic int addAddressToCustomer(java.lang.String sessionId, AddressIf addr) throws java.lang.Exception
addAddressToCustomer
in interface CustomerMgrIf
addAddressToCustomer
in class CustomerMgr
sessionId
- the sessionIdaddr
- the addrjava.lang.Exception
- an unexpected exceptionpublic void deleteAddressFromCustomer(java.lang.String sessionId, int addressId) throws java.lang.Exception
deleteAddressFromCustomer
in interface CustomerMgrIf
deleteAddressFromCustomer
in class CustomerMgr
sessionId
- the sessionIdaddressId
- the addressIdjava.lang.Exception
- an unexpected exceptionpublic int addCreditCardToCustomer(CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
addCreditCardToCustomer
in interface CustomerMgrIf
addCreditCardToCustomer
in class CustomerMgr
card
- A Credit Card objectoptions
- Options not currently usedjava.lang.Exception
- an unexpected exceptionpublic int addCreditCardToCustomer(java.lang.String sessionId, CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
addCreditCardToCustomer
in interface CustomerMgrIf
addCreditCardToCustomer
in class CustomerMgr
sessionId
- the sessionIdcard
- A CreditCard objectoptions
- Options not currently usedjava.lang.Exception
- an unexpected exceptionprotected void validateCreditCard(CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
card
- the cardoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic CreditCard[] getCreditCardsPerCustomer(java.lang.String sessionId, CreditCardOptionsIf options) throws java.lang.Exception
getCreditCardsPerCustomer
in interface CustomerMgrIf
getCreditCardsPerCustomer
in class CustomerMgr
sessionId
- the sessionIdoptions
- Used to manage whether the returned cards have the formatted address attribute
populatedjava.lang.Exception
- an unexpected exceptionpublic CreditCard[] getCreditCardsPerCustomer(int customerId, CreditCardOptionsIf options) throws java.lang.Exception
getCreditCardsPerCustomer
in interface CustomerMgrIf
getCreditCardsPerCustomer
in class CustomerMgr
customerId
- the customerIdoptions
- Used to manage whether the returned cards have the formatted address attribute
populatedjava.lang.Exception
- an unexpected exceptionprotected void setCreditCardCriteriaWithStandardAttributes(KKCriteria c)
c
- the cpublic void deleteCreditCard(java.lang.String sessionId, int cardId) throws java.lang.Exception
deleteCreditCard
in interface CustomerMgrIf
deleteCreditCard
in class CustomerMgr
sessionId
- the sessionIdcardId
- the cardIdjava.lang.Exception
- an unexpected exceptionpublic void deleteCreditCard(int customerId, int cardId) throws java.lang.Exception
deleteCreditCard
in interface CustomerMgrIf
deleteCreditCard
in class CustomerMgr
customerId
- the customerIdcardId
- the cardIdjava.lang.Exception
- an unexpected exceptionpublic void editCreditCard(java.lang.String sessionId, CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
editCreditCard
in interface CustomerMgrIf
editCreditCard
in class CustomerMgr
sessionId
- the sessionIdcard
- A credit card objectoptions
- Options not currently usedjava.lang.Exception
- an unexpected exceptionpublic void checkUniquenessForRegistration(CustomerRegistrationIf custReg, boolean force) throws java.lang.Exception
checkUniquenessForRegistration
in class CustomerMgr
custReg
- the custRegforce
- the forcejava.lang.Exception
- an unexpected exceptionpublic void checkUniquenessForRegistration(CustomerRegistrationIf custReg, boolean force, java.sql.Connection con) throws java.lang.Exception
checkUniquenessForRegistration
in class CustomerMgr
custReg
- the custRegforce
- the forcecon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic void checkUniquenessForEdit(EditCustomerOptionsIf options, CustomerIf currentCust, CustomerIf cust) throws java.lang.Exception
checkUniquenessForEdit
in class CustomerMgr
options
- the optionscurrentCust
- The current customer referred to by the session idcust
- The object containing the new customer datajava.lang.Exception
- an unexpected exceptionpublic boolean doesVendorExist(int vendorId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
doesVendorExist
in interface CustomerMgrIf
doesVendorExist
in class CustomerMgr
vendorId
- the vendorIdorg.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)com.konakart.app.KKException
- an unexpected KKException exceptionpublic 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 CustomerMgrIf
updateVendorReviewInfo
in class CustomerMgr
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionpublic Vendors getVendors(DataDescriptorIf dataDescIn, VendorSearchIf searchIn) throws java.lang.Exception
getVendors
in interface CustomerMgrIf
getVendors
in class CustomerMgr
dataDescIn
- the dataDescInsearchIn
- the searchInjava.lang.Exception
- an unexpected exceptionprotected int getCount(KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the corg.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 int addVendorSearchCriteria(KKCriteria c, VendorSearchIf vendorSearch) throws java.lang.Exception
c
- The KKCriteria objectvendorSearch
- The VendorSearch objectjava.lang.Exception
- an unexpected exceptionprotected void manageVendorDataDescriptor(DataDescriptorIf dataDesc, KKCriteria c)
dataDesc
- the dataDescc
- the cpublic Address[] getAddressesPerVendor(VendorIf vendor) throws java.lang.Exception
getAddressesPerVendor
in interface CustomerMgrIf
getAddressesPerVendor
in class CustomerMgr
vendor
- the vendorjava.lang.Exception
- an unexpected exceptionpublic Vendor getVendorForId(int vendorId) throws java.lang.Exception
getVendorForId
in interface CustomerMgrIf
getVendorForId
in class CustomerMgr
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionpublic void populateProductSuggestions(CustomerIf[] customers) throws java.lang.Exception
populateProductSuggestions
in interface CustomerMgrIf
populateProductSuggestions
in class CustomerMgr
customers
- An array of customersjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.