org.broadleafcommerce.profile.core.service
Class CustomerServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.profile.core.service.CustomerServiceImpl
All Implemented Interfaces:
CustomerService

@Service(value="blCustomerService")
public class CustomerServiceImpl
extends Object
implements CustomerService


Field Summary
protected  CustomerDao customerDao
           
protected  IdGenerationService idGenerationService
           
protected  List<PasswordUpdatedHandler> passwordChangedHandlers
           
protected  org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder
           
protected  List<PasswordUpdatedHandler> passwordResetHandlers
           
protected  List<PostRegistrationObserver> postRegisterListeners
           
protected  RoleDao roleDao
           
 
Constructor Summary
CustomerServiceImpl()
           
 
Method Summary
 void addPostRegisterListener(PostRegistrationObserver postRegisterListeners)
           
 Customer changePassword(PasswordChange passwordChange)
           
 Customer createCustomer()
           
 Customer createCustomerFromId(Long customerId)
          Returns a Customer by first looking in the database, otherwise creating a new non-persisted Customer
 List<PasswordUpdatedHandler> getPasswordChangedHandlers()
           
 List<PasswordUpdatedHandler> getPasswordResetHandlers()
           
protected  void notifyPostRegisterListeners(Customer customer)
           
 Customer readCustomerByEmail(String emailAddress)
           
 Customer readCustomerById(Long id)
           
 Customer readCustomerByUsername(String username)
           
 Customer registerCustomer(Customer customer, String password, String passwordConfirm)
           
 void removePostRegisterListener(PostRegistrationObserver postRegisterListeners)
           
 Customer resetPassword(PasswordReset passwordReset)
           
 Customer saveCustomer(Customer customer)
           
 Customer saveCustomer(Customer customer, boolean register)
           
 void setCustomerDao(CustomerDao customerDao)
           
 void setPasswordChangedHandlers(List<PasswordUpdatedHandler> passwordChangedHandlers)
           
 void setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
           
 void setPasswordResetHandlers(List<PasswordUpdatedHandler> passwordResetHandlers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

customerDao

protected CustomerDao customerDao

idGenerationService

protected IdGenerationService idGenerationService

passwordEncoder

protected org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder

roleDao

protected RoleDao roleDao

postRegisterListeners

protected final List<PostRegistrationObserver> postRegisterListeners

passwordResetHandlers

protected List<PasswordUpdatedHandler> passwordResetHandlers

passwordChangedHandlers

protected List<PasswordUpdatedHandler> passwordChangedHandlers
Constructor Detail

CustomerServiceImpl

public CustomerServiceImpl()
Method Detail

saveCustomer

public Customer saveCustomer(Customer customer)
Specified by:
saveCustomer in interface CustomerService

saveCustomer

public Customer saveCustomer(Customer customer,
                             boolean register)
Specified by:
saveCustomer in interface CustomerService

registerCustomer

public Customer registerCustomer(Customer customer,
                                 String password,
                                 String passwordConfirm)
Specified by:
registerCustomer in interface CustomerService

readCustomerByEmail

public Customer readCustomerByEmail(String emailAddress)
Specified by:
readCustomerByEmail in interface CustomerService

changePassword

public Customer changePassword(PasswordChange passwordChange)
Specified by:
changePassword in interface CustomerService

resetPassword

public Customer resetPassword(PasswordReset passwordReset)
Specified by:
resetPassword in interface CustomerService

addPostRegisterListener

public void addPostRegisterListener(PostRegistrationObserver postRegisterListeners)
Specified by:
addPostRegisterListener in interface CustomerService

removePostRegisterListener

public void removePostRegisterListener(PostRegistrationObserver postRegisterListeners)
Specified by:
removePostRegisterListener in interface CustomerService

notifyPostRegisterListeners

protected void notifyPostRegisterListeners(Customer customer)

createCustomer

public Customer createCustomer()
Specified by:
createCustomer in interface CustomerService

createCustomerFromId

public Customer createCustomerFromId(Long customerId)
Description copied from interface: CustomerService
Returns a Customer by first looking in the database, otherwise creating a new non-persisted Customer

Specified by:
createCustomerFromId in interface CustomerService
Parameters:
customerId - the id of the customer to lookup
Returns:
either a Customer from the database if it exists, or a new non-persisted Customer

readCustomerByUsername

public Customer readCustomerByUsername(String username)
Specified by:
readCustomerByUsername in interface CustomerService

readCustomerById

public Customer readCustomerById(Long id)
Specified by:
readCustomerById in interface CustomerService

setCustomerDao

public void setCustomerDao(CustomerDao customerDao)

setPasswordEncoder

public void setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)

getPasswordResetHandlers

public List<PasswordUpdatedHandler> getPasswordResetHandlers()
Specified by:
getPasswordResetHandlers in interface CustomerService

setPasswordResetHandlers

public void setPasswordResetHandlers(List<PasswordUpdatedHandler> passwordResetHandlers)
Specified by:
setPasswordResetHandlers in interface CustomerService

getPasswordChangedHandlers

public List<PasswordUpdatedHandler> getPasswordChangedHandlers()
Specified by:
getPasswordChangedHandlers in interface CustomerService

setPasswordChangedHandlers

public void setPasswordChangedHandlers(List<PasswordUpdatedHandler> passwordChangedHandlers)
Specified by:
setPasswordChangedHandlers in interface CustomerService


Copyright © 2012. All Rights Reserved.