public class CustomerMgr extends BaseMgr implements CustomerMgrIf
| Modifier and Type | Class and Description |
|---|---|
protected class |
CustomerMgr.StaticData
Used to store the static data of this manager
|
| Modifier and Type | Field and Description |
|---|---|
static int |
CUST_TYPE_ADMIN_USER
An Admin user
|
static int |
CUST_TYPE_B2B_COMPANY_ADMIN
B2B Company Admin
|
static int |
CUST_TYPE_DEFAULT_CUST
Default customer
|
static int |
CUST_TYPE_NON_REGISTERED_CUST
A customer that hasn't registered
|
static int |
CUST_TYPE_REGISTERED_CUST
A customer that has registered normally
|
protected static boolean |
DEFAULT_DELETE_REVIEWS
Default value for the konakart.delete_reviews property
|
static java.util.GregorianCalendar |
DEFAULT_DOB
Default value written to DB when not available
|
static java.lang.String |
DEFAULT_STRING
Default value written to DB when not available
|
static java.lang.String |
DEFAULT_STRING_SHORT
Default value written to DB when not available
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
mutex
|
protected static java.util.Map<java.lang.String,CustomerMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
templateBaseDir| Constructor and Description |
|---|
CustomerMgr(KKEngIf eng)
Constructor
|
| 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.
|
protected void |
addProductNotificationToCustomer(int customerId,
int productId) |
void |
addProductNotificationToCustomer(java.lang.String sessionId,
int productId)
Adds a product notification to the customer referenced by the session id
|
void |
checkUniquenessForEdit(EditCustomerOptionsIf options,
CustomerIf currentCust,
CustomerIf cust)
Check uniqueness for the username, telephone and telephone1
|
void |
checkUniquenessForRegistration(CustomerRegistrationIf custReg,
boolean force)
Check uniqueness for the username, telephone and telephone1
|
void |
checkUniquenessForRegistration(CustomerRegistrationIf custReg,
boolean force,
java.sql.Connection con)
Check uniqueness for the username, telephone and telephone1
|
void |
deleteAddressFromCustomer(java.lang.String sessionId,
int addressId)
The address defined by customerId and addressId is deleted.
|
void |
deleteCreditCard(int customerId,
int cardId)
Deletes the credit card referenced by cardId that must belong to the customer with id
customerId
|
void |
deleteCreditCard(java.lang.String sessionId,
int cardId)
Deletes the credit card referenced by cardId that must belong to the logged in customer.
|
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.
|
protected void |
deleteCustomerReviews(int custId,
java.sql.Connection con)
Deletes a customer's reviews from the database.
|
void |
deleteProductNotificationFromCustomer(int customerId,
int productId) |
void |
deleteProductNotificationFromCustomer(java.lang.String sessionId,
int productId)
Deletes a product notification from the customer referenced by the session id
|
protected boolean |
deleteReviews()
Utility method to return the konakart.delete_reviews property value
|
protected boolean |
doesCountryExist(int countryId)
Does the Country Exist?
|
protected boolean |
doesCountryExist(int countryId,
java.sql.Connection con)
Does the Country Exist?
|
boolean |
doesCustomerExistForEmail(java.lang.String emailAddr)
Checks to see whether a registered customer already exists with this email address.
|
protected 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.
|
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.
|
boolean |
doesZoneExist(java.lang.String zoneDesc,
int countryId,
java.sql.Connection con)
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.
|
protected Address[] |
getAddressesPerCustomer(Customer customer)
Returns all of the addresses registered for the given customer.
|
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.
|
CustomerGroup[] |
getAllCustomerGroups(int languageId,
java.sql.Connection con)
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.
|
protected Customer |
getCustomerForNotification(NotificationOptionsIf options)
Common code
|
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.
|
CustomerGroup |
getCustomerGroupFromCache(int customerGroupId,
java.sql.Connection con)
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[] |
getCustomers(CustomerSearch custSearch,
java.sql.Connection con)
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 |
populateCustomerChildren(CustomerIf[] parents,
boolean recursive)
Populates the child customers of the array of parent customers passed in as a parameter.
|
void |
populateCustomerChildren(CustomerIf[] parents,
boolean recursive,
java.sql.Connection con)
Populates the child customers of the array of parent customers passed in as a parameter.
|
protected void |
populateCustomerGroupHashMap(CustomerMgr.StaticData sd)
If the hash map is set to null or the refreshCustGroupMapFlag is set, then we populated the
hash map with the customer groups in the default language.
|
protected void |
populateCustomerGroupHashMap(CustomerMgr.StaticData sd,
java.sql.Connection con)
If the hash map is set to null or the refreshCustGroupMapFlag is set, then we populated the
hash map with the customer groups in the default language.
|
void |
populateCustomerParents(CustomerIf[] customers)
Populates the parent customer of the customers passed in as a parameter
|
void |
populateCustomerParents(CustomerIf[] customers,
java.sql.Connection con)
Populates the parent customer of the customers passed in as a parameter
|
void |
populateProductSuggestions(CustomerIf[] customers)
Populates the Product Suggestions for the customers passed in as a parameter
|
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.
|
protected void |
updateCustomerReviews(int custId,
java.sql.Connection con)
Updates a customer's reviews by setting the custId to null.
|
void |
updateVendorReviewInfo(int vendorId)
The vendor referenced by the
vendorId parameter is updated with information
regarding the average rating and the number of reviews present for the vendor. |
protected boolean |
useLocksForLogonCountIncrementer()
Utility method to return whether to use Locks for the Logon Count incrementer
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNowprotected static org.apache.commons.logging.Log log
public static final int CUST_TYPE_REGISTERED_CUST
public static final int CUST_TYPE_ADMIN_USER
public static final int CUST_TYPE_NON_REGISTERED_CUST
public static final int CUST_TYPE_DEFAULT_CUST
public static final int CUST_TYPE_B2B_COMPANY_ADMIN
protected static final boolean DEFAULT_DELETE_REVIEWS
protected static java.util.Map<java.lang.String,CustomerMgr.StaticData> staticDataHM
protected static java.lang.String mutex
public static final java.lang.String DEFAULT_STRING
public static final java.lang.String DEFAULT_STRING_SHORT
public static final java.util.GregorianCalendar DEFAULT_DOB
public CustomerMgr(KKEngIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionprotected boolean deleteReviews()
public int forceRegisterCustomer(CustomerRegistrationIf custReg) throws java.lang.Exception
forceRegisterCustomer in interface CustomerMgrIfcustReg - the custRegjava.lang.Exception - an unexpected exceptionpublic int registerCustomer(CustomerRegistrationIf custReg) throws java.lang.Exception
Alter table t Engine = InnoDB;. The standard engine seems to be MyIsam which
doesn't support transactions.registerCustomer in interface CustomerMgrIfcustReg - the custRegjava.lang.Exception - an unexpected exceptionpublic int 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.registerCustomerPrivate in interface CustomerMgrIfcustReg - the custRegforce - If set, then we modify the registration rather than throwing an exception if the
customer already existsjava.lang.Exception - an unexpected exceptionpublic void checkUniquenessForRegistration(CustomerRegistrationIf custReg, boolean force) throws java.lang.Exception
custReg - the custRegforce - the forcejava.lang.Exception - an unexpected exceptionpublic void checkUniquenessForRegistration(CustomerRegistrationIf custReg, boolean force, java.sql.Connection con) throws java.lang.Exception
custReg - the custRegforce - the forcecon - Connection for transactionjava.lang.Exception - an unexpected exceptionpublic void editCustomer(java.lang.String sessionId,
CustomerIf cust)
throws java.lang.Exception
editCustomer in interface CustomerMgrIfsessionId - the sessionIdcust - the custjava.lang.Exception - an unexpected exceptionpublic void editCustomerWithOptions(java.lang.String sessionId,
CustomerIf cust,
EditCustomerOptionsIf options)
throws java.lang.Exception
editCustomerWithOptions in interface CustomerMgrIfsessionId - the sessionIdcust - the custoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic void checkUniquenessForEdit(EditCustomerOptionsIf options, CustomerIf currentCust, CustomerIf 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 void setCustomerPassword(int customerId,
java.lang.String password)
throws java.lang.Exception
setCustomerPassword in interface CustomerMgrIfcustomerId - 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 CustomerMgrIfcustomerId - the customerIdpassword - the passwordforceChange - the forceChangeexpiry - the expiryjava.lang.Exception - an unexpected exceptionpublic void setCustomerType(int customerId,
int type)
throws java.lang.Exception
setCustomerType in interface CustomerMgrIfcustomerId - the customerIdtype - the typejava.lang.Exception - an unexpected exceptionprotected boolean useLocksForLogonCountIncrementer()
public void incrementLogonCount(int customerId)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
incrementLogonCount in interface CustomerMgrIfcustomerId - 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)public Customer[] getCustomers(CustomerSearch custSearch) throws java.lang.Exception
getCustomers in interface CustomerMgrIfcustSearch - CustomerSearch objectjava.lang.Exception - an unexpected exceptionpublic Customer[] getCustomers(CustomerSearch custSearch, java.sql.Connection con) throws java.lang.Exception
custSearch - CustomerSearch objectcon - Connection for Transactionjava.lang.Exception - an unexpected exceptionpublic void deleteCustomer(int custId)
throws java.lang.Exception
Removes records from :
Parameters :
deleteCustomer in interface CustomerMgrIfcustId - the custIdjava.lang.Exception - an unexpected exceptionprotected 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 boolean doesCustomerExistForEmail(java.lang.String emailAddr)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
doesCustomerExistForEmail in interface CustomerMgrIfemailAddr - 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)public boolean doesCustomerExistForTelephone(java.lang.String telephone)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
doesCustomerExistForTelephone in interface CustomerMgrIftelephone - 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)public boolean doesCustomerExistForTelephone1(java.lang.String telephone1)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
doesCustomerExistForTelephone1 in interface CustomerMgrIftelephone1 - 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)public boolean doesCustomerExistForUsername(java.lang.String username)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException,
com.workingdogs.village.DataSetException
doesCustomerExistForUsername in interface CustomerMgrIfusername - 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)public Customer getCustomerForEmail(java.lang.String emailAddr) throws java.lang.Exception
getCustomerForEmail in interface CustomerMgrIfemailAddr - the emailAddrjava.lang.Exception - an unexpected exceptionpublic void getCustomerForEmailAndSetPassword(java.lang.String emailAddr,
java.lang.String password)
throws java.lang.Exception
getCustomerForEmailAndSetPassword in interface CustomerMgrIfemailAddr - the emailAddrpassword - the password to setjava.lang.Exception - an unexpected exceptionpublic Customer getCustomerForEmail(java.lang.String emailAddr, boolean returnNonRegisteredCustomers) throws java.lang.Exception
getCustomerForEmail in interface CustomerMgrIfemailAddr - the emailAddrreturnNonRegisteredCustomers - When set, we search for non-registered customers as well as registeredjava.lang.Exception - an unexpected exceptionprotected boolean doesCustomerExistForId(int custId)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException
custId - the custIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic java.lang.String getNameFromId(int custId)
throws java.lang.Exception
getNameFromId in interface CustomerMgrIfcustId - the custIdjava.lang.Exception - an unexpected exceptionpublic Customer getCustomer(java.lang.String sessionId) throws java.lang.Exception
getCustomer in interface CustomerMgrIfsessionId - the sessionIdjava.lang.Exception - an unexpected exceptionpublic Customer getCustomerWithOptions(java.lang.String sessionId, FetchCustomerOptionsIf options) throws java.lang.Exception
getCustomerWithOptions in interface CustomerMgrIfsessionId - the sessionIdoptions - An object containing options for the method. It may be set to null.java.lang.Exception - an unexpected exceptionpublic Customer getCustomerWithOptions(int customerId, FetchCustomerOptionsIf options) throws java.lang.Exception
getCustomerWithOptions in interface CustomerMgrIfcustomerId - the customerIdoptions - An object containing options for the method. It may be set to null.java.lang.Exception - an unexpected exceptionpublic Customer getCustomerForId(int customerId) throws java.lang.Exception
getCustomerForId in interface CustomerMgrIfcustomerId - the customerIdjava.lang.Exception - an unexpected exceptionpublic Customer getDefaultCustomer() throws java.lang.Exception
getDefaultCustomer in interface CustomerMgrIfjava.lang.Exception - an unexpected exceptionprotected boolean doesCountryExist(int countryId)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException
countryId - the countryIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionprotected boolean doesCountryExist(int countryId,
java.sql.Connection con)
throws org.apache.torque.TorqueException,
com.konakart.app.KKException
countryId - the countryIdcon - Connection for transactionorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic Address[] getAddressesPerCustomer(java.lang.String sessionId) throws java.lang.Exception
getAddressesPerCustomer in interface CustomerMgrIfsessionId - the sessionIdjava.lang.Exception - an unexpected exceptionpublic Address getDefaultAddressPerCustomer(java.lang.String sessionId) throws java.lang.Exception
getDefaultAddressPerCustomer in interface CustomerMgrIfsessionId - the sessionIdjava.lang.Exception - an unexpected exceptionpublic Address getDefaultAddressPerCustomer(Customer cust) throws java.lang.Exception
getDefaultAddressPerCustomer in interface CustomerMgrIfcust - the custjava.lang.Exception - an unexpected exceptionpublic Address getCountryAndZonePerCustomer(java.lang.String sessionId) throws java.lang.Exception
getCountryAndZonePerCustomer in interface CustomerMgrIfsessionId - the sessionIdjava.lang.Exception - an unexpected exceptionpublic Address getCountryAndZonePerCustomer(int customerId) throws java.lang.Exception
getCountryAndZonePerCustomer in interface CustomerMgrIfcustomerId - the customerIdjava.lang.Exception - an unexpected exceptionpublic Address getCountryAndZonePerCustomer(Customer cust) throws java.lang.Exception
getCountryAndZonePerCustomer in interface CustomerMgrIfcust - the custjava.lang.Exception - an unexpected exceptionpublic void setDefaultAddressPerCustomer(java.lang.String sessionId,
int addressId)
throws java.lang.Exception
setDefaultAddressPerCustomer in interface CustomerMgrIfsessionId - the sessionIdaddressId - the addressIdjava.lang.Exception - an unexpected exceptionprotected Address[] getAddressesPerCustomer(Customer customer) throws java.lang.Exception
customer - the customerjava.lang.Exception - an unexpected exceptionpublic Address getAddress(int addressId) throws java.lang.Exception
getAddress in interface CustomerMgrIfaddressId - the addressIdjava.lang.Exception - an unexpected exceptionpublic int addAddressToCustomer(java.lang.String sessionId,
AddressIf addr)
throws java.lang.Exception
addAddressToCustomer in interface CustomerMgrIfsessionId - the sessionIdaddr - the addrjava.lang.Exception - an unexpected exceptionpublic void deleteAddressFromCustomer(java.lang.String sessionId,
int addressId)
throws java.lang.Exception
deleteAddressFromCustomer in interface CustomerMgrIfsessionId - the sessionIdaddressId - the addressIdjava.lang.Exception - an unexpected exceptionpublic void editCustomerAddress(java.lang.String sessionId,
AddressIf addr)
throws java.lang.Exception
editCustomerAddress in interface CustomerMgrIfsessionId - the sessionIdaddr - the addrjava.lang.Exception - an unexpected exceptionpublic KKCriteria setAllAddrAttrs(KKCriteria c)
CustomerMgrIfsetAllAddrAttrs in interface CustomerMgrIfc - the cpublic java.lang.String getAddressFormatTemplate(int id)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
com.konakart.app.KKException
getAddressFormatTemplate in interface CustomerMgrIfid - 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 exceptionpublic void addCustomerNotifications(NotificationOptionsIf options) throws java.lang.Exception
addCustomerNotifications in interface CustomerMgrIfoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic void deleteCustomerNotifications(NotificationOptionsIf options) throws java.lang.Exception
deleteCustomerNotifications in interface CustomerMgrIfoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic boolean isCustomerSubscribedToNewsletter(java.lang.String emailAddr)
throws java.lang.Exception
emailAddr parameter is subscribed to receive the newsletter.isCustomerSubscribedToNewsletter in interface CustomerMgrIfemailAddr - the emailAddrjava.lang.Exception - an unexpected exceptionprotected Customer getCustomerForNotification(NotificationOptionsIf options) throws java.lang.Exception
options - the optionsjava.lang.Exception - an unexpected exceptionpublic void addProductNotificationToCustomer(java.lang.String sessionId,
int productId)
throws java.lang.Exception
CustomerMgrIfaddProductNotificationToCustomer in interface CustomerMgrIfsessionId - the sessionIdproductId - the productIdjava.lang.Exception - an unexpected exceptionprotected void addProductNotificationToCustomer(int customerId,
int productId)
throws java.lang.Exception
customerId - the customerIdproductId - the productIdjava.lang.Exception - an unexpected exceptionpublic void deleteProductNotificationFromCustomer(java.lang.String sessionId,
int productId)
throws java.lang.Exception
CustomerMgrIfdeleteProductNotificationFromCustomer in interface CustomerMgrIfsessionId - the sessionIdproductId - the productIdjava.lang.Exception - an unexpected exceptionpublic void deleteProductNotificationFromCustomer(int customerId,
int productId)
throws java.lang.Exception
customerId - the customerIdproductId - the productIdjava.lang.Exception - an unexpected exceptionpublic Product[] getProductNotificationsPerCustomer(java.lang.String sessionId, int languageId) throws java.lang.Exception
CustomerMgrIfgetProductNotificationsPerCustomer in interface CustomerMgrIfsessionId - the sessionIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionpublic Product[] getProductNotificationsPerCustomerWithOptions(java.lang.String sessionId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
CustomerMgrIfgetProductNotificationsPerCustomerWithOptions in interface CustomerMgrIfsessionId - the sessionIdlanguageId - the languageIdoptions - the optionsjava.lang.Exception - an unexpected exceptionpublic boolean doesZoneExist(java.lang.String zoneDesc,
int countryId)
throws java.lang.Exception
doesZoneExist in interface CustomerMgrIfzoneDesc - the zoneDesccountryId - the countryIdjava.lang.Exception - an unexpected exceptionpublic boolean doesZoneExist(java.lang.String zoneDesc,
int countryId,
java.sql.Connection con)
throws java.lang.Exception
zoneDesc - the zoneDesccountryId - the countryIdcon - Connection for transactionjava.lang.Exception - an unexpected exceptionpublic int getTempCustomerId()
throws org.apache.torque.TorqueException,
com.konakart.app.KKException
CustomerMgrIfgetTempCustomerId in interface CustomerMgrIforg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic CustomerGroup[] getAllCustomerGroups(int languageId) throws java.lang.Exception
getAllCustomerGroups in interface CustomerMgrIflanguageId - 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 exceptionpublic CustomerGroup[] getAllCustomerGroups(int languageId, java.sql.Connection con) 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.con - Connection for transactionjava.lang.Exception - an unexpected exceptionpublic CustomerGroup getCustomerGroup(int customerGroupId, int languageId) throws java.lang.Exception
getCustomerGroup in interface CustomerMgrIfcustomerGroupId - 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 exceptionpublic CustomerGroup getCustomerGroupFromCache(int customerGroupId) throws java.lang.Exception
getCustomerGroupFromCache in interface CustomerMgrIfcustomerGroupId - the customerGroupIdjava.lang.Exception - an unexpected exceptionpublic CustomerGroup getCustomerGroupFromCache(int customerGroupId, java.sql.Connection con) throws java.lang.Exception
customerGroupId - the customerGroupIdcon - Connection for transactionjava.lang.Exception - an unexpected exceptionprotected void populateCustomerGroupHashMap(CustomerMgr.StaticData sd) throws java.lang.Exception
sd - the sdjava.lang.Exception - an unexpected exceptionprotected void populateCustomerGroupHashMap(CustomerMgr.StaticData sd, java.sql.Connection con) throws java.lang.Exception
sd - the sdcon - Connection for transactionjava.lang.Exception - an unexpected exceptionpublic void refreshConfigs()
throws com.konakart.app.KKException
refreshConfigs in interface CustomerMgrIfcom.konakart.app.KKException - an unexpected KKException exceptionpublic void enableCustomer(int customerId)
throws com.konakart.app.KKException,
org.apache.torque.TorqueException
enableCustomer in interface CustomerMgrIfcustomerId - the customerIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic void setCustomerEmailVerified(int customerId,
boolean emailVerified)
throws com.konakart.app.KKException,
org.apache.torque.TorqueException
setCustomerEmailVerified in interface CustomerMgrIfcustomerId - the customerIdemailVerified - the emailVerifiedcom.konakart.app.KKException - an unexpected KKException exceptionorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public void populateCustomerChildren(CustomerIf[] 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 populateCustomerChildren(CustomerIf[] parents, boolean recursive, java.sql.Connection con) throws java.lang.Exception
parents - An array of parent customersrecursive - When set to true the population is recursive to retrieve the whole of the child
tree.con - Connection for transactionjava.lang.Exception - an unexpected exceptionpublic void populateProductSuggestions(CustomerIf[] customers) throws java.lang.Exception
populateProductSuggestions in interface CustomerMgrIfcustomers - An array of customersjava.lang.Exception - an unexpected exceptionpublic void populateCustomerParents(CustomerIf[] customers) throws java.lang.Exception
customers - An array of customersjava.lang.Exception - an unexpected exceptionpublic void populateCustomerParents(CustomerIf[] customers, java.sql.Connection con) throws java.lang.Exception
customers - An array of customerscon - Connection for transactionjava.lang.Exception - an unexpected exceptionpublic int addCreditCardToCustomer(CreditCardIf card, CreditCardOptionsIf options) throws java.lang.Exception
addCreditCardToCustomer in interface CustomerMgrIfcard - A Credit Card objectoptions - Options not currently usedjava.lang.Exception - an unexpected exceptionpublic int addCreditCardToCustomer(java.lang.String sessionId,
CreditCardIf card,
CreditCardOptionsIf options)
throws java.lang.Exception
addCreditCardToCustomer in interface CustomerMgrIfsessionId - the sessionIdcard - A CreditCard objectoptions - Options not currently usedjava.lang.Exception - an unexpected exceptionpublic CreditCard[] getCreditCardsPerCustomer(java.lang.String sessionId, CreditCardOptionsIf options) throws java.lang.Exception
getCreditCardsPerCustomer in interface CustomerMgrIfsessionId - the sessionIdoptions - Used to manage whether the returned cards have the formatted address attribute
populatedjava.lang.Exception - an unexpected exceptionpublic CreditCard[] getCreditCardsPerCustomer(int customerId, CreditCardOptionsIf options) throws java.lang.Exception
getCreditCardsPerCustomer in interface CustomerMgrIfcustomerId - the customerIdoptions - Used to manage whether the returned cards have the formatted address attribute
populatedjava.lang.Exception - an unexpected exceptionpublic void deleteCreditCard(java.lang.String sessionId,
int cardId)
throws java.lang.Exception
deleteCreditCard in interface CustomerMgrIfsessionId - the sessionIdcardId - the cardIdjava.lang.Exception - an unexpected exceptionpublic void deleteCreditCard(int customerId,
int cardId)
throws java.lang.Exception
deleteCreditCard in interface CustomerMgrIfcustomerId - the customerIdcardId - the cardIdjava.lang.Exception - an unexpected exceptionpublic void editCreditCard(java.lang.String sessionId,
CreditCardIf card,
CreditCardOptionsIf options)
throws java.lang.Exception
editCreditCard in interface CustomerMgrIfsessionId - the sessionIdcard - A credit card objectoptions - Options not currently usedjava.lang.Exception - an unexpected exceptionpublic void escapeCustomerRegistration(CustomerRegistrationIf custReg)
escapeCustomerRegistration in interface CustomerMgrIfcustReg - the custRegpublic void escapeAddress(AddressIf addr)
escapeAddress in interface CustomerMgrIfaddr - the addrpublic void escapeCustomer(CustomerIf cust)
escapeCustomer in interface CustomerMgrIfcust - the custpublic boolean doesVendorExist(int vendorId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
com.konakart.app.KKException
doesVendorExist in interface CustomerMgrIfvendorId - the vendorIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic void updateVendorReviewInfo(int vendorId)
throws java.lang.Exception
vendorId parameter is updated with information
regarding the average rating and the number of reviews present for the vendor.updateVendorReviewInfo in interface CustomerMgrIfvendorId - the vendorIdjava.lang.Exception - an unexpected exceptionpublic Address[] getAddressesPerVendor(VendorIf vendor) throws java.lang.Exception
getAddressesPerVendor in interface CustomerMgrIfvendor - the vendorjava.lang.Exception - an unexpected exceptionpublic Vendors getVendors(DataDescriptorIf dataDescIn, VendorSearchIf searchIn) throws java.lang.Exception
getVendors in interface CustomerMgrIfdataDescIn - the dataDescInsearchIn - the searchInjava.lang.Exception - an unexpected exceptionpublic Vendor getVendorForId(int vendorId) throws java.lang.Exception
getVendorForId in interface CustomerMgrIfvendorId - the vendorIdjava.lang.Exception - an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.