Package net.sf.json

Examples of net.sf.json.JSONObject.accumulate()


            guestService.removeRole(guest.getId(), role);

            guest = guestService.getGuest(username);
            JSONArray array = getGuestRolesJsonArray(guest);
            JSONObject result = new JSONObject();
            result.accumulate("result", "OK")
                    .accumulate("message", "successfully removed role " + role)
                    .accumulate("user_roles:", array);
            return result.toString();
        } catch (Exception e) {
            StatusModel result = new StatusModel(false,
View Full Code Here


                JSONObject sharingSettingsCalendar = sharingSettingsCalendars.getJSONObject(i);
                if (sharingSettingsCalendar.getString("id").equals(calendarConfig.id))
                    continue there;
            }
            JSONObject sharingConfig = new JSONObject();
            sharingConfig.accumulate("id", calendarConfig.id);
            sharingConfig.accumulate("summary", calendarConfig.summary);
            sharingConfig.accumulate("description", calendarConfig.description);
            sharingConfig.accumulate("shared", false);
            sharingSettingsCalendars.add(sharingConfig);
        }
View Full Code Here

                if (sharingSettingsCalendar.getString("id").equals(calendarConfig.id))
                    continue there;
            }
            JSONObject sharingConfig = new JSONObject();
            sharingConfig.accumulate("id", calendarConfig.id);
            sharingConfig.accumulate("summary", calendarConfig.summary);
            sharingConfig.accumulate("description", calendarConfig.description);
            sharingConfig.accumulate("shared", false);
            sharingSettingsCalendars.add(sharingConfig);
        }
View Full Code Here

                    continue there;
            }
            JSONObject sharingConfig = new JSONObject();
            sharingConfig.accumulate("id", calendarConfig.id);
            sharingConfig.accumulate("summary", calendarConfig.summary);
            sharingConfig.accumulate("description", calendarConfig.description);
            sharingConfig.accumulate("shared", false);
            sharingSettingsCalendars.add(sharingConfig);
        }

        // and remove configs for deleted notebooks - leave others untouched
View Full Code Here

            }
            JSONObject sharingConfig = new JSONObject();
            sharingConfig.accumulate("id", calendarConfig.id);
            sharingConfig.accumulate("summary", calendarConfig.summary);
            sharingConfig.accumulate("description", calendarConfig.description);
            sharingConfig.accumulate("shared", false);
            sharingSettingsCalendars.add(sharingConfig);
        }

        // and remove configs for deleted notebooks - leave others untouched
        JSONArray settingsToDelete = new JSONArray();
View Full Code Here

                JSONObject notebookConfig = settingsNotebooks.getJSONObject(i);
                if (notebookConfig.getString("guid").equals(notebook.guid))
                    continue there;
            }
            JSONObject config = new JSONObject();
            config.accumulate("guid", notebook.guid);
            config.accumulate("name", notebook.name);
            config.accumulate("shared", false);
            settingsNotebooks.add(config);
        }
View Full Code Here

                if (notebookConfig.getString("guid").equals(notebook.guid))
                    continue there;
            }
            JSONObject config = new JSONObject();
            config.accumulate("guid", notebook.guid);
            config.accumulate("name", notebook.name);
            config.accumulate("shared", false);
            settingsNotebooks.add(config);
        }

        // and remove configs for deleted notebooks - leave others untouched
View Full Code Here

                    continue there;
            }
            JSONObject config = new JSONObject();
            config.accumulate("guid", notebook.guid);
            config.accumulate("name", notebook.name);
            config.accumulate("shared", false);
            settingsNotebooks.add(config);
        }

        // and remove configs for deleted notebooks - leave others untouched
        JSONArray settingsToDelete = new JSONArray();
View Full Code Here

        endTime = new TimeOfDayVO(endMinute, true);

        JSONArray servingsArray = new JSONArray();
        for (JawboneUpServingFacet serving : facet.getServings()) {
            JSONObject servingJSON = JSONObject.fromObject(serving.servingDetails);
            servingJSON.accumulate("deviceName", "Jawbone_UP");
            servingJSON.accumulate("channelName", "serving");
            servingJSON.accumulate("UID", serving.getId());
            servingJSON.accumulate("start", serving.start);
            if (servingJSON.has("image")&&!servingJSON.getString("image").equals(""))
                servingJSON.put("image", JawboneUpVOHelper.getImageURL(servingJSON.getString("image"), facet, settings.config));
View Full Code Here

        JSONArray servingsArray = new JSONArray();
        for (JawboneUpServingFacet serving : facet.getServings()) {
            JSONObject servingJSON = JSONObject.fromObject(serving.servingDetails);
            servingJSON.accumulate("deviceName", "Jawbone_UP");
            servingJSON.accumulate("channelName", "serving");
            servingJSON.accumulate("UID", serving.getId());
            servingJSON.accumulate("start", serving.start);
            if (servingJSON.has("image")&&!servingJSON.getString("image").equals(""))
                servingJSON.put("image", JawboneUpVOHelper.getImageURL(servingJSON.getString("image"), facet, settings.config));
            servingsArray.add(servingJSON);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.