Package org.auraframework.util.resource

Examples of org.auraframework.util.resource.ResourceLoader


    }

    protected ConfigAdapterImpl(String resourceCacheDir) {
        // can this initialization move to some sort of common initialization dealy?
        try {
            this.resourceLoader = new ResourceLoader(resourceCacheDir, true);
        } catch (MalformedURLException e) {
            throw new AuraRuntimeException(e);
        }

        // Framework JS
View Full Code Here


    }
   
    static class Helpers{
   
      String readTZInfoFromFile(String timezoneId) {
          ResourceLoader resourceLoader = Aura.getConfigAdapter().getResourceLoader();
          String suffix = timezoneId.replace("/", "-");
          String resStr = "/aura/resources/walltime-js/olson/walltime-data_" + suffix + ".js";
          InputStream in = resourceLoader.getResourceAsStream(resStr);
          try {
              return in == null ? null : formatTZInfo(IOUtil.readText(new InputStreamReader(in)));
          } catch (IOException ioE) {
              return null;
          }
View Full Code Here

     * @return contents
     * @throws IOException
     */
    protected static String getContents(String file) throws IOException {
        String out = "";
        ResourceLoader loader = Aura.getConfigAdapter().getResourceLoader();
        if (loader.getResource(file) != null) {
            InputStream in = loader.getResourceAsStream(file);
            StringWriter sw = new StringWriter();
            IOUtil.copyStream(new InputStreamReader(in), sw); // closes in
            out = sw.toString();
        }
        return out;
View Full Code Here

TOP

Related Classes of org.auraframework.util.resource.ResourceLoader

Copyright © 2018 www.massapicom. 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.