List of usage examples for org.json JSONObject put
public JSONObject put(String key, Object value) throws JSONException
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public JSONArray getVocabularyCategories(long vocabularyId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {/*from w ww .ja v a 2s . co m*/ JSONObject _params = new JSONObject(); _params.put("vocabularyId", vocabularyId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/assetcategory/get-vocabulary-categories", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public JSONArray getVocabularyCategories(long parentCategoryId, long vocabularyId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//from ww w .j a va 2 s .co m JSONObject _params = new JSONObject(); _params.put("parentCategoryId", parentCategoryId); _params.put("vocabularyId", vocabularyId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/assetcategory/get-vocabulary-categories", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public JSONArray getVocabularyCategories(long groupId, String name, long vocabularyId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//from w w w . j ava2 s. c om JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("name", checkNull(name)); _params.put("vocabularyId", vocabularyId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/assetcategory/get-vocabulary-categories", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public Integer getVocabularyCategoriesCount(long groupId, long vocabularyId) throws Exception { JSONObject _command = new JSONObject(); try {/*from w w w . j a v a 2 s . co m*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("vocabularyId", vocabularyId); _command.put("/assetcategory/get-vocabulary-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public Integer getVocabularyCategoriesCount(long groupId, String name, long vocabularyId) throws Exception { JSONObject _command = new JSONObject(); try {/*from w w w.ja v a2 s . c om*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("name", checkNull(name)); _params.put("vocabularyId", vocabularyId); _command.put("/assetcategory/get-vocabulary-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public JSONObject getVocabularyCategoriesDisplay(long vocabularyId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//from w ww .j av a2 s . c o m JSONObject _params = new JSONObject(); _params.put("vocabularyId", vocabularyId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/assetcategory/get-vocabulary-categories-display", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONObject(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public JSONObject getVocabularyCategoriesDisplay(long groupId, String name, long vocabularyId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {// w w w . j a va 2s.co m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("name", checkNull(name)); _params.put("vocabularyId", vocabularyId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/assetcategory/get-vocabulary-categories-display", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONObject(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public JSONArray getVocabularyRootCategories(long vocabularyId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {/* w ww.j a v a 2s . co m*/ JSONObject _params = new JSONObject(); _params.put("vocabularyId", vocabularyId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/assetcategory/get-vocabulary-root-categories", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public JSONArray getVocabularyRootCategories(long groupId, long vocabularyId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//from w w w . j av a 2 s . c o m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("vocabularyId", vocabularyId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/assetcategory/get-vocabulary-root-categories", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v62.assetcategory.AssetCategoryService.java
public Integer getVocabularyRootCategoriesCount(long groupId, long vocabularyId) throws Exception { JSONObject _command = new JSONObject(); try {/*w w w .j a v a 2 s. c o m*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("vocabularyId", vocabularyId); _command.put("/assetcategory/get-vocabulary-root-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }