/** * Creates container security information from a JSON object. * * @param container * the container the security information is for. * @param containerJson * the JSON object representing the information. * @return container admin data * @throws JSONException * thrown when we cannot get the information from the JSON object */ private ContainerAdminData createContainerData(String container, JSONObject containerJson) throws JSONException, GadgetException { ContainerAdminData containerData = new ContainerAdminData(); if (containerJson.has(GADGETS)) { containerData = new ContainerAdminData( createGadgetAdminDataMap(containerJson.getJSONObject(GADGETS))); } return containerData; }