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 java.lang.Object
implements CustomerService


Field Summary
protected  CustomerDao customerDao
           
protected  IdGenerationService idGenerationService
           
protected  org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder
           
protected  RoleDao roleDao
           
 
Constructor Summary
CustomerServiceImpl()
           
 
Method Summary
 void addPostRegisterListener(PostRegistrationObserver postRegisterListeners)
           
 Customer changePassword(PasswordChange passwordChange)
           
 Customer createCustomerFromId(java.lang.Long customerId)
          Returns a Customer by first looking in the database, otherwise creating a new non-persisted Customer
protected  void notifyPostRegisterListeners(Customer customer)
           
 Customer readCustomerByEmail(java.lang.String emailAddress)
           
 Customer readCustomerById(java.lang.Long id)
           
 Customer readCustomerByUsername(java.lang.String username)
           
 Customer registerCustomer(Customer customer, java.lang.String password, java.lang.String passwordConfirm)
           
 void removePostRegisterListener(PostRegistrationObserver postRegisterListeners)
           
 Customer saveCustomer(Customer customer)
           
 Customer saveCustomer(Customer customer, boolean register)
           
 void setCustomerDao(CustomerDao customerDao)
           
 void setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
           
 
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
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,
                                 java.lang.String password,
                                 java.lang.String passwordConfirm)
Specified by:
registerCustomer in interface CustomerService

readCustomerByEmail

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

changePassword

public Customer changePassword(PasswordChange passwordChange)
Specified by:
changePassword 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)

createCustomerFromId

public Customer createCustomerFromId(java.lang.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(java.lang.String username)
Specified by:
readCustomerByUsername in interface CustomerService

readCustomerById

public Customer readCustomerById(java.lang.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)


Copyright © 2011. All Rights Reserved.