protected String getResourceContent(String resource) { try { return ResourceLoader.getContent(resource); } catch (IOException e) { return null; } }
protected String getFileContent(File file) { try { return ResourceLoader.getContent(file); } catch (IOException e) { // This is fine; errors happen downstream. return null; } }
protected String getResourceContent(String resource) { try { return ResourceLoader.getContent(resource); } catch (IOException e) { return null; } }
public String getResourceContent(String resource) throws IOException { return ResourceLoader.getContent(resource); } }
protected String getFileContent(File file) { try { return ResourceLoader.getContent(file); } catch (IOException e) { // This is fine; errors happen downstream. return null; } }
protected String attemptToLoadResourceFullyQualified(String resource) throws IOException { return ResourceLoader.getContent(resource); } }
private static String getJSONString(final String location) throws IOException { return ResourceLoader.getContent(location); } }
protected String attemptToLoadResourceFullyQualified(String resource) throws IOException { return ResourceLoader.getContent(resource); } }
public String getContent() throws IOException { return ResourceLoader.getContent(wrappedFile); }
protected String attemptToLoadResourceFullyQualified(String resource) throws IOException { return ResourceLoader.getContent(resource); } }
String getResourceContent(String resource) throws IOException { return ResourceLoader.getContent(resource); }
String getResourceContent(String resource) throws IOException { return ResourceLoader.getContent(resource); }
private void loadStore() { try { String gadgetAdminString = ResourceLoader.getContent(GADGET_ADMIN_CONFIG); this.store.init(gadgetAdminString); } catch (Throwable t) { if (LOG.isLoggable(Level.WARNING)) { LOG.logp(Level.WARNING, classname, "loadStore", MessageKeys.FAILED_TO_INIT, new Object[] { GADGET_ADMIN_CONFIG }); LOG.log(Level.WARNING, "", t); } } }
private void loadConsumers() { try { String oauthConfigString = ResourceLoader.getContent(OAUTH_CONFIG); store.initFromConfigString(oauthConfigString); } catch (Throwable t) { if (LOG.isLoggable(Level.WARNING)) { LOG.logp(Level.WARNING, classname, "loadConsumers", MessageKeys.FAILED_TO_INIT, new Object[] {OAUTH_CONFIG}); LOG.log(Level.WARNING, "", t); } } }
private void loadConsumers() { try { String oauthConfigString = ResourceLoader.getContent(OAUTH_CONFIG); store.initFromConfigString(oauthConfigString); } catch (Throwable t) { LOG.log(Level.WARNING, "Failed to initialize OAuth consumers from " + OAUTH_CONFIG, t); } }
private void loadConsumers() { try { String oauthConfigString = ResourceLoader.getContent(OAUTH_CONFIG); store.initFromConfigString(oauthConfigString); } catch (Throwable t) { LOG.log(Level.WARNING, "Failed to initialize OAuth consumers from " + OAUTH_CONFIG, t); } }
/** * Loads resources recursively. * @param files The base paths to look for container.xml * @throws ContainerConfigException */ private void loadResources(String[] files, JSONObject all) throws ContainerConfigException { try { for (String entry : files) { LOG.info("Reading container config: " + entry); String content = ResourceLoader.getContent(entry); if (content == null || content.length() == 0) throw new IOException("The file " + entry + "is empty"); loadFromString(content, all); } } catch (IOException e) { throw new ContainerConfigException(e); } }
static private TemplateLibrary loadTrustedLibrary(String resource) { try { String content = ResourceLoader.getContent(resource); return new XmlTemplateLibrary(Uri.parse("#OSML"), XmlUtil.parse(content), content, true); } catch (IOException ioe) { LOG.log(Level.WARNING, null, ioe); } catch (XmlException xe) { LOG.log(Level.WARNING, null, xe); } catch (GadgetException tpe) { LOG.log(Level.WARNING, null, tpe); } return NullTemplateLibrary.INSTANCE; } }
static private TemplateLibrary loadTrustedLibrary(String resource) { try { String content = ResourceLoader.getContent(resource); return new XmlTemplateLibrary(Uri.parse("#OSML"), XmlUtil.parse(content), content, true); } catch (IOException ioe) { LOG.log(Level.WARNING, null, ioe); } catch (XmlException xe) { LOG.log(Level.WARNING, null, xe); } catch (GadgetException tpe) { LOG.log(Level.WARNING, null, tpe); } return NullTemplateLibrary.INSTANCE; } }
static private TemplateLibrary loadTrustedLibrary(String resource) { try { String content = ResourceLoader.getContent(resource); return new XmlTemplateLibrary(Uri.parse("#OSML"), XmlUtil.parse(content), content, true); } catch (IOException ioe) { LOG.log(Level.WARNING, null, ioe); } catch (XmlException xe) { LOG.log(Level.WARNING, null, xe); } catch (GadgetException tpe) { LOG.log(Level.WARNING, null, tpe); } return NullTemplateLibrary.INSTANCE; } }