@Test public void script_execute_and_return_byte() throws Exception { NCMBScript script = new NCMBScript("testScript.js", NCMBScript.MethodType.GET, mScriptUrl); byte[] result = null; try { result = script.execute(null, null, null); } catch (NCMBException e) { Assert.fail(e.getMessage()); } Assert.assertEquals("hello", new String(result, "UTF-8")); }
public byte[] execute(Map<String, String> header, JSONObject body, JSONObject query) throws NCMBException { NCMBScriptService scriptService = (NCMBScriptService) NCMB.factory(NCMB.ServiceType.SCRIPT); return scriptService.executeScript(mScriptName, mMethod, header, body, query, mBaseUrl); }
NCMBScript { public byte[] execute(Map<String, String> header, JSONObject body, JSONObject query) throws NCMBException { NCMBScriptService scriptService = (NCMBScriptService) NCMB.factory(NCMB.ServiceType.SCRIPT); return scriptService.executeScript(mScriptName, mMethod, header, body, query, mBaseUrl); } }
NCMBScript { public byte[] execute(Map<String, String> header, JSONObject body, JSONObject query) throws NCMBException { NCMBScriptService scriptService = (NCMBScriptService) NCMB.factory(NCMB.ServiceType.SCRIPT); return scriptService.executeScript(mScriptName, mMethod, header, body, query, mBaseUrl); } NCMBScript(String scriptName, MethodType method);  NCMBScript(String scriptName, MethodType method, String baseUrl); }
NCMBScript { public byte[] execute(Map<String, String> header, JSONObject body, JSONObject query) throws NCMBException { NCMBScriptService scriptService = (NCMBScriptService) NCMB.factory(NCMB.ServiceType.SCRIPT); return scriptService.executeScript(mScriptName, mMethod, header, body, query, mBaseUrl); } NCMBScript(String scriptName, MethodType method);  NCMBScript(String scriptName, MethodType method, String baseUrl); void setScriptName(String scriptName); String getScriptName(); void setMethod(MethodType method); MethodType getMethod(); void setBaseUrl(String baseUrl); String getBaseUrl(); byte[] execute(Map<String, String> header, JSONObject body, JSONObject query); void executeInBackground(Map<String, String> header, JSONObject body, JSONObject query, final ExecuteScriptCallback callback); }
NCMBScript { public byte[] execute(Map<String, String> header, JSONObject body, JSONObject query) throws NCMBException { NCMBScriptService scriptService = (NCMBScriptService) NCMB.factory(NCMB.ServiceType.SCRIPT); return scriptService.executeScript(mScriptName, mMethod, header, body, query, mBaseUrl); } NCMBScript(String scriptName, MethodType method);  NCMBScript(String scriptName, MethodType method, String baseUrl); void setScriptName(String scriptName); String getScriptName(); void setMethod(MethodType method); MethodType getMethod(); void setBaseUrl(String baseUrl); String getBaseUrl(); byte[] execute(Map<String, String> header, JSONObject body, JSONObject query); void executeInBackground(Map<String, String> header, JSONObject body, JSONObject query, final ExecuteScriptCallback callback);  }