All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.pebble.SpincastPebbleTemplatingEngine.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






SpincastPebbleTemplatingEngine (org.spincast:spincast-framework 1.13.0 API)












org.spincast.plugins.pebble

Class SpincastPebbleTemplatingEngine

    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • PEBBLE_PARAMS_AS_JSONOBJECT

        public static final String PEBBLE_PARAMS_AS_JSONOBJECT
    • Method Detail

      • getExtensions

        protected Set<com.mitchellbosecke.pebble.extension.Extension> getExtensions()
      • getJsonManager

        protected JsonManager getJsonManager()
      • getPebbleEngineString

        protected com.mitchellbosecke.pebble.PebbleEngine getPebbleEngineString()
      • getPebbleEngineTemplateClasspath

        protected com.mitchellbosecke.pebble.PebbleEngine getPebbleEngineTemplateClasspath()
      • getPebbleEngineTemplateFileSystem

        protected com.mitchellbosecke.pebble.PebbleEngine getPebbleEngineTemplateFileSystem()
      • addCommonLoaderFeatures

        protected void addCommonLoaderFeatures(com.mitchellbosecke.pebble.PebbleEngine.Builder builder)
      • getClasspathTemplateLoader

        protected com.mitchellbosecke.pebble.loader.Loader<String> getClasspathTemplateLoader()
      • getFileSystemTemplateLoader

        protected com.mitchellbosecke.pebble.loader.Loader<String> getFileSystemTemplateLoader()
      • fromTemplate

        public String fromTemplate(String templatePath,
                                   JsonObject jsonObject)
        Description copied from interface: TemplatingEngine
        Evaluates a template using the parameters specified as a JsonObject. Uses the default Locale.
        Specified by:
        fromTemplate in interface TemplatingEngine
        Parameters:
        templatePath - must be a classpath's relative path.
      • fromTemplate

        public String fromTemplate(String templatePath,
                                   JsonObject jsonObject,
                                   Locale locale)
        Description copied from interface: TemplatingEngine
        Evaluates a template using the parameters specified as a JsonObject. Uses the specified Locale.
        Specified by:
        fromTemplate in interface TemplatingEngine
        Parameters:
        templatePath - must be a classpath's relative path.
      • fromTemplate

        public String fromTemplate(String templatePath,
                                   boolean isClasspathPath,
                                   JsonObject jsonObject)
        Description copied from interface: TemplatingEngine
        Evaluates a template using the parameters specified as a JsonObject. Uses the default Locale.
        Specified by:
        fromTemplate in interface TemplatingEngine
        isClasspathPath - if true, the 'templatePath' is considered as a classpath's relative path. If false, it is considered as an absolute file system path.
      • fromTemplate

        public String fromTemplate(String templatePath,
                                   boolean isClasspathPath,
                                   JsonObject jsonObject,
                                   Locale locale)
        Description copied from interface: TemplatingEngine
        Evaluates a template using the parameters specified as a JsonObject. Uses the specified Locale.
        Specified by:
        fromTemplate in interface TemplatingEngine
        isClasspathPath - if true, the 'templatePath' is considered as a classpath's relative path. If false, it is considered as an absolute file system path.
      • fromTemplate

        public String fromTemplate(String templatePath,
                                   boolean isClasspathPath,
                                   Map<String,Object> params)
        Description copied from interface: TemplatingEngine
        Evaluates a template using the given parameters. Uses the default Locale.
        Specified by:
        fromTemplate in interface TemplatingEngine
        isClasspathPath - if true, the 'templatePath' is considered as a classpath's relative path. If false, it is considered as an absolute file system path.
      • fromTemplate

        public String fromTemplate(String templatePath,
                                   boolean isClasspathPath,
                                   Map<String,Object> params,
                                   Locale locale)
        Description copied from interface: TemplatingEngine
        Evaluates a template using the given parameters. Uses the specified Locale.
        Specified by:
        fromTemplate in interface TemplatingEngine
        isClasspathPath - if true, the 'templatePath' is considered as a classpath's relative path. If false, it is considered as an absolute file system path.
      • createPlaceholder

        public String createPlaceholder(String variable)
        Description copied from interface: TemplatingEngine
        Creates a placeholder using the current templating engine implementation.

        This is mainly useful for the tests, which don't know in advance which templating engine will be used, so which syntax to use for the placeholders.

        For example, using Pebble, a call to createPlaceholder("name") will result in "{{name}}" (without the quotes).

        Specified by:
        createPlaceholder in interface TemplatingEngine

Copyright © 2019. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy