Search in sources :

Example 1 with GetEmailAvatarSuccess

use of com.willshex.blogwt.client.api.user.event.GetEmailAvatarEventHandler.GetEmailAvatarSuccess in project blogwt by billy1380.

the class UserController method getEmailAvatar.

/**
 * @param email
 */
public void getEmailAvatar(String email) {
    final GetEmailAvatarRequest input = ApiHelper.setAccessCode(new GetEmailAvatarRequest());
    input.session = SessionController.get().sessionForApiCall();
    input.email = email;
    if (getEmailAvatarRequest != null) {
        getEmailAvatarRequest.cancel();
    }
    getEmailAvatarRequest = ApiHelper.createUserClient().getEmailAvatar(input, new AsyncCallback<GetEmailAvatarResponse>() {

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

        @Override
        public void onFailure(Throwable caught) {
            DefaultEventBus.get().fireEventFromSource(new GetEmailAvatarFailure(input, caught), UserController.this);
        }
    });
}
Also used : GetEmailAvatarResponse(com.willshex.blogwt.shared.api.user.call.GetEmailAvatarResponse) GetEmailAvatarRequest(com.willshex.blogwt.shared.api.user.call.GetEmailAvatarRequest) AsyncCallback(com.google.gwt.user.client.rpc.AsyncCallback) GetEmailAvatarFailure(com.willshex.blogwt.client.api.user.event.GetEmailAvatarEventHandler.GetEmailAvatarFailure) GetEmailAvatarSuccess(com.willshex.blogwt.client.api.user.event.GetEmailAvatarEventHandler.GetEmailAvatarSuccess)

Aggregations

AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)1 GetEmailAvatarFailure (com.willshex.blogwt.client.api.user.event.GetEmailAvatarEventHandler.GetEmailAvatarFailure)1 GetEmailAvatarSuccess (com.willshex.blogwt.client.api.user.event.GetEmailAvatarEventHandler.GetEmailAvatarSuccess)1 GetEmailAvatarRequest (com.willshex.blogwt.shared.api.user.call.GetEmailAvatarRequest)1 GetEmailAvatarResponse (com.willshex.blogwt.shared.api.user.call.GetEmailAvatarResponse)1