use of com.google.gwt.json.client.JSONNumber in project perun by CESNET.
the class DeleteTask method deleteTask.
/**
* Deletes Task from DB
*
* @param taskId id of Task to be deleted
*/
public void deleteTask(final int taskId) {
this.taskId = taskId;
// test arguments
if (!this.testArguments()) {
return;
}
// whole JSON query
JSONObject jsonQuery = new JSONObject();
jsonQuery.put("task", new JSONNumber(taskId));
// new events
JsonCallbackEvents newEvents = new JsonCallbackEvents() {
public void onError(PerunError error) {
session.getUiElements().setLogErrorText("Deleting of Task: " + taskId + " failed.");
events.onError(error);
}
;
public void onFinished(JavaScriptObject jso) {
session.getUiElements().setLogSuccessText("Task: " + taskId + " deleted successfully.");
events.onFinished(jso);
}
;
public void onLoadingStart() {
events.onLoadingStart();
}
;
};
// sending data
JsonPostClient jspc = new JsonPostClient(newEvents);
jspc.sendData(JSON_URL, jsonQuery);
}
use of com.google.gwt.json.client.JSONNumber in project perun by CESNET.
the class RemoveMember method prepareJSONObject.
/**
* Prepares a JSON object
*
* @return JSONObject the whole query
*/
private JSONObject prepareJSONObject() {
JSONNumber group = new JSONNumber(groupId);
JSONNumber member = new JSONNumber(memberId);
// whole JSON query
JSONObject jsonQuery = new JSONObject();
jsonQuery.put("group", group);
jsonQuery.put("member", member);
return jsonQuery;
}
use of com.google.gwt.json.client.JSONNumber in project perun by CESNET.
the class ValidateMemberAsync method prepareJSONObject.
/**
* Prepares a JSON object
*
* @return JSONObject the whole query
*/
private JSONObject prepareJSONObject() {
// create whole JSON query
JSONObject jsonQuery = new JSONObject();
jsonQuery.put("member", new JSONNumber(member.getId()));
return jsonQuery;
}
use of com.google.gwt.json.client.JSONNumber in project perun by CESNET.
the class DeleteOwner method prepareJSONObject.
/**
* Prepares a JSON object
*
* @return JSONObject the whole query
*/
private JSONObject prepareJSONObject() {
JSONObject jsonQuery = new JSONObject();
jsonQuery.put("owner", new JSONNumber(ownerId));
return jsonQuery;
}
use of com.google.gwt.json.client.JSONNumber in project perun by CESNET.
the class DeleteVo method prepareJSONObject.
/**
* Prepares a JSON object
*
* @return JSONObject the whole query
*/
private JSONObject prepareJSONObject() {
JSONObject jsonQuery = new JSONObject();
jsonQuery.put("vo", new JSONNumber(voId));
if (force) {
jsonQuery.put("force", null);
}
return jsonQuery;
}
Aggregations