Package freemarker.cache

Examples of freemarker.cache.URLTemplateLoader


    }

    public synchronized Configuration getConfiguration() {
        if (configuration == null) {
            configuration = new Configuration();
            configuration.setTemplateLoader(new URLTemplateLoader() {
                @Override
                protected URL getURL(String name) {
                    return getResourceLoader().getClassLoader().getResource(name);
                }
            });
View Full Code Here


    }

    public synchronized Configuration getConfiguration() {
        if (configuration == null) {
            configuration = new Configuration();
            configuration.setTemplateLoader(new URLTemplateLoader() {
                @Override
                protected URL getURL(String name) {
                    return getResourceLoader().getClassLoader().getResource(name);
                }
            });
View Full Code Here

    }

    public synchronized Configuration getConfiguration() {
        if (configuration == null) {
            configuration = new Configuration();
            configuration.setTemplateLoader(new URLTemplateLoader() {
                @Override
                protected URL getURL(String name) {
                    return getResourceLoader().getClassLoader().getResource(name);
                }
            });
View Full Code Here

    }

    public synchronized Configuration getConfiguration() {
        if (configuration == null) {
            configuration = new Configuration();
            configuration.setTemplateLoader(new URLTemplateLoader() {
                @Override
                protected URL getURL(String name) {
                    try {
                        return ResourceHelper.resolveMandatoryResourceAsUrl(getCamelContext().getClassResolver(), name);
                    } catch (Exception e) {
View Full Code Here

    }

    public synchronized Configuration getConfiguration() {
        if (configuration == null) {
            configuration = new Configuration();
            configuration.setTemplateLoader(new URLTemplateLoader() {
                @Override
                protected URL getURL(String name) {
                    try {
                        return ResourceHelper.resolveMandatoryResourceAsUrl(getCamelContext().getClassResolver(), name);
                    } catch (Exception e) {
View Full Code Here

    }

    public synchronized Configuration getConfiguration() {
        if (configuration == null) {
            configuration = new Configuration();
            configuration.setTemplateLoader(new URLTemplateLoader() {
                @Override
                protected URL getURL(String name) {
                    return getResourceLoader().getClassLoader().getResource(name);
                }
            });
View Full Code Here

   * Get the template loader for the freemarker configuration.
   *
   * @return the template loader for the freemarker configuration.
   */
  protected URLTemplateLoader getTemplateLoader() {
    return new URLTemplateLoader() {
      protected URL getURL(String name) {
        try {
          return new URL(name);
        }
        catch (MalformedURLException e) {
View Full Code Here

                    }
                }
            });

            // set template loader
            configuration.setTemplateLoader(new URLTemplateLoader() {

                @Override
                protected URL getURL(String string) {
                    URL url = getPluginResourceURL(pluginName, templatePath);
                    return url;
View Full Code Here

  public ApiJarBuilder() {
    fmConfiguration = new Configuration();
    // fmConfiguration.setCacheStorage(new NoCacheStorage());
    fmConfiguration.setLocalizedLookup(false);
    fmConfiguration.setTemplateLoader(new URLTemplateLoader() {
      @Override
      protected URL getURL(String name) {
        return ApiJarBuilder.class.getClassLoader().getResource(name);
      }
    });
View Full Code Here

            //final MustacheFactory factory = new DefaultMustacheFactory();
            //final Mustache mustache = factory.compile("templates/template.mustache");

            final Configuration config = new Configuration();

            config.setTemplateLoader(new URLTemplateLoader() {
                @Override
                protected URL getURL(String name) {
                    return Resources.getResource(name);
                }
            });
View Full Code Here

TOP

Related Classes of freemarker.cache.URLTemplateLoader

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.