use of com.google.gwt.http.client.Response 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.http.client.Response 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.http.client.Response 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;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class BlogService method submitRating.
public Request submitRating(SubmitRatingRequest input, AsyncSuccess<SubmitRatingRequest, SubmitRatingResponse> onSuccess, AsyncFailure<SubmitRatingRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(BlogMethodSubmitRating, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
SubmitRatingResponse outputParameter = new SubmitRatingResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(BlogService.this, BlogMethodSubmitRating, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodSubmitRating, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodSubmitRating, input, exception);
}
});
onCallStart(BlogService.this, BlogMethodSubmitRating, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodSubmitRating, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class BlogService method getResources.
public Request getResources(GetResourcesRequest input, AsyncSuccess<GetResourcesRequest, GetResourcesResponse> onSuccess, AsyncFailure<GetResourcesRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(BlogMethodGetResources, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetResourcesResponse outputParameter = new GetResourcesResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(BlogService.this, BlogMethodGetResources, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetResources, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetResources, input, exception);
}
});
onCallStart(BlogService.this, BlogMethodGetResources, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetResources, input, exception);
}
return handle;
}
Aggregations