public interface CustomerMgrIf
Modifier and Type | Method and Description |
---|---|
int |
addAddressToCustomer(java.lang.String sessionId,
AddressIf addr)
The Address object is added to the customer defined by the SessionId.
|
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.
|
void |
addCustomerNotifications(NotificationOptionsIf options)
A method that allows you sign up a customer for a newsletter or product notification.
|
void |
addProductNotificationToCustomer(java.lang.String sessionId,
int productId)
Adds a product notification to the customer referenced by the session id
|
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.
|
void |
deleteCustomer(int custId)
Deletes a customer from the database.
|
void |
deleteCustomerNotifications(NotificationOptionsIf options)
A method that allows you remove a customer notification for a newsletter or product.
|
void |
deleteProductNotificationFromCustomer(java.lang.String sessionId,
int productId)
Deletes a product notification from the customer referenced by the session id
|
boolean |
doesCustomerExistForEmail(java.lang.String emailAddr)
Checks to see whether a customer already exists with this email address.
|
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.
|
boolean |
doesVendorExist(int vendorId)
Figure out whether a vendor exists
|
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.
|
void |
editCreditCard(java.lang.String sessionId,
CreditCardIf card,
CreditCardOptionsIf options)
Edit the credit card of a logged in customer referenced by sessionId.
|
void |
editCustomer(java.lang.String sessionId,
CustomerIf cust)
Updates the customer data with the data in the Customer object passed in as a parameter.
|
void |
editCustomerAddress(java.lang.String sessionId,
AddressIf addr)
The Address object will replace the existing address object in the database with the same id.
|
void |
editCustomerWithOptions(java.lang.String sessionId,
CustomerIf cust,
EditCustomerOptionsIf options)
Updates the customer data with the data in the Customer object passed in as a parameter.
|
void |
enableCustomer(int customerId)
Enables the customer identified by the customer id.
|
void |
escapeAddress(AddressIf addr)
Escape the Strings in the Address object using the rules defined in the properties file by
the property konakart.escape.chars .
|
void |
escapeCustomer(CustomerIf cust)
Escape the Strings in the Customer object using the rules defined in the properties file by
the property konakart.escape.chars .
|
void |
escapeCustomerRegistration(CustomerRegistrationIf custReg)
Escape the Strings in the CustomerRegistration object using the rules defined in the
properties file by the property konakart.escape.chars .
|
int |
forceRegisterCustomer(CustomerRegistrationIf custReg)
A new customer is added to the system.
|
Address |
getAddress(int addressId)
Returns the address object for the given address id.
|
Address[] |
getAddressesPerCustomer(java.lang.String sessionId)
Returns all of the addresses registered for the given customer.
|
Address[] |
getAddressesPerVendor(VendorIf vendor)
Returns all of the addresses registered for the given vendor.
|
java.lang.String |
getAddressFormatTemplate(int id)
Does a query on the address_format table
|
CustomerGroup[] |
getAllCustomerGroups(int languageId)
Returns an array of customer groups for all customer groups that have been defined in the
system.
|
Address |
getCountryAndZonePerCustomer(Customer cust)
Returns the default address for the given customer.
|
Address |
getCountryAndZonePerCustomer(int customerId)
Returns the default address for the given customer.
|
Address |
getCountryAndZonePerCustomer(java.lang.String sessionId)
Returns the default address for the given customer.
|
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.
|
Customer |
getCustomer(java.lang.String sessionId)
Returns the customer object for the customer defined by the given sessionId.
|
Customer |
getCustomerForEmail(java.lang.String emailAddr)
Checks to see whether a registered customer already exists with this email address.
|
Customer |
getCustomerForEmail(java.lang.String emailAddr,
boolean returnNonRegisteredCustomers)
Checks to see whether a customer already exists with this email address.
|
void |
getCustomerForEmailAndSetPassword(java.lang.String emailAddr,
java.lang.String password)
Get customer by email and set password
|
Customer |
getCustomerForId(int customerId)
Returns the customer object for the customer defined by the given id.
|
CustomerGroup |
getCustomerGroup(int customerGroupId,
int languageId)
Returns a customer group object for the customerGroupId passed in as a parameter.
|
CustomerGroup |
getCustomerGroupFromCache(int customerGroupId)
Gets the CustomerGroup object for the customerGroupId and default language from the cache.
|
Customer[] |
getCustomers(CustomerSearch custSearch)
Retrieves an array of customers from the database that match the specified criteria in the
CustomerSearch input object.
|
Customer |
getCustomerWithOptions(int customerId,
FetchCustomerOptionsIf options)
Returns the customer object for the customer defined by the given customerId.
|
Customer |
getCustomerWithOptions(java.lang.String sessionId,
FetchCustomerOptionsIf options)
Returns the customer object for the customer defined by the given sessionId.
|
Address |
getDefaultAddressPerCustomer(Customer cust)
Returns the default address for the given customer.
|
Address |
getDefaultAddressPerCustomer(java.lang.String sessionId)
Returns the default address for the given customer.
|
Customer |
getDefaultCustomer()
Returns the customer object for the default customer.
|
java.lang.String |
getNameFromId(int custId) |
Product[] |
getProductNotificationsPerCustomer(java.lang.String sessionId,
int languageId)
Returns an array of products for which the customer referenced by sessionId will be notified
on.
|
Product[] |
getProductNotificationsPerCustomerWithOptions(java.lang.String sessionId,
int languageId,
FetchProductOptionsIf options)
Returns an array of products for which the customer referenced by sessionId will be notified
on.
|
int |
getTempCustomerId()
Returns an available unique temporary id.
|
Vendor |
getVendorForId(int vendorId)
Returns the vendor object for the vendor defined by the given id.
|
Vendors |
getVendors(DataDescriptorIf dataDescIn,
VendorSearchIf searchIn) |
void |
incrementLogonCount(int customerId)
This method is not exposed to the web interface because it isn't secure.
|
boolean |
isCustomerSubscribedToNewsletter(java.lang.String emailAddr)
Regardless of the type of customer, this API call returns true if the customer referenced by
the
emailAddr parameter is subscribed to receive the newsletter. |
void |
populateProductSuggestions(CustomerIf[] customers)
Populates the Product Suggestions for the customers passed in as a parameter
|
void |
refreshConfigs()
Refresh the configuration of the Customer manager
|
int |
registerCustomer(CustomerRegistrationIf custReg)
A new customer is added to the system.
|
int |
registerCustomerPrivate(CustomerRegistrationIf custReg,
boolean force)
A new customer is added to the system.
|
KKCriteria |
setAllAddrAttrs(KKCriteria c)
Used by other managers to avoid repeating code.
|
void |
setCustomerEmailVerified(int customerId,
boolean emailVerified)
Sets the email verified boolean attribute for 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 |
setCustomerType(int customerId,
int type)
Sets the customer type.
|
void |
setDefaultAddressPerCustomer(java.lang.String sessionId,
int addressId)
Sets the default address for this customer to be the addressId passed in as a parameter.
|
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 forceRegisterCustomer(CustomerRegistrationIf custReg) throws java.lang.Exception
custReg
- the custRegjava.lang.Exception
- an unexpected exceptionint registerCustomer(CustomerRegistrationIf 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 registerCustomerPrivate(CustomerRegistrationIf 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
- If set, then we modify the registration rather than throwing an exception if the
customer already existsjava.lang.Exception
- an unexpected exceptionvoid deleteCustomer(int custId) throws java.lang.Exception
Removes records from :
Parameters :
custId
- the custIdjava.lang.Exception
- an unexpected exceptionvoid editCustomer(java.lang.String sessionId, CustomerIf cust) throws java.lang.Exception
sessionId
- the sessionIdcust
- the custjava.lang.Exception
- an unexpected exceptionvoid editCustomerWithOptions(java.lang.String sessionId, CustomerIf cust, EditCustomerOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdcust
- the custoptions
- the optionsjava.lang.Exception
- an unexpected exceptionvoid 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 exceptionvoid setCustomerType(int customerId, int type) throws java.lang.Exception
customerId
- the customerIdtype
- the typejava.lang.Exception
- an unexpected exceptionvoid incrementLogonCount(int customerId) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
customerId
- the customerIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)boolean doesCustomerExistForEmail(java.lang.String emailAddr) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
emailAddr
- the emailAddrorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)Customer getCustomerForEmail(java.lang.String emailAddr) throws java.lang.Exception
emailAddr
- the emailAddrjava.lang.Exception
- an unexpected exceptionvoid getCustomerForEmailAndSetPassword(java.lang.String emailAddr, java.lang.String password) throws java.lang.Exception
emailAddr
- the emailAddrpassword
- the password to setjava.lang.Exception
- an unexpected exceptionCustomer getCustomerForEmail(java.lang.String emailAddr, boolean returnNonRegisteredCustomers) throws java.lang.Exception
emailAddr
- the emailAddrreturnNonRegisteredCustomers
- When set, we search for non-registered customers as well as registeredjava.lang.Exception
- an unexpected exceptionjava.lang.String getNameFromId(int custId) throws java.lang.Exception
custId
- the custIdjava.lang.Exception
- an unexpected exceptionCustomer getCustomer(java.lang.String sessionId) throws java.lang.Exception
sessionId
- the sessionIdjava.lang.Exception
- an unexpected exceptionCustomer getCustomerWithOptions(java.lang.String sessionId, FetchCustomerOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdoptions
- An object containing options for the method. It may be set to null.java.lang.Exception
- an unexpected exceptionCustomer getCustomerWithOptions(int customerId, FetchCustomerOptionsIf options) throws java.lang.Exception
customerId
- the customerIdoptions
- An object containing options for the method. It may be set to null.java.lang.Exception
- an unexpected exceptionCustomer getCustomerForId(int customerId) throws java.lang.Exception
customerId
- the customerIdjava.lang.Exception
- an unexpected exceptionCustomer getDefaultCustomer() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionAddress[] getAddressesPerCustomer(java.lang.String sessionId) throws java.lang.Exception
sessionId
- the sessionIdjava.lang.Exception
- an unexpected exceptionAddress getDefaultAddressPerCustomer(java.lang.String sessionId) throws java.lang.Exception
sessionId
- the sessionIdjava.lang.Exception
- an unexpected exceptionAddress getDefaultAddressPerCustomer(Customer cust) throws java.lang.Exception
cust
- the custjava.lang.Exception
- an unexpected exceptionAddress getCountryAndZonePerCustomer(java.lang.String sessionId) throws java.lang.Exception
sessionId
- the sessionIdjava.lang.Exception
- an unexpected exceptionAddress getCountryAndZonePerCustomer(int customerId) throws java.lang.Exception
customerId
- the customerIdjava.lang.Exception
- an unexpected exceptionAddress getCountryAndZonePerCustomer(Customer cust) throws java.lang.Exception
cust
- the custjava.lang.Exception
- an unexpected exceptionvoid setDefaultAddressPerCustomer(java.lang.String sessionId, int addressId) throws java.lang.Exception
sessionId
- the sessionIdaddressId
- the addressIdjava.lang.Exception
- an unexpected exceptionint addAddressToCustomer(java.lang.String sessionId, AddressIf addr) throws java.lang.Exception
sessionId
- the sessionIdaddr
- the addrjava.lang.Exception
- an unexpected exceptionvoid deleteAddressFromCustomer(java.lang.String sessionId, int addressId) throws java.lang.Exception
sessionId
- the sessionIdaddressId
- the addressIdjava.lang.Exception
- an unexpected exceptionvoid editCustomerAddress(java.lang.String sessionId, AddressIf addr) throws java.lang.Exception
sessionId
- the sessionIdaddr
- the addrjava.lang.Exception
- an unexpected exceptionjava.lang.String getAddressFormatTemplate(int id) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
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)com.konakart.app.KKException
- an unexpected KKException exceptionvoid addProductNotificationToCustomer(java.lang.String sessionId, int productId) throws java.lang.Exception
sessionId
- the sessionIdproductId
- the productIdjava.lang.Exception
- an unexpected exceptionvoid deleteProductNotificationFromCustomer(java.lang.String sessionId, int productId) throws java.lang.Exception
sessionId
- the sessionIdproductId
- the productIdjava.lang.Exception
- an unexpected exceptionProduct[] getProductNotificationsPerCustomer(java.lang.String sessionId, int languageId) throws java.lang.Exception
sessionId
- the sessionIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct[] getProductNotificationsPerCustomerWithOptions(java.lang.String sessionId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint getTempCustomerId() throws org.apache.torque.TorqueException, com.konakart.app.KKException
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionCustomerGroup[] getAllCustomerGroups(int languageId) throws java.lang.Exception
languageId
- The id for the language that will be used to determine the customer group name and
description. Value of -1 selects the default language.java.lang.Exception
- an unexpected exceptionCustomerGroup getCustomerGroup(int customerGroupId, int languageId) throws java.lang.Exception
customerGroupId
- the customerGroupIdlanguageId
- The id for the language that will be used to determine the customer group name and
description. Value of -1 selects the default language.java.lang.Exception
- an unexpected exceptionCustomerGroup getCustomerGroupFromCache(int customerGroupId) throws java.lang.Exception
customerGroupId
- the customerGroupIdjava.lang.Exception
- an unexpected exceptionvoid refreshConfigs() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionAddress getAddress(int addressId) throws java.lang.Exception
addressId
- the addressIdjava.lang.Exception
- an unexpected exceptionKKCriteria setAllAddrAttrs(KKCriteria c)
c
- the cvoid enableCustomer(int customerId) throws com.konakart.app.KKException, org.apache.torque.TorqueException
customerId
- the customerIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionvoid addCustomerNotifications(NotificationOptionsIf options) throws java.lang.Exception
options
- the optionsjava.lang.Exception
- an unexpected exceptionvoid deleteCustomerNotifications(NotificationOptionsIf options) throws java.lang.Exception
options
- the optionsjava.lang.Exception
- an unexpected exceptionCustomer[] getCustomers(CustomerSearch custSearch) throws java.lang.Exception
custSearch
- CustomerSearch objectjava.lang.Exception
- an unexpected exceptionvoid setCustomerEmailVerified(int customerId, boolean emailVerified) throws com.konakart.app.KKException, org.apache.torque.TorqueException
customerId
- the customerIdemailVerified
- the emailVerifiedcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)int addCreditCardToCustomer(CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
card
- A Credit Card objectoptions
- Options not currently usedjava.lang.Exception
- an unexpected exceptionint addCreditCardToCustomer(java.lang.String sessionId, CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdcard
- A CreditCard objectoptions
- Options not currently usedjava.lang.Exception
- an unexpected exceptionCreditCard[] getCreditCardsPerCustomer(java.lang.String sessionId, CreditCardOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdoptions
- Used to manage whether the returned cards have the formatted address attribute
populatedjava.lang.Exception
- an unexpected exceptionCreditCard[] getCreditCardsPerCustomer(int customerId, CreditCardOptionsIf options) throws java.lang.Exception
customerId
- the customerIdoptions
- Used to manage whether the returned cards have the formatted address attribute
populatedjava.lang.Exception
- an unexpected exceptionvoid deleteCreditCard(java.lang.String sessionId, int cardId) throws java.lang.Exception
sessionId
- the sessionIdcardId
- the cardIdjava.lang.Exception
- an unexpected exceptionvoid deleteCreditCard(int customerId, int cardId) throws java.lang.Exception
customerId
- the customerIdcardId
- the cardIdjava.lang.Exception
- an unexpected exceptionvoid editCreditCard(java.lang.String sessionId, CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdcard
- A credit card objectoptions
- Options not currently usedjava.lang.Exception
- an unexpected exceptionboolean doesZoneExist(java.lang.String zoneDesc, int countryId) throws java.lang.Exception
zoneDesc
- the zoneDesccountryId
- the countryIdjava.lang.Exception
- an unexpected exceptionboolean doesCustomerExistForTelephone(java.lang.String telephone) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
telephone
- the telephoneorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptioncom.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, com.konakart.app.KKException, com.workingdogs.village.DataSetException
telephone1
- the telephone1org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptioncom.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, com.konakart.app.KKException, com.workingdogs.village.DataSetException
username
- the usernameorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void escapeCustomerRegistration(CustomerRegistrationIf custReg)
custReg
- the custRegvoid escapeAddress(AddressIf addr)
addr
- the addrvoid escapeCustomer(CustomerIf cust)
cust
- the custboolean doesVendorExist(int vendorId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
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 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 exceptionAddress[] getAddressesPerVendor(VendorIf vendor) throws java.lang.Exception
vendor
- the vendorjava.lang.Exception
- an unexpected exceptionVendors getVendors(DataDescriptorIf dataDescIn, VendorSearchIf searchIn) throws java.lang.Exception
dataDescIn
- the dataDescInsearchIn
- the searchInjava.lang.Exception
- an unexpected exceptionVendor getVendorForId(int vendorId) throws java.lang.Exception
vendorId
- the vendorIdjava.lang.Exception
- an unexpected exceptionboolean isCustomerSubscribedToNewsletter(java.lang.String emailAddr) throws java.lang.Exception
emailAddr
parameter is subscribed to receive the newsletter.emailAddr
- the emailAddrjava.lang.Exception
- an unexpected exceptionvoid populateProductSuggestions(CustomerIf[] customers) throws java.lang.Exception
customers
- An array of customersjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.