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 0.9.25 API)












org.spincast.plugins.pebble

Class SpincastPebbleTemplatingEngine

    • Method Detail

      • 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,
                                   IJsonObject jsonObject)
        Description copied from interface: ITemplatingEngine
        Evaluates a template using the parameters specified as a IJsonObject. Uses the default Locale.
        Specified by:
        fromTemplate in interface ITemplatingEngine
        Parameters:
        templatePath - must be a classpath's relative path.
      • fromTemplate

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

        public String fromTemplate(String templatePath,
                                   boolean isClasspathPath,
                                   Map<String,Object> params)
        Description copied from interface: ITemplatingEngine
        Evaluates a template using the given parameters. Uses the default Locale.
        Specified by:
        fromTemplate in interface ITemplatingEngine
        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: ITemplatingEngine
        Evaluates a template using the given parameters. Uses the specified Locale.
        Specified by:
        fromTemplate in interface ITemplatingEngine
        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,
                                   IJsonObject jsonObject)
        Description copied from interface: ITemplatingEngine
        Evaluates a template using the parameters specified as a IJsonObject. Uses the default Locale.
        Specified by:
        fromTemplate in interface ITemplatingEngine
        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,
                                   IJsonObject jsonObject,
                                   Locale locale)
        Description copied from interface: ITemplatingEngine
        Evaluates a template using the parameters specified as a IJsonObject. Uses the specified Locale.
        Specified by:
        fromTemplate in interface ITemplatingEngine
        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: ITemplatingEngine
        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 ITemplatingEngine

Copyright © 2016. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy