use of com.willshex.blogwt.shared.api.user.call.VerifyAccountResponse 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);
}
});
}
use of com.willshex.blogwt.shared.api.user.call.VerifyAccountResponse in project blogwt by billy1380.
the class UserService method verifyAccount.
public Request verifyAccount(VerifyAccountRequest input, AsyncSuccess<VerifyAccountRequest, VerifyAccountResponse> onSuccess, AsyncFailure<VerifyAccountRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodVerifyAccount, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
VerifyAccountResponse outputParameter = new VerifyAccountResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodVerifyAccount, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodVerifyAccount, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodVerifyAccount, input, exception);
}
});
onCallStart(UserService.this, UserMethodVerifyAccount, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodVerifyAccount, input, exception);
}
return handle;
}
Aggregations