Search in sources :

Example 1 with VerifyAccountSuccess

use of com.willshex.blogwt.client.api.user.event.VerifyAccountEventHandler.VerifyAccountSuccess in project blogwt by billy1380.

the class UserController method verifyAccount.

/**
 * @param actionCode
 */
public void verifyAccount(String actionCode) {
    final VerifyAccountRequest input = ApiHelper.setAccessCode(new VerifyAccountRequest());
    input.session = SessionController.get().sessionForApiCall();
    input.actionCode = actionCode;
    ApiHelper.createUserClient().verifyAccount(input, new AsyncCallback<VerifyAccountResponse>() {

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

        @Override
        public void onFailure(Throwable caught) {
            DefaultEventBus.get().fireEventFromSource(new VerifyAccountFailure(input, caught), UserController.this);
        }
    });
}
Also used : VerifyAccountResponse(com.willshex.blogwt.shared.api.user.call.VerifyAccountResponse) VerifyAccountRequest(com.willshex.blogwt.shared.api.user.call.VerifyAccountRequest) VerifyAccountSuccess(com.willshex.blogwt.client.api.user.event.VerifyAccountEventHandler.VerifyAccountSuccess) VerifyAccountFailure(com.willshex.blogwt.client.api.user.event.VerifyAccountEventHandler.VerifyAccountFailure)

Aggregations

VerifyAccountFailure (com.willshex.blogwt.client.api.user.event.VerifyAccountEventHandler.VerifyAccountFailure)1 VerifyAccountSuccess (com.willshex.blogwt.client.api.user.event.VerifyAccountEventHandler.VerifyAccountSuccess)1 VerifyAccountRequest (com.willshex.blogwt.shared.api.user.call.VerifyAccountRequest)1 VerifyAccountResponse (com.willshex.blogwt.shared.api.user.call.VerifyAccountResponse)1