public void initFromConfigString(String oauthConfigStr) throws GadgetException { try { JSONObject oauthConfigs = new JSONObject(oauthConfigStr); for (Iterator<?> i = oauthConfigs.keys(); i.hasNext();) { String url = (String) i.next(); URI gadgetUri = new URI(url); JSONObject oauthConfig = oauthConfigs.getJSONObject(url); storeConsumerInfos(gadgetUri, oauthConfig); } } catch (JSONException e) { throw new GadgetException(GadgetException.Code.OAUTH_STORAGE_ERROR, e); } catch (URISyntaxException e) { throw new GadgetException(GadgetException.Code.OAUTH_STORAGE_ERROR, e); } }
public void initFromConfigString(String oauthConfigStr) throws GadgetException { try { JSONObject oauthConfigs = new JSONObject(oauthConfigStr); for (Iterator<?> i = oauthConfigs.keys(); i.hasNext();) { String url = (String) i.next(); URI gadgetUri = new URI(url); JSONObject oauthConfig = oauthConfigs.getJSONObject(url); storeConsumerInfos(gadgetUri, oauthConfig); } } catch (JSONException e) { throw new GadgetException(GadgetException.Code.OAUTH_STORAGE_ERROR, e); } catch (URISyntaxException e) { throw new GadgetException(GadgetException.Code.OAUTH_STORAGE_ERROR, e); } }
public void initFromConfigString(String oauthConfigStr) throws GadgetException { try { JSONObject oauthConfigs = new JSONObject(oauthConfigStr); for (Iterator<?> i = oauthConfigs.keys(); i.hasNext();) { String url = (String) i.next(); URI gadgetUri = new URI(url); JSONObject oauthConfig = oauthConfigs.getJSONObject(url); storeConsumerInfos(gadgetUri, oauthConfig); } } catch (JSONException e) { throw new GadgetException(GadgetException.Code.OAUTH_STORAGE_ERROR, e); } catch (URISyntaxException e) { throw new GadgetException(GadgetException.Code.OAUTH_STORAGE_ERROR, e); } }