public class AdminCustomerMgr extends AdminBaseMgr implements AdminCustomerMgrIf
AdminBaseMgr.StaticData
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
availableChars
Characters used for generating customer passwords - can be set in konakartadmin.properties
|
protected static java.lang.String |
availableLowerChars
Used for password generation
|
protected static java.lang.String |
availableNumericChars
Used for password generation
|
protected static java.lang.String |
availableSpecialChars
Used for password generation
|
protected static java.lang.String |
availableUpperChars
Used for password generation
|
protected static boolean |
DEFAULT_DELETE_REVIEWS
default is to delete reviews
|
protected static java.lang.String |
DEFAULT_PASSWORD_CHARACTERS
Used for customer password generation
|
protected static org.apache.commons.logging.Log |
log
the log
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminCustomerMgr(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 |
addCustomerGroupOrderBy(com.konakart.db.KKCriteria c,
AdminCustomerGroupSearch search)
Add CustomerGroup OrderBy
|
protected int |
addCustomerGroupSearchCriteria(com.konakart.db.KKCriteria c,
AdminCustomerGroupSearch search) |
protected void |
addCustomerOrderBy(com.konakart.db.KKCriteria c,
AdminCustomerSearch custSearch)
Add Customer OrderBy
|
protected int |
addCustomerSearchCriteria(com.konakart.db.KKCriteria c,
AdminCustomerSearch custSearch,
boolean addressJoin)
Adds search criteria to the query depending on what is in the custSearch 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.
|
int |
deleteCustomer(int custId)
Deletes a customer from the database.
|
int |
deleteCustomerGroup(int custGroupId)
Delete a Customer Group.
|
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.
|
protected void |
deleteCustomerReviews(int custId,
java.sql.Connection con)
Deletes a customer's reviews from the database.
|
void |
deleteProductNotification(int custId,
int prodId)
Delete a Product Notification record for the specified customer and product if it's found.
|
protected boolean |
deleteReviews()
Utility method to return the konakart.delete_reviews property value
|
void |
deleteVendor(int vendorId)
Delete a vendor
|
protected boolean |
doesCountryExist(int countryId) |
boolean |
doesCustomerExistForEmail(java.lang.String emailAddr)
Checks to see whether a registered customer already exists with this email address.
|
boolean |
doesCustomerExistForId(int custId)
Checks to see whether a customer already exists with this id
|
boolean |
doesCustomerExistForTelephone(java.lang.String telephone)
Checks to see whether a registered customer already exists with this telephone number.
|
boolean |
doesCustomerExistForTelephone1(java.lang.String telephone1)
Checks to see whether a registered customer already exists with this telephone 1 number.
|
boolean |
doesCustomerExistForUsername(java.lang.String username)
Checks to see whether a registered customer already exists with this username.
|
protected boolean |
doesZoneExist(java.lang.String zoneDesc,
int countryId)
If a country has at least one zone defined in the database, then we assume that all zones are
defined and ensure that we only allow zones that are defined in the database.
|
int |
forceRegisterCustomer(AdminCustomerRegistration custReg)
Calls RegisterCustomerPrivate() with force set to true
|
java.lang.String |
getAddressFormatTemplate(int id)
Does a query on the address_format table
|
AdminAddressFormat[] |
getAllAddressFormats()
This returns an array of all the address formats
|
java.lang.String |
getAvailableChars() |
protected int |
getCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
AdminCustomer |
getCustomerForEmail(java.lang.String emailAddr)
Checks to see whether a customer already exists with this email address and returns the
customer object if it does exist.
|
AdminCustomer |
getCustomerForEmailWithOptions(java.lang.String emailAddr,
AdminGetCustomerOptions options)
Checks to see whether a customer already exists with this email address and returns the
customer object if it does exist.
|
AdminCustomer |
getCustomerForId(int customerId)
Returns the customer object for the customer defined by the given id.
|
AdminCustomer |
getCustomerForIdWithOptions(int customerId,
AdminGetCustomerOptions options)
Returns the customer object for the customer defined by the given id.
|
AdminCustomerGroupSearchResult |
getCustomerGroups(AdminCustomerGroupSearch search)
This returns an AdminCustomerGroupSearchResult object.
|
AdminCustomerGroup[] |
getCustomerGroupsPerPromotion(int promotionId,
int languageId)
Returns all of the customer groups for the promotion
|
int |
getCustomerIdForEmail(java.lang.String emailAddr)
Finds the custId of the specified customer.
|
AdminCustomerSearchResult |
getCustomers(AdminCustomerSearch custSearch,
int offset,
int size)
Returns a set of Customers that match the search criteria
|
int |
getCustomersCount(AdminCustomerSearch search)
Returns a count of the number of Customers
|
AdminCustomerSearchResult |
getCustomersLite(AdminCustomerSearch custSearch,
int offset,
int size)
Returns a set of "Lite" Customers that match the search criteria.
|
java.lang.String |
getDbPassword(int userId)
Get the password from the database for the given userId
|
AdminProductNotification[] |
getProductNotificationsForCustomer(int customerId)
Get an array of product notifications for the customer
|
java.lang.String |
getRandomPassword(int length)
If length == 0, the configuration value ENTRY_PASSWORD_MIN_LENGTH is used.
|
AdminStore[] |
getStoresForCustomer(int superUserId,
java.lang.String emailAddress)
This API call is only available when in multi-store single DB, non shared customer mode.
|
protected java.lang.String |
getTagValue(java.lang.String value,
int rule,
java.lang.String preWildCard,
java.lang.String postWildCard)
Utility method to return the formatted tag value
|
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
|
void |
incrementLogonCount(int customerId)
This method increments the logon count attribute of the customers_info table and sets the
last logged in date for the customer..
|
int |
insertCustomerGroup(AdminCustomerGroup custGroup)
Insert a customer group
|
int |
insertCustomerGroups(AdminCustomerGroup[] custGroups)
Insert an array of AdminCustomerGroup objects.
|
void |
insertProductNotification(int custId,
int prodId)
Insert a Product Notification record for the specified customer and product.
|
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.
|
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 RegisterCustomerPrivate() with force set to false
|
int |
registerCustomerPrivate(AdminCustomerRegistration custReg,
boolean force)
A new customer is added to the system.
|
void |
resetCustomerPassword(int custId)
Reset a customer's password.
|
protected void |
resetCustomerPassword(int custId,
java.lang.String eMailAddr)
Reset a customer's password.
|
void |
resetCustomerPasswordSpecifyingEmail(int custId,
java.lang.String eMailAddress)
Reset a customer's password using the eMail address specified.
|
void |
sendTemplateEmailToCustomers(AdminCustomerSearch custSearch,
java.lang.String templateName,
java.lang.Object obj1,
java.lang.Object obj2,
java.lang.Object obj3,
java.lang.Object obj4,
java.lang.Object obj5,
int numberEmailThreads)
Calls sendTemplateEmailToCustomersWithOptions() with null options.
|
void |
sendTemplateEmailToCustomersWithOptions(AdminCustomerSearch custSearch,
java.lang.String templateName,
java.lang.Object obj1,
java.lang.Object obj2,
java.lang.Object obj3,
java.lang.Object obj4,
java.lang.Object obj5,
int numberEmailThreads,
AdminEmailOptions options)
An email is sent to the customer.
|
void |
setAvailableChars(java.lang.String availableChars) |
protected void |
setCustGroupCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c)
Set CustomerGroup criteria with standard attributes
|
void |
setCustomerPassword(int customerId,
java.lang.String password)
Sets the customer password.
|
void |
setCustomerPassword(int customerId,
java.lang.String password,
boolean forceChange,
java.util.Calendar expiry)
Set the customer password as well as the expiry date and whether the customer should be
forced to change it
|
void |
updateCustomer(AdminCustomer cust)
We must update the following tables: customers, address_book (for the default address) and
customers_info
|
int |
updateCustomerGroup(AdminCustomerGroup custGroup)
Update a customer group
|
protected void |
updateCustomerReviews(int custId,
java.sql.Connection con)
Updates a customer's reviews by setting the custId to null.
|
void |
updateCustomerWithOptions(AdminCustomer cust,
AdminUpdateCustomerOptions options)
We must update the following tables: customers, address_book (for the default address) and
customers_info
|
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. |
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
protected static org.apache.commons.logging.Log log
protected static final boolean DEFAULT_DELETE_REVIEWS
protected static final java.lang.String availableLowerChars
protected static final java.lang.String availableUpperChars
protected static final java.lang.String availableSpecialChars
protected static final java.lang.String availableNumericChars
protected static final java.lang.String DEFAULT_PASSWORD_CHARACTERS
protected java.lang.String availableChars
public AdminCustomerMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic int getCustomersCount(AdminCustomerSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getCustomersCount
in interface AdminCustomerMgrIf
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
- an unexpected exception in the KonaKart Admin enginepublic AdminCustomerSearchResult getCustomers(AdminCustomerSearch custSearch, int offset, int size) throws java.lang.Exception
getCustomers
in interface AdminCustomerMgrIf
custSearch
- the definition of the search for customers - can be nulloffset
- the offset in the dbsize
- the number of records from the specified offsetjava.lang.Exception
- an unexpected exceptionpublic AdminCustomerSearchResult getCustomersLite(AdminCustomerSearch custSearch, int offset, int size) throws KKAdminException
getCustomersLite
in interface AdminCustomerMgrIf
custSearch
- the definition of the search for customers - can be nulloffset
- the offset in the dbsize
- the number of records from the specified offsetKKAdminException
- an unexpected exception in the KonaKart Admin enginepublic java.lang.String getDbPassword(int userId) throws KKAdminException
AdminCustomerMgrIf
getDbPassword
in interface AdminCustomerMgrIf
userId
- the userIdKKAdminException
- an unexpected exception in the KonaKart Admin enginepublic AdminProductNotification[] getProductNotificationsForCustomer(int customerId) throws java.lang.Exception
getProductNotificationsForCustomer
in interface AdminCustomerMgrIf
customerId
- the customerIdjava.lang.Exception
- an unexpected exceptionpublic void updateCustomer(AdminCustomer cust) throws java.lang.Exception
updateCustomer
in interface AdminCustomerMgrIf
cust
- the customer - must already have a good IDjava.lang.Exception
- an unexpected exceptionpublic void updateCustomerWithOptions(AdminCustomer cust, AdminUpdateCustomerOptions options) throws java.lang.Exception
updateCustomerWithOptions
in interface AdminCustomerMgrIf
cust
- the customer - must already have a good IDoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic int deleteCustomer(int custId) throws java.lang.Exception
Removes records from :
Parameters :
deleteCustomer
in interface AdminCustomerMgrIf
custId
- the custIdjava.lang.Exception
- an unexpected exceptionprotected boolean deleteReviews() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin engineprotected void deleteCustomerReviews(int custId, java.sql.Connection con) throws java.lang.Exception
Removes records from :
Parameters :
custId
- the custIdcon
- the conjava.lang.Exception
- an unexpected exceptionprotected void updateCustomerReviews(int custId, java.sql.Connection con) throws java.lang.Exception
Updates records from :
Parameters :
custId
- the custIdcon
- the conjava.lang.Exception
- an unexpected exceptionpublic int forceRegisterCustomer(AdminCustomerRegistration custReg) throws java.lang.Exception
forceRegisterCustomer
in interface AdminCustomerMgrIf
custReg
- the custRegjava.lang.Exception
- an unexpected exceptionpublic int registerCustomer(AdminCustomerRegistration custReg) throws java.lang.Exception
registerCustomer
in interface AdminCustomerMgrIf
custReg
- the custRegjava.lang.Exception
- an unexpected exceptionpublic int registerCustomerPrivate(AdminCustomerRegistration custReg, boolean force) throws java.lang.Exception
Alter table t Engine = InnoDB;
. The standard engine seems to be MyIsam which
doesn't support transactions.custReg
- the custRegforce
- the forcejava.lang.Exception
- an unexpected exceptionpublic void resetCustomerPasswordSpecifyingEmail(int custId, java.lang.String eMailAddress) throws KKAdminException
resetCustomerPasswordSpecifyingEmail
in interface AdminCustomerMgrIf
custId
- Customer IdeMailAddress
- The eMail address to override the one from the customer objectKKAdminException
- an unexpected exception in the KonaKart Admin engine if the customer is not
found, or problems resetting the password or sending the email.public void resetCustomerPassword(int custId) throws KKAdminException
resetCustomerPassword
in interface AdminCustomerMgrIf
custId
- Customer IdKKAdminException
- an unexpected exception in the KonaKart Admin engine if the customer is not
found, the customer has no email address (which is used as the username), or
problems resetting the password or sending the email.protected void resetCustomerPassword(int custId, java.lang.String eMailAddr) throws KKAdminException
custId
- Customer IdeMailAddr
- The eMail address to override the one from the customer objectKKAdminException
- an unexpected exception in the KonaKart Admin engine if the customer is not
found, the customer has no email address (which is used as the username), or
problems resetting the password or sending the email.public void setCustomerPassword(int customerId, java.lang.String password) throws java.lang.Exception
setCustomerPassword
in interface AdminCustomerMgrIf
customerId
- the customerIdpassword
- the passwordjava.lang.Exception
- an unexpected exceptionpublic void setCustomerPassword(int customerId, java.lang.String password, boolean forceChange, java.util.Calendar expiry) throws java.lang.Exception
setCustomerPassword
in interface AdminCustomerMgrIf
customerId
- the customerIdpassword
- the passwordforceChange
- the forceChangeexpiry
- the expiryjava.lang.Exception
- an unexpected exceptionpublic java.lang.String getRandomPassword(int length) throws java.lang.Exception
getRandomPassword
in interface AdminCustomerMgrIf
length
- the lengthjava.lang.Exception
- an unexpected exceptionprotected boolean doesZoneExist(java.lang.String zoneDesc, int countryId) throws java.lang.Exception
zoneDesc
- the zoneDesccountryId
- the countryIdjava.lang.Exception
- an unexpected exceptioncom.konakart.app.KKException
- an unexpected KKException exceptionprotected void addCustomerOrderBy(com.konakart.db.KKCriteria c, AdminCustomerSearch custSearch)
c
- the ccustSearch
- the custSearchprotected int addCustomerSearchCriteria(com.konakart.db.KKCriteria c, AdminCustomerSearch custSearch, boolean addressJoin) throws KKAdminException
c
- The KKCriteria objectcustSearch
- The AdminCustomerSearch objectaddressJoin
- Set to true if the criteria already contains a join to the address tableKKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Engineprotected java.lang.String getTagValue(java.lang.String value, int rule, java.lang.String preWildCard, java.lang.String postWildCard)
value
- the valuerule
- the rulepreWildCard
- the preWildCardpostWildCard
- the postWildCardprotected int getCount(com.konakart.db.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the 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)protected boolean doesCountryExist(int countryId) throws org.apache.torque.TorqueException, KKAdminException
countryId
- the countryIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginepublic boolean doesCustomerExistForEmail(java.lang.String emailAddr) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
doesCustomerExistForEmail
in interface AdminCustomerMgrIf
emailAddr
- the emailAddrorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public boolean doesCustomerExistForTelephone(java.lang.String telephone) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
doesCustomerExistForTelephone
in interface AdminCustomerMgrIf
telephone
- the telephoneorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public boolean doesCustomerExistForTelephone1(java.lang.String telephone1) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
doesCustomerExistForTelephone1
in interface AdminCustomerMgrIf
telephone1
- the telephone1org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public boolean doesCustomerExistForUsername(java.lang.String username) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
doesCustomerExistForUsername
in interface AdminCustomerMgrIf
username
- the usernameorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public boolean doesCustomerExistForId(int custId) throws org.apache.torque.TorqueException, KKAdminException
doesCustomerExistForId
in interface AdminCustomerMgrIf
custId
- the custIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginepublic AdminCustomer getCustomerForEmail(java.lang.String emailAddr) throws java.lang.Exception
getCustomerForEmail
in interface AdminCustomerMgrIf
emailAddr
- the emailAddrjava.lang.Exception
- an unexpected exceptionpublic AdminCustomer getCustomerForEmailWithOptions(java.lang.String emailAddr, AdminGetCustomerOptions options) throws java.lang.Exception
getCustomerForEmailWithOptions
in interface AdminCustomerMgrIf
emailAddr
- the emailAddroptions
- Options allowing you to configure the API call in order to populate customer
children when implementing a hierarchical customer structure.java.lang.Exception
- an unexpected exceptionpublic AdminCustomer getCustomerForId(int customerId) throws java.lang.Exception
getCustomerForId
in interface AdminCustomerMgrIf
customerId
- the customerIdjava.lang.Exception
- an unexpected exceptionpublic AdminCustomer getCustomerForIdWithOptions(int customerId, AdminGetCustomerOptions options) throws java.lang.Exception
getCustomerForIdWithOptions
in interface AdminCustomerMgrIf
customerId
- the customerIdoptions
- Options allowing you to configure the API call in order to populate customer
children when implementing a hierarchical customer structure.java.lang.Exception
- an unexpected exceptionpublic int getCustomerIdForEmail(java.lang.String emailAddr) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
AdminCustomerMgrIf
getCustomerIdForEmail
in interface AdminCustomerMgrIf
emailAddr
- the emailAddrorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.lang.String getAddressFormatTemplate(int id) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getAddressFormatTemplate
in interface AdminCustomerMgrIf
id
- the idorg.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
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginepublic AdminAddressFormat[] getAllAddressFormats() throws KKAdminException
getAllAddressFormats
in interface AdminCustomerMgrIf
KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginepublic void sendTemplateEmailToCustomers(AdminCustomerSearch custSearch, java.lang.String templateName, java.lang.Object obj1, java.lang.Object obj2, java.lang.Object obj3, java.lang.Object obj4, java.lang.Object obj5, int numberEmailThreads) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
sendTemplateEmailToCustomers
in interface AdminCustomerMgrIf
custSearch
- The AdminCustomerSearch object which determines the customers that are selected.templateName
- The name of the template. The country code and .vm will be appended automatically.
i.e. If the template name is newsletter and the country code is en, then we will
look for a file called newsletter_en.vm.obj1
- This object will be passed to the velocity template with the name obj1.obj2
- This object will be passed to the velocity template with the name obj2.obj3
- This object will be passed to the velocity template with the name obj3.obj4
- This object will be passed to the velocity template with the name obj4.obj5
- This object will be passed to the velocity template with the name obj5.numberEmailThreads
- The number of concurrent threads that will be used to send the emails.java.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)java.lang.Exception
- an unexpected Exception exceptionpublic void sendTemplateEmailToCustomersWithOptions(AdminCustomerSearch custSearch, java.lang.String templateName, java.lang.Object obj1, java.lang.Object obj2, java.lang.Object obj3, java.lang.Object obj4, java.lang.Object obj5, int numberEmailThreads, AdminEmailOptions options) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
sendTemplateEmailToCustomersWithOptions
in interface AdminCustomerMgrIf
custSearch
- The AdminCustomerSearch object which determines the customers that are selected.templateName
- The name of the template. The country code and .vm will be appended automatically.
i.e. If the template name is newsletter and the country code is en, then we will
look for a file called newsletter_en.vm.obj1
- This object will be passed to the velocity template with the name obj1.obj2
- This object will be passed to the velocity template with the name obj2.obj3
- This object will be passed to the velocity template with the name obj3.obj4
- This object will be passed to the velocity template with the name obj4.obj5
- This object will be passed to the velocity template with the name obj5.numberEmailThreads
- The number of concurrent threads that will be used to send the emails.options
- An object used to configure options used when sending eMails from the AdminAppcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)java.lang.Exception
- an unexpected exceptionpublic void insertProductNotification(int custId, int prodId) throws KKAdminException
insertProductNotification
in interface AdminCustomerMgrIf
custId
- the customerIdprodId
- the productIdKKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginepublic void deleteProductNotification(int custId, int prodId) throws KKAdminException
deleteProductNotification
in interface AdminCustomerMgrIf
custId
- the customerIdprodId
- the productIdKKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginepublic AdminCustomerGroup[] getCustomerGroupsPerPromotion(int promotionId, int languageId) throws java.lang.Exception
getCustomerGroupsPerPromotion
in interface AdminCustomerMgrIf
promotionId
- the promotionIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic int insertCustomerGroup(AdminCustomerGroup custGroup) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
insertCustomerGroup
in interface AdminCustomerMgrIf
custGroup
- A customer group objectKKAdminException
- an unexpected exception in the KonaKart Admin engine 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)public int insertCustomerGroups(AdminCustomerGroup[] custGroups) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
insertCustomerGroups
in interface AdminCustomerMgrIf
custGroups
- An array of AdminCustomerGroup objectsorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public int updateCustomerGroup(AdminCustomerGroup custGroup) throws KKAdminException, org.apache.torque.TorqueException
updateCustomerGroup
in interface AdminCustomerMgrIf
custGroup
- A customer group objectKKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public int deleteCustomerGroup(int custGroupId) throws java.lang.Exception
deleteCustomerGroup
in interface AdminCustomerMgrIf
custGroupId
- The id of a customer group objectjava.lang.Exception
- an unexpected exceptionpublic AdminCustomerGroupSearchResult getCustomerGroups(AdminCustomerGroupSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getCustomerGroups
in interface AdminCustomerMgrIf
search
- the searchorg.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
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Engineprotected int addCustomerGroupSearchCriteria(com.konakart.db.KKCriteria c, AdminCustomerGroupSearch search) throws KKAdminException
c
- the csearch
- the searchKKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Engineprotected void setCustGroupCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c)
c
- the cprotected void addCustomerGroupOrderBy(com.konakart.db.KKCriteria c, AdminCustomerGroupSearch search)
c
- the csearch
- the searchpublic void incrementLogonCount(int customerId) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
incrementLogonCount
in interface AdminCustomerMgrIf
customerId
- the customerIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engine unexpected exception in the
KonaKart Admin Enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminCustomerMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
- an unexpected exceptionpublic void createMailingList(AdminCustomerSearch search, AdminMailListOptions listOptions) throws KKAdminException
AdminCustomerMgrIf
createMailingList
in interface AdminCustomerMgrIf
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 enginepublic java.lang.String getAvailableChars()
public void setAvailableChars(java.lang.String availableChars)
availableChars
- the availableChars to setpublic void populateCustomerChildren(AdminCustomer[] parents, boolean recursive) 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.java.lang.Exception
- an unexpected exceptionpublic void populateCustomerParents(AdminCustomer[] customers) throws java.lang.Exception
customers
- An array of customersjava.lang.Exception
- an unexpected exceptionpublic void addChildrenToCustomer(int parentId, AdminCustomer[] children) throws java.lang.Exception
addChildrenToCustomer
in interface AdminCustomerMgrIf
parentId
- ParentId set on the AdminCustomer children objects passed in as a parameterchildren
- An array of AdminCustomer objectsjava.lang.Exception
- an unexpected exceptionpublic void checkUniquenessForRegistration(AdminCustomerRegistration custReg, boolean force) throws java.lang.Exception
custReg
- the custRegforce
- the forcejava.lang.Exception
- an unexpected exceptionpublic void checkUniquenessForUpdate(AdminUpdateCustomerOptions options, AdminCustomer currentCust, AdminCustomer cust) throws java.lang.Exception
options
- the optionscurrentCust
- The current customer referred to by the session idcust
- The object containing the new customer datajava.lang.Exception
- an unexpected exceptionpublic AdminVendorSearchResult getVendors(AdminVendorSearch vendorSearch, int offset, int size) throws java.lang.Exception
getVendors
in interface AdminCustomerMgrIf
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 AdminVendor getVendorForId(int vendorId) throws java.lang.Exception
getVendorForId
in interface AdminCustomerMgrIf
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionpublic void updateVendor(AdminVendor vendor) throws java.lang.Exception
updateVendor
in interface AdminCustomerMgrIf
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
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 int insertVendor(AdminVendor vendor) throws java.lang.Exception
insertVendor
in interface AdminCustomerMgrIf
vendor
- the vendorjava.lang.Exception
- an unexpected exceptionpublic void deleteVendor(int vendorId) throws java.lang.Exception
deleteVendor
in interface AdminCustomerMgrIf
vendorId
- the vendorIdjava.lang.Exception
- an unexpected 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 AdminCustomerMgrIf
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionpublic void addVendorToStore(int vendorId, java.lang.String vendorStoreId) throws java.lang.Exception
addVendorToStore
in interface AdminCustomerMgrIf
vendorId
- the vendorIdvendorStoreId
- the vendorStoreIdjava.lang.Exception
- an unexpected exceptionpublic AdminCloneCustomerResult cloneCustomer(int superUserId, int cloneCustId, java.lang.String[] stores) throws java.lang.Exception
AdminCustomerMgrIf
Points to note:
cloneCustomer
in interface AdminCustomerMgrIf
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 exceptionpublic AdminDeleteCustomerResult deleteCustomerMultiStore(int superUserId, int customerId, java.lang.String[] stores) throws java.lang.Exception
AdminCustomerMgrIf
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
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
AdminCustomerMgrIf
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
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.