Search in sources :

Example 1 with ResetPasswordSuccess

use of com.willshex.blogwt.client.api.user.event.ResetPasswordEventHandler.ResetPasswordSuccess in project blogwt by billy1380.

the class UserController method resetPassword.

/**
 * @param email
 */
public void resetPassword(String email) {
    final ResetPasswordRequest input = ApiHelper.setAccessCode(new ResetPasswordRequest());
    input.session = SessionController.get().sessionForApiCall();
    input.email = email;
    ApiHelper.createUserClient().resetPassword(input, new AsyncCallback<ResetPasswordResponse>() {

        @Override
        public void onSuccess(ResetPasswordResponse output) {
            if (output.status == StatusType.StatusTypeSuccess) {
            }
            DefaultEventBus.get().fireEventFromSource(new ResetPasswordSuccess(input, output), UserController.this);
        }

        @Override
        public void onFailure(Throwable caught) {
            DefaultEventBus.get().fireEventFromSource(new ResetPasswordFailure(input, caught), UserController.this);
        }
    });
}
Also used : ResetPasswordRequest(com.willshex.blogwt.shared.api.user.call.ResetPasswordRequest) ResetPasswordFailure(com.willshex.blogwt.client.api.user.event.ResetPasswordEventHandler.ResetPasswordFailure) ResetPasswordSuccess(com.willshex.blogwt.client.api.user.event.ResetPasswordEventHandler.ResetPasswordSuccess) ResetPasswordResponse(com.willshex.blogwt.shared.api.user.call.ResetPasswordResponse)

Aggregations

ResetPasswordFailure (com.willshex.blogwt.client.api.user.event.ResetPasswordEventHandler.ResetPasswordFailure)1 ResetPasswordSuccess (com.willshex.blogwt.client.api.user.event.ResetPasswordEventHandler.ResetPasswordSuccess)1 ResetPasswordRequest (com.willshex.blogwt.shared.api.user.call.ResetPasswordRequest)1 ResetPasswordResponse (com.willshex.blogwt.shared.api.user.call.ResetPasswordResponse)1