Search in sources :

Example 16 with JSONArray

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

the class RemoteServer method generateAppName.

@Override
public void generateAppName(String title, String appPath, String accountName, ServerRequestCallback<RSConnectAppName> resultCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(title));
    params.set(1, new JSONString(StringUtil.isNullOrEmpty(appPath) ? "" : appPath));
    params.set(2, new JSONString(accountName));
    sendRequest(RPC_SCOPE, "generate_app_name", params, resultCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Example 17 with JSONArray

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

the class RemoteServer method setProjectSharedUsers.

@Override
public void setProjectSharedUsers(JsArrayString users, ServerRequestCallback<SharingResult> callback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONArray(users));
    sendRequest(RPC_SCOPE, "set_shared_users", params, callback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray)

Example 18 with JSONArray

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

the class RemoteServer method getOutputPreview.

public void getOutputPreview(String dataFilePath, String encoding, boolean heading, String separator, String decimal, String quote, String comment, ServerRequestCallback<DataPreviewResult> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(dataFilePath));
    params.set(1, new JSONString(encoding));
    params.set(2, JSONBoolean.getInstance(heading));
    params.set(3, new JSONString(separator));
    params.set(4, new JSONString(decimal));
    params.set(5, new JSONString(quote));
    params.set(6, new JSONString(comment));
    sendRequest(RPC_SCOPE, GET_OUTPUT_PREVIEW, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Example 19 with JSONArray

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

the class RemoteServer method replayNotebookChunkPlots.

@Override
public void replayNotebookChunkPlots(String docId, String chunkId, int pixelWidth, int pixelHeight, ServerRequestCallback<String> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(docId));
    params.set(1, new JSONString(chunkId));
    params.set(2, new JSONNumber(pixelWidth));
    params.set(3, new JSONNumber(pixelHeight));
    sendRequest(RPC_SCOPE, "replay_notebook_chunk_plots", 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 20 with JSONArray

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

the class RemoteServer method connectionPreviewTable.

@Override
public void connectionPreviewTable(ConnectionId connectionId, String table, ServerRequestCallback<Void> callback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONObject(connectionId));
    params.set(1, new JSONString(table));
    sendRequest(RPC_SCOPE, CONNECTION_PREVIEW_TABLE, params, callback);
}
Also used : JSONObject(com.google.gwt.json.client.JSONObject) JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Aggregations

JSONArray (com.google.gwt.json.client.JSONArray)260 JSONString (com.google.gwt.json.client.JSONString)182 JSONNumber (com.google.gwt.json.client.JSONNumber)68 JSONObject (com.google.gwt.json.client.JSONObject)62 JSONValue (com.google.gwt.json.client.JSONValue)10 Breakpoint (org.rstudio.studio.client.common.debugging.model.Breakpoint)8 Point (org.rstudio.studio.client.workbench.views.plots.model.Point)8 ArrayList (java.util.ArrayList)6 HashMap (java.util.HashMap)6 Date (java.util.Date)5 Map (java.util.Map)5 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)2 JsArrayString (com.google.gwt.core.client.JsArrayString)2 JSONBoolean (com.google.gwt.json.client.JSONBoolean)2 GwtTestTest (com.googlecode.gwt.test.GwtTestTest)2 ContactOrganisation (com.googlecode.gwtphonegap.client.contacts.ContactOrganisation)2 Test (org.junit.Test)2 EntryPoint (com.google.gwt.core.client.EntryPoint)1 Style (com.google.gwt.dom.client.Style)1 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)1