Page 1 of 1

Writing my own PasswordUpdatedHandler

Posted: Sat Jun 28, 2014 2:30 pm
by gowthamgutha
I would like to write my own org.broadleafcommerce.profile.core.service.handler.PasswordUpdatedHandler as I have a different parameter other than Customer here.

How could I do that? Also, where is the implementation of this interface written. I couldn't find any class something like PasswordUpdatedHandlerImpl when searching in the Open Type dialog of the Eclipse.

I would like to see its implementation in order to get an idea of how it is done.

Thanks in advance. Hope you will reply as soon as possible.

Re: Writing my own PasswordUpdatedHandler

Posted: Sun Jun 29, 2014 8:50 pm
by phillipuniverse
There are no implementations of this interface in the framework. This is just an extra extension point that you can use that we have built in.

If the existing PasswordUpdatedHandlers do not have the parameters you want, then you could extend CustomerServiceImpl and provide overrides for changePassword and resetPassword which is what actually invokes the PasswordUpdatedHandlers to pass in those parameters.

Re: Writing my own PasswordUpdatedHandler

Posted: Mon Jun 30, 2014 3:01 pm
by gowthamgutha
I have actually written my own PasswordUpdatedHandler i.e. something like MyCustomerPasswordUpdatedHandler Now, it is just an interface.

Could you explain me what will happen when I call handler.passwordChanged() method of this interface. Are there any events that will be fired? If so what are those event classes and how could I write my own such class?

Thanks in advance. Hope you will reply as soon as possible.