use of com.google.gwt.json.client.JSONException 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;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method getRoles.
public Request getRoles(GetRolesRequest input, AsyncSuccess<GetRolesRequest, GetRolesResponse> onSuccess, AsyncFailure<GetRolesRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodGetRoles, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetRolesResponse outputParameter = new GetRolesResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodGetRoles, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetRoles, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetRoles, input, exception);
}
});
onCallStart(UserService.this, UserMethodGetRoles, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetRoles, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method getPermissions.
public Request getPermissions(GetPermissionsRequest input, AsyncSuccess<GetPermissionsRequest, GetPermissionsResponse> onSuccess, AsyncFailure<GetPermissionsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodGetPermissions, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetPermissionsResponse outputParameter = new GetPermissionsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodGetPermissions, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetPermissions, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetPermissions, input, exception);
}
});
onCallStart(UserService.this, UserMethodGetPermissions, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetPermissions, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method changeUserDetails.
public Request changeUserDetails(ChangeUserDetailsRequest input, AsyncSuccess<ChangeUserDetailsRequest, ChangeUserDetailsResponse> onSuccess, AsyncFailure<ChangeUserDetailsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodChangeUserDetails, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ChangeUserDetailsResponse outputParameter = new ChangeUserDetailsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodChangeUserDetails, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserDetails, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserDetails, input, exception);
}
});
onCallStart(UserService.this, UserMethodChangeUserDetails, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserDetails, input, exception);
}
return handle;
}
use of com.google.gwt.json.client.JSONException in project blogwt by billy1380.
the class UserService method isAuthorised.
public Request isAuthorised(IsAuthorisedRequest input, AsyncSuccess<IsAuthorisedRequest, IsAuthorisedResponse> onSuccess, AsyncFailure<IsAuthorisedRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodIsAuthorised, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
IsAuthorisedResponse outputParameter = new IsAuthorisedResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodIsAuthorised, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodIsAuthorised, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodIsAuthorised, input, exception);
}
});
onCallStart(UserService.this, UserMethodIsAuthorised, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodIsAuthorised, input, exception);
}
return handle;
}
Aggregations