|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.al.BaseMgr
com.konakart.al.CustomerMgr
public class CustomerMgr
Contains methods to manage customer details and login / logout.
| Field Summary |
|---|
| Fields inherited from class com.konakart.al.BaseMgr |
|---|
eng, kkAppEng, log |
| Constructor Summary | |
|---|---|
protected |
CustomerMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
Constructor |
| Method Summary | |
|---|---|
int |
addAddressToCustomer(com.konakart.appif.AddressIf addr)
Call the engine to create a new customer address which is added to the addresses of the current customer. |
void |
addProductNotificationsToCustomer(int productId)
Add the product notification to the currently logged in customer. |
void |
changePassword(java.lang.String currentPassword,
java.lang.String newPassword)
Calls the engine to change the current password with the new one. |
protected void |
createGuest()
We create a customer object for a guest. |
void |
deleteAddressFromCustomer(int addrId)
Call the engine to delete the customer address. |
void |
deleteProductNotificationsFromCustomer(int productId)
Delete the product notification from the customer's list of notifications. |
void |
editCustomer(com.konakart.appif.CustomerIf cust)
Calls the engine to update the customer data with the data passed in as a parameter. |
void |
editCustomerAddress(com.konakart.appif.AddressIf addr)
Call the engine to edit the customer address. |
void |
emptyZonesForRegistration()
Empties the zonesForRegistration array so that the UI doesn't use it. |
void |
fetchProductNotificationsPerCustomer()
Fetch the product notifications for a customer and language and set them on the customer object. |
void |
fetchZonesForRegistration(int countryId)
Fetch the zones for the given country. |
com.konakart.appif.CustomerIf |
getCurrentCustomer()
Returns the current customer. |
com.konakart.appif.AddressIf |
getSelectedAddr()
Returns the currently selected address. |
com.konakart.appif.ZoneIf[] |
getZonesForRegistration()
The array of zone objects is normally used during the customer registration process or when adding / editing customer addresses. |
java.lang.String |
login(java.lang.String emailAddr,
java.lang.String password)
Login and if successful, set the current customer object. |
java.lang.String |
loginByAdmin(java.lang.String adminSession,
int customerId)
Login for the customer identified by customerId and if successful, set the current customer object. |
void |
logout()
Log-off and reset some variables. |
com.konakart.appif.CustomerIf |
populateCurrentCustomerAddresses(boolean force)
Ensures that the currentCustomer object has his default address and array of addresses populated |
void |
refreshCustomerCachedData()
Normally called after a login to get and cache customer relevant data such as the customer's basket, the customer's orders and the customer's order history. |
int |
registerCustomer(com.konakart.appif.CustomerRegistrationIf cr)
Register a new customer. |
void |
sendNewPassword(java.lang.String emailAddr)
Calls the engine to send a new password to the user. |
void |
setSelectedAddr(com.konakart.appif.AddressIf selectedAddr)
Sets the selected address to the one passed in as a parameter. |
void |
setSelectedAddrFromId(int addrId)
Ensures that the selectedAddr attribute is populated. |
| Methods inherited from class com.konakart.al.BaseMgr |
|---|
getEng, getKkAppEng, setEng, setKkAppEng |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CustomerMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
throws com.konakart.app.KKException
eng - kkAppEng -
com.konakart.app.KKException| Method Detail |
|---|
public void setSelectedAddrFromId(int addrId)
throws KKAppException
addrId - Address Id of one of the addresses of the current customer
KKAppException
public void editCustomerAddress(com.konakart.appif.AddressIf addr)
throws com.konakart.app.KKException,
KKAppException
addr - The address object to be edited
com.konakart.app.KKException
KKAppException
public void deleteAddressFromCustomer(int addrId)
throws com.konakart.app.KKException,
KKAppException
addrId - The address Id of the address to be deleted.
com.konakart.app.KKException
KKAppException
public int addAddressToCustomer(com.konakart.appif.AddressIf addr)
throws com.konakart.app.KKException,
KKAppException
addr - The address to be added
com.konakart.app.KKException
KKAppExceptionpublic com.konakart.appif.AddressIf getSelectedAddr()
public void setSelectedAddr(com.konakart.appif.AddressIf selectedAddr)
selectedAddr - The selectedAddr to set.
public void fetchProductNotificationsPerCustomer()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void fetchZonesForRegistration(int countryId)
throws com.konakart.app.KKException
zonesForRegistration attribute
is set with the array of zones.
countryId - The id of the country for which we are setting the zones.
com.konakart.app.KKException
public void emptyZonesForRegistration()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void addProductNotificationsToCustomer(int productId)
throws com.konakart.app.KKException
productId - The id of the product to be added
com.konakart.app.KKException
public void deleteProductNotificationsFromCustomer(int productId)
throws com.konakart.app.KKException
productId - The id of the product to be removed
com.konakart.app.KKException
public void editCustomer(com.konakart.appif.CustomerIf cust)
throws com.konakart.app.KKException
cust - The Customer object to be edited
com.konakart.app.KKException
public com.konakart.appif.CustomerIf populateCurrentCustomerAddresses(boolean force)
throws com.konakart.app.KKException,
KKAppException
force - If set to true the addresses will be refreshed even if they already exist
com.konakart.app.KKException
KKAppException
protected void createGuest()
throws com.konakart.app.KKException
com.konakart.app.KKExceptionpublic com.konakart.appif.CustomerIf getCurrentCustomer()
public int registerCustomer(com.konakart.appif.CustomerRegistrationIf cr)
throws com.konakart.app.KKException
cr - The CustomerRegistration object
com.konakart.app.KKException
public java.lang.String login(java.lang.String emailAddr,
java.lang.String password)
throws com.konakart.app.KKException
emailAddr - The user idpassword - The password
com.konakart.app.KKException
public java.lang.String loginByAdmin(java.lang.String adminSession,
int customerId)
throws com.konakart.app.KKException
adminSession - Valid session belonging to an administratorcustomerId - Id of the customer being logged in
com.konakart.app.KKException
public void refreshCustomerCachedData()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void logout()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void changePassword(java.lang.String currentPassword,
java.lang.String newPassword)
throws com.konakart.app.KKException
currentPassword - The current passwordnewPassword - The new password
com.konakart.app.KKException
public void sendNewPassword(java.lang.String emailAddr)
throws com.konakart.app.KKException
emailAddr - The email address where the new password will be sent
com.konakart.app.KKExceptionpublic com.konakart.appif.ZoneIf[] getZonesForRegistration()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||