/** * Inits the store from a JSON String representing the gadget administration information. * * @param store * a JSON String representing the gadget administration information. * @throws GadgetException thrown when the store cannot be initiated. */ public void init(String store) throws GadgetException { try { JSONObject json = new JSONObject(store); Iterator<?> iter = json.keys(); String container; while (iter.hasNext()) { container = (String) iter.next(); serverAdminData.addContainerAdminData(container, createContainerData(container, json.getJSONObject(container))); } } catch (JSONException e) { throw new GadgetException(GadgetException.Code.GADGET_ADMIN_STORAGE_ERROR, e); } }