public interface AdminCustomerMgrIf
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.
|
void |
addVendorToStore(int vendorId,
java.lang.String vendorStoreId)
Associates a vendor with a store
|
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.
|
void |
deleteProductNotification(int custId,
int prodId)
Delete a Product Notification record for the specified customer and product if it's found.
|
void |
deleteVendor(int vendorId)
Delete a vendor
|
boolean |
doesCustomerExistForEmail(java.lang.String emailAddr)
Checks to see whether a 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.
|
int |
forceRegisterCustomer(AdminCustomerRegistration custReg)
A new customer is added to the system.
|
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
|
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)
Get a random password for a Customer.
|
AdminStore[] |
getStoresForCustomer(int superUserId,
java.lang.String emailAddress)
This API call is only available when in multi-store single DB, non shared customer mode.
|
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 |
refreshConfigs()
Refresh the configuration of the Admin Customer Manager
|
int |
registerCustomer(AdminCustomerRegistration custReg)
A new customer is added to the system.
|
void |
resetCustomerPassword(int custId)
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 |
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
|
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. |
int getCustomersCount(AdminCustomerSearch 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
- an unexpected exception in the KonaKart Admin engineAdminCustomerSearchResult getCustomers(AdminCustomerSearch custSearch, int offset, int size) throws java.lang.Exception
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 exceptionAdminProductNotification[] getProductNotificationsForCustomer(int customerId) throws java.lang.Exception
customerId
- Id of the customer whose product notifications will be returnedjava.lang.Exception
- an unexpected exceptionvoid updateCustomer(AdminCustomer cust) throws java.lang.Exception
cust
- the customer - must already have a good IDjava.lang.Exception
- an unexpected exceptionvoid updateCustomerWithOptions(AdminCustomer cust, AdminUpdateCustomerOptions options) throws java.lang.Exception
cust
- the customer - must already have a good IDoptions
- Allows you to define whether KonaKart should check that the telephone number being
set is unique (does not belong to an existing registered customer).java.lang.Exception
- an unexpected exceptionint deleteCustomer(int custId) throws java.lang.Exception
Removes records from :
Parameters :
custId
- the custIdjava.lang.Exception
- an unexpected exceptionint registerCustomer(AdminCustomerRegistration custReg) throws java.lang.Exception
Alter table t Engine = InnoDB;
. The standard engine seems to be MyIsam which
doesn't support transactions.custReg
- the custRegjava.lang.Exception
- an unexpected exceptionint forceRegisterCustomer(AdminCustomerRegistration custReg) throws java.lang.Exception
Alter table t Engine = InnoDB;
. The standard engine seems to be MyIsam which
doesn't support transactions.custReg
- the custRegjava.lang.Exception
- an unexpected exceptionvoid resetCustomerPasswordSpecifyingEmail(int custId, java.lang.String eMailAddress) throws KKAdminException
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.void resetCustomerPassword(int custId) throws KKAdminException
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.void setCustomerPassword(int customerId, java.lang.String password) throws java.lang.Exception
customerId
- the customerIdpassword
- the passwordjava.lang.Exception
- an unexpected exceptionvoid setCustomerPassword(int customerId, java.lang.String password, boolean forceChange, java.util.Calendar expiry) throws java.lang.Exception
customerId
- the customerIdpassword
- the passwordforceChange
- the forceChangeexpiry
- the expiryjava.lang.Exception
- an unexpected exceptionjava.lang.String getRandomPassword(int length) throws java.lang.Exception
length
- the lengthjava.lang.Exception
- an unexpected exceptionboolean doesCustomerExistForEmail(java.lang.String emailAddr) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
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)boolean doesCustomerExistForId(int custId) throws org.apache.torque.TorqueException, KKAdminException
custId
- the custIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminCustomer getCustomerForEmail(java.lang.String emailAddr) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
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)java.lang.Exception
- an unexpected exceptionAdminCustomer getCustomerForEmailWithOptions(java.lang.String emailAddr, AdminGetCustomerOptions options) throws java.lang.Exception
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 exceptionint getCustomerIdForEmail(java.lang.String emailAddr) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
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)AdminCustomer getCustomerForId(int customerId) throws java.lang.Exception
customerId
- the customerIdjava.lang.Exception
- an unexpected exceptionAdminCustomer getCustomerForIdWithOptions(int customerId, AdminGetCustomerOptions options) throws java.lang.Exception
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 exceptionjava.lang.String getAddressFormatTemplate(int id) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
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 engineAdminAddressFormat[] getAllAddressFormats() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid 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
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)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
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 AdminAppjava.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)void insertProductNotification(int custId, int prodId) throws KKAdminException
custId
- the customerIdprodId
- the productIdKKAdminException
- an unexpected exception in the KonaKart Admin enginevoid deleteProductNotification(int custId, int prodId) throws KKAdminException
custId
- the customerIdprodId
- the productIdKKAdminException
- an unexpected exception in the KonaKart Admin engineAdminCustomerGroup[] getCustomerGroupsPerPromotion(int promotionId, int languageId) throws java.lang.Exception
promotionId
- the promotionIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionint insertCustomerGroup(AdminCustomerGroup custGroup) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
custGroup
- A customer group objectKKAdminException
- an 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)int insertCustomerGroups(AdminCustomerGroup[] custGroups) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
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 enginecom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)int updateCustomerGroup(AdminCustomerGroup custGroup) throws KKAdminException, org.apache.torque.TorqueException
custGroup
- A customer group objectKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)int deleteCustomerGroup(int custGroupId) throws java.lang.Exception
custGroupId
- The id of a customer group objectjava.lang.Exception
- an unexpected exceptionAdminCustomerGroupSearchResult getCustomerGroups(AdminCustomerGroupSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
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 enginevoid refreshConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionAdminCustomerSearchResult getCustomersLite(AdminCustomerSearch custSearch, int offset, int size) throws KKAdminException
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 enginevoid incrementLogonCount(int customerId) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
customerId
- the customerIdorg.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)java.lang.String getDbPassword(int userId) throws KKAdminException
userId
- the userIdKKAdminException
- an unexpected exception in the KonaKart Admin enginevoid createMailingList(AdminCustomerSearch search, AdminMailListOptions listOptions) throws KKAdminException
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 enginevoid addChildrenToCustomer(int parentId, AdminCustomer[] children) throws java.lang.Exception
parentId
- ParentId set on the AdminCustomer children objects passed in as a parameterchildren
- An array of AdminCustomer objectsjava.lang.Exception
- an unexpected exceptionboolean doesCustomerExistForTelephone(java.lang.String telephone) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
telephone
- the telephoneorg.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)boolean doesCustomerExistForTelephone1(java.lang.String telephone1) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
telephone1
- the telephone1org.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)boolean doesCustomerExistForUsername(java.lang.String username) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException
username
- the usernameorg.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)AdminVendorSearchResult getVendors(AdminVendorSearch vendorSearch, int offset, int size) throws java.lang.Exception
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 exceptionAdminVendor getVendorForId(int vendorId) throws java.lang.Exception
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionvoid updateVendor(AdminVendor vendor) throws java.lang.Exception
vendor
- the vendor - must already have a good IDjava.lang.Exception
- an unexpected exceptionvoid updateVendor(AdminVendor vendor, java.sql.Connection con) throws java.lang.Exception
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 exceptionint insertVendor(AdminVendor vendor) throws java.lang.Exception
vendor
- the vendorjava.lang.Exception
- an unexpected exceptionvoid deleteVendor(int vendorId) throws java.lang.Exception
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionvoid 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.vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionvoid addVendorToStore(int vendorId, java.lang.String vendorStoreId) throws java.lang.Exception
vendorId
- the vendorIdvendorStoreId
- the vendorStoreIdjava.lang.Exception
- an unexpected exceptionAdminCloneCustomerResult cloneCustomer(int superUserId, int cloneCustId, java.lang.String[] stores) throws java.lang.Exception
Points to note:
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 exceptionAdminDeleteCustomerResult 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.
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 exceptionAdminStore[] 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.
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.