Class SoyViewsRendererConfigurationProperties

java.lang.Object
io.micronaut.views.soy.SoyViewsRendererConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, SoyViewsRendererConfiguration

@ConfigurationProperties("micronaut.views.soy") public class SoyViewsRendererConfigurationProperties extends Object implements SoyViewsRendererConfiguration
ConfigurationProperties implementation for soy views renderer. Configured properties support a SoyFileSet, which is rendered via a from-source renderer. Template sources are provided via DI, using a SoyFileSetProvider.
Since:
1.2.1
Author:
Sam Gammon (sam@bloombox.io)
  • Field Details

  • Constructor Details

    • SoyViewsRendererConfigurationProperties

      public SoyViewsRendererConfigurationProperties(ViewsConfiguration viewsConfiguration, SoyFileSetProvider fileSetProvider)
      Default constructor for Soy views renderer config properties.
      Parameters:
      viewsConfiguration - The views configuration
      fileSetProvider - Soy file set provider (template sources)
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      Whether Soy-backed views are enabled. Default value `true`
      Parameters:
      enabled - True if they are.
    • isRenamingEnabled

      public boolean isRenamingEnabled()
      Specifies whether renaming is enabled. Defaults to `true`.
      Specified by:
      isRenamingEnabled in interface SoyViewsRendererConfiguration
      Returns:
      True if it is enabled.
    • setRenamingEnabled

      public void setRenamingEnabled(boolean renaming)
      Turns renaming on or off. Default value `true`
      Specified by:
      setRenamingEnabled in interface SoyViewsRendererConfiguration
      Parameters:
      renaming - Renaming status.
    • getFileSet

      @Nullable public @Nullable com.google.template.soy.SoyFileSet getFileSet()
      Specified by:
      getFileSet in interface SoyViewsRendererConfiguration
      Returns:
      The Soy file set to render from
    • getCompiledTemplates

      @Nullable public @Nullable com.google.template.soy.jbcsrc.api.SoySauce getCompiledTemplates()
      Specified by:
      getCompiledTemplates in interface SoyViewsRendererConfiguration
      Returns:
      Return a set of pre-compiled Soy templates, if supported