use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method registerUser.
public Request registerUser(RegisterUserRequest input, AsyncSuccess<RegisterUserRequest, RegisterUserResponse> onSuccess, AsyncFailure<RegisterUserRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodRegisterUser, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
RegisterUserResponse outputParameter = new RegisterUserResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodRegisterUser, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodRegisterUser, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodRegisterUser, input, exception);
}
});
onCallStart(UserService.this, UserMethodRegisterUser, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodRegisterUser, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method forgotPassword.
public Request forgotPassword(ForgotPasswordRequest input, AsyncSuccess<ForgotPasswordRequest, ForgotPasswordResponse> onSuccess, AsyncFailure<ForgotPasswordRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodForgotPassword, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ForgotPasswordResponse outputParameter = new ForgotPasswordResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodForgotPassword, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodForgotPassword, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodForgotPassword, input, exception);
}
});
onCallStart(UserService.this, UserMethodForgotPassword, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodForgotPassword, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method getRolesAndPermissions.
public Request getRolesAndPermissions(GetRolesAndPermissionsRequest input, AsyncSuccess<GetRolesAndPermissionsRequest, GetRolesAndPermissionsResponse> onSuccess, AsyncFailure<GetRolesAndPermissionsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodGetRolesAndPermissions, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetRolesAndPermissionsResponse outputParameter = new GetRolesAndPermissionsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodGetRolesAndPermissions, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetRolesAndPermissions, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetRolesAndPermissions, input, exception);
}
});
onCallStart(UserService.this, UserMethodGetRolesAndPermissions, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetRolesAndPermissions, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class BlogService method deleteResource.
public Request deleteResource(DeleteResourceRequest input, AsyncSuccess<DeleteResourceRequest, DeleteResourceResponse> onSuccess, AsyncFailure<DeleteResourceRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(BlogMethodDeleteResource, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
DeleteResourceResponse outputParameter = new DeleteResourceResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(BlogService.this, BlogMethodDeleteResource, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodDeleteResource, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodDeleteResource, input, exception);
}
});
onCallStart(BlogService.this, BlogMethodDeleteResource, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodDeleteResource, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class BlogService method updateResource.
public Request updateResource(UpdateResourceRequest input, AsyncSuccess<UpdateResourceRequest, UpdateResourceResponse> onSuccess, AsyncFailure<UpdateResourceRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(BlogMethodUpdateResource, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
UpdateResourceResponse outputParameter = new UpdateResourceResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(BlogService.this, BlogMethodUpdateResource, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodUpdateResource, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodUpdateResource, input, exception);
}
});
onCallStart(BlogService.this, BlogMethodUpdateResource, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodUpdateResource, input, exception);
}
return handle;
}
Aggregations