Search in sources :

Example 6 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method setChunkConsole.

@Override
public void setChunkConsole(String docId, String chunkId, int commitMode, int execMode, int execScope, String options, int pixelWidth, int charWidth, ServerRequestCallback<RmdChunkOptions> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(docId));
    params.set(1, new JSONString(chunkId));
    params.set(2, new JSONNumber(commitMode));
    params.set(3, new JSONNumber(execMode));
    params.set(4, new JSONNumber(execScope));
    params.set(5, new JSONString(options));
    params.set(6, new JSONNumber(pixelWidth));
    params.set(7, new JSONNumber(charWidth));
    sendRequest(RPC_SCOPE, "set_chunk_console", params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Example 7 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method registerUserToken.

@Override
public void registerUserToken(String serverName, String accountName, int userId, RSConnectPreAuthToken token, ServerRequestCallback<Void> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(serverName));
    params.set(1, new JSONString(accountName));
    params.set(2, new JSONNumber(userId));
    params.set(3, new JSONString(token.getToken()));
    params.set(4, new JSONString(token.getPrivateKey()));
    sendRequest(RPC_SCOPE, REGISTER_USER_TOKEN, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Example 8 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method getHistoryArchiveItems.

public void getHistoryArchiveItems(// inclusive
long startIndex, // exclusive
long endIndex, ServerRequestCallback<RpcObjectList<HistoryEntry>> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONNumber(startIndex));
    params.set(1, new JSONNumber(endIndex));
    sendRequest(RPC_SCOPE, GET_HISTORY_ARCHIVE_ITEMS, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber)

Example 9 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method getEvents.

RpcRequest getEvents(int lastEventId, ServerRequestCallback<JsArray<ClientEvent>> requestCallback, RetryHandler retryHandler) {
    // satellite windows should never call getEvents directly!
    if (Satellite.isCurrentWindowSatellite()) {
        Debug.log("Satellite window shoudl not call getEvents!");
        assert false;
    }
    JSONArray params = new JSONArray();
    params.set(0, new JSONNumber(lastEventId));
    return sendRequest(EVENTS_SCOPE, "get_events", params, false, requestCallback, retryHandler);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber)

Example 10 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method previewDataImportAsync.

@Override
public void previewDataImportAsync(DataImportOptions dataImportOptions, int maxCols, int maxFactors, ServerRequestCallback<DataImportPreviewResponse> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONObject(dataImportOptions));
    params.set(1, new JSONNumber(maxCols));
    params.set(2, new JSONNumber(maxFactors));
    sendRequest(RPC_SCOPE, PREVIEW_DATA_IMPORT_ASYNC, params, requestCallback);
}
Also used : JSONObject(com.google.gwt.json.client.JSONObject) JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber)

Aggregations

JSONNumber (com.google.gwt.json.client.JSONNumber)163 JSONObject (com.google.gwt.json.client.JSONObject)109 JSONString (com.google.gwt.json.client.JSONString)72 JSONArray (com.google.gwt.json.client.JSONArray)68 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)19 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)18 JsonPostClient (cz.metacentrum.perun.webgui.json.JsonPostClient)18 PerunError (cz.metacentrum.perun.webgui.model.PerunError)17 HashMap (java.util.HashMap)4 Map (java.util.Map)4 JSONValue (com.google.gwt.json.client.JSONValue)3 ArrayList (java.util.ArrayList)3 Token (org.rstudio.core.client.Invalidation.Token)3 ServerError (org.rstudio.studio.client.server.ServerError)3 Breakpoint (org.rstudio.studio.client.common.debugging.model.Breakpoint)2 DiffResult (org.rstudio.studio.client.common.vcs.DiffResult)2 StatusAndPath (org.rstudio.studio.client.common.vcs.StatusAndPath)2 Point (org.rstudio.studio.client.workbench.views.plots.model.Point)2 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)1 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)1