use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method checkUsername.
public Request checkUsername(CheckUsernameRequest input, AsyncSuccess<CheckUsernameRequest, CheckUsernameResponse> onSuccess, AsyncFailure<CheckUsernameRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodCheckUsername, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
CheckUsernameResponse outputParameter = new CheckUsernameResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodCheckUsername, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodCheckUsername, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodCheckUsername, input, exception);
}
});
onCallStart(UserService.this, UserMethodCheckUsername, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodCheckUsername, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method followUsers.
public Request followUsers(FollowUsersRequest input, AsyncSuccess<FollowUsersRequest, FollowUsersResponse> onSuccess, AsyncFailure<FollowUsersRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodFollowUsers, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
FollowUsersResponse outputParameter = new FollowUsersResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodFollowUsers, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
});
onCallStart(UserService.this, UserMethodFollowUsers, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method changeUserAccess.
public Request changeUserAccess(ChangeUserAccessRequest input, AsyncSuccess<ChangeUserAccessRequest, ChangeUserAccessResponse> onSuccess, AsyncFailure<ChangeUserAccessRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodChangeUserAccess, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ChangeUserAccessResponse outputParameter = new ChangeUserAccessResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodChangeUserAccess, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserAccess, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserAccess, input, exception);
}
});
onCallStart(UserService.this, UserMethodChangeUserAccess, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserAccess, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method getUserDetails.
public Request getUserDetails(GetUserDetailsRequest input, AsyncSuccess<GetUserDetailsRequest, GetUserDetailsResponse> onSuccess, AsyncFailure<GetUserDetailsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodGetUserDetails, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetUserDetailsResponse outputParameter = new GetUserDetailsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodGetUserDetails, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetUserDetails, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetUserDetails, input, exception);
}
});
onCallStart(UserService.this, UserMethodGetUserDetails, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetUserDetails, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method resetPassword.
public Request resetPassword(ResetPasswordRequest input, AsyncSuccess<ResetPasswordRequest, ResetPasswordResponse> onSuccess, AsyncFailure<ResetPasswordRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodResetPassword, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ResetPasswordResponse outputParameter = new ResetPasswordResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodResetPassword, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
});
onCallStart(UserService.this, UserMethodResetPassword, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
return handle;
}
Aggregations