Untitled
unknown
plain_text
a year ago
1.5 kB
6
Indexable
private JSONObject getAccountsForDomainWithoutDPP() throws JSONException { JSONObject response = new JSONObject(); JSONObject data = new JSONObject(); JSONObject responseInfo = new JSONObject(); if (userAccountManager.getUserBean().getIsLoggedIn()) { if (isLargeUser(userAccountManager.getUserBean().getUser())) { data.put("isLargeUser", true); } else { data.put("isLargeUser", false); data.put("accounts", getAccountsDetails()); } responseInfo.put("error", "null"); responseInfo.put("status", "Success"); } else { responseInfo.put("error", "User not logged in"); responseInfo.put("status", "Failed"); } response.put("data",data); response.put("responseInfo", responseInfo); return response; } private JSONArray getAccountsDetails() throws JSONException { JSONArray accounts = new JSONArray(); //List<Integer> accountlds = accountApiService.getSfUserBeanViewer().getAccountsForDomainWithoutPriReg(); List<String> accountlds = accountApiService.getSfUserBeanViewer().getAccountsForDomainWithoutPR(); for (String accountld : accountlds) { JSONObject account = new JSONObject(); account.put("accountld", accountld); accounts.put(account); } return accounts; }
Editor is loading...