public interface CustomerService
| Modifier and Type | Method and Description |
|---|---|
void |
addPostRegisterListener(PostRegistrationObserver postRegisterListeners) |
Customer |
changePassword(PasswordChange passwordChange) |
GenericResponse |
checkPasswordResetToken(java.lang.String token)
Verifies that the passed in token is valid.
|
Customer |
createCustomer() |
Customer |
createCustomerFromId(java.lang.Long customerId)
Returns a
Customer by first looking in the database, otherwise creating a new non-persisted Customer |
Customer |
createNewCustomer()
Returns a non-persisted
Customer. |
java.lang.Long |
findNextCustomerId() |
java.util.List<PasswordUpdatedHandler> |
getPasswordChangedHandlers() |
java.util.List<PasswordUpdatedHandler> |
getPasswordResetHandlers() |
Customer |
readCustomerByEmail(java.lang.String emailAddress) |
Customer |
readCustomerById(java.lang.Long userId) |
Customer |
readCustomerByUsername(java.lang.String customerName) |
Customer |
registerCustomer(Customer customer,
java.lang.String password,
java.lang.String passwordConfirm) |
void |
removePostRegisterListener(PostRegistrationObserver postRegisterListeners) |
Customer |
resetPassword(PasswordReset passwordReset) |
GenericResponse |
resetPasswordUsingToken(java.lang.String username,
java.lang.String token,
java.lang.String password,
java.lang.String confirmPassword)
Updates the password for the passed in customer only if the passed
in token is valid for that customer.
|
Customer |
saveCustomer(Customer customer) |
Customer |
saveCustomer(Customer customer,
boolean register) |
GenericResponse |
sendForgotPasswordNotification(java.lang.String userName,
java.lang.String forgotPasswordUrl)
Generates an access token and then emails the user.
|
GenericResponse |
sendForgotUsernameNotification(java.lang.String emailAddress)
Looks up the corresponding Customer and emails the address on file with
the associated username.
|
void |
setPasswordChangedHandlers(java.util.List<PasswordUpdatedHandler> passwordChangedHandlers) |
void |
setPasswordResetHandlers(java.util.List<PasswordUpdatedHandler> passwordResetHandlers) |
Customer registerCustomer(Customer customer, java.lang.String password, java.lang.String passwordConfirm)
Customer readCustomerByUsername(java.lang.String customerName)
Customer readCustomerByEmail(java.lang.String emailAddress)
Customer changePassword(PasswordChange passwordChange)
Customer readCustomerById(java.lang.Long userId)
Customer createCustomer()
Customer createCustomerFromId(java.lang.Long customerId)
Customer by first looking in the database, otherwise creating a new non-persisted CustomercustomerId - the id of the customer to lookupCustomer from the database if it exists, or a new non-persisted CustomerCustomer createNewCustomer()
Customer. Typically used with registering a new customer.void addPostRegisterListener(PostRegistrationObserver postRegisterListeners)
void removePostRegisterListener(PostRegistrationObserver postRegisterListeners)
Customer resetPassword(PasswordReset passwordReset)
java.util.List<PasswordUpdatedHandler> getPasswordResetHandlers()
void setPasswordResetHandlers(java.util.List<PasswordUpdatedHandler> passwordResetHandlers)
java.util.List<PasswordUpdatedHandler> getPasswordChangedHandlers()
void setPasswordChangedHandlers(java.util.List<PasswordUpdatedHandler> passwordChangedHandlers)
GenericResponse sendForgotUsernameNotification(java.lang.String emailAddress)
emailAddress - GenericResponse sendForgotPasswordNotification(java.lang.String userName, java.lang.String forgotPasswordUrl)
userName - - the user to send a reset password email to.forgotPasswordUrl - - Base url to include in the email.GenericResponse resetPasswordUsingToken(java.lang.String username, java.lang.String token, java.lang.String password, java.lang.String confirmPassword)
username - Username of the customertoken - Valid reset tokenpassword - new passwordGenericResponse checkPasswordResetToken(java.lang.String token)
token - java.lang.Long findNextCustomerId()
Copyright © 2018. All Rights Reserved.