Class PebbleConfigurationProperties

java.lang.Object
io.micronaut.views.pebble.PebbleConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, PebbleConfiguration

@ConfigurationProperties("micronaut.views.pebble") public class PebbleConfigurationProperties extends Object implements PebbleConfiguration
ConfigurationProperties implementation of PebbleConfiguration.
Since:
2.2.0
Author:
Ecmel Ercan
  • Field Details

  • Constructor Details

    • PebbleConfigurationProperties

      public PebbleConfigurationProperties()
  • Method Details

    • isEnabled

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

      public void setEnabled(boolean enabled)
      Sets whether the component is enabled. Default value (true).
      Parameters:
      enabled - Whether or not component is enabled
    • getDefaultExtension

      public String getDefaultExtension()
      Specified by:
      getDefaultExtension in interface PebbleConfiguration
      Returns:
      Gets defaultExtension property
    • setDefaultExtension

      public void setDefaultExtension(String defaultExtension)
      The default extension. Default value ("html").
      Parameters:
      defaultExtension - The extension
    • isCacheActive

      public boolean isCacheActive()
      Specified by:
      isCacheActive in interface PebbleConfiguration
      Returns:
      Gets cacheActive property
    • setCacheActive

      public void setCacheActive(boolean cacheActive)
      Enable/disable all caches, i.e. cache used by the engine to store compiled PebbleTemplate instances and tags cache. Default value (true).
      Parameters:
      cacheActive - toggle to enable/disable all caches
    • isNewLineTrimming

      public boolean isNewLineTrimming()
      Specified by:
      isNewLineTrimming in interface PebbleConfiguration
      Returns:
      Gets newLineTrimming property
    • setNewLineTrimming

      public void setNewLineTrimming(boolean newLineTrimming)
      Changes the newLineTrimming setting of the PebbleEngine. By default, Pebble will trim a new line that immediately follows a Pebble tag. If set to false, then the first newline following a Pebble tag won't be trimmed. All newlines will be preserved. Default value (true).
      Parameters:
      newLineTrimming - Whether or not the newline should be trimmed.
    • isAutoEscaping

      public boolean isAutoEscaping()
      Specified by:
      isAutoEscaping in interface PebbleConfiguration
      Returns:
      Gets autoEscaping property
    • setAutoEscaping

      public void setAutoEscaping(boolean autoEscaping)
      Sets whether or not escaping should be performed automatically. Default value (true).
      Parameters:
      autoEscaping - The auto escaping setting
    • getDefaultEscapingStrategy

      public String getDefaultEscapingStrategy()
      Specified by:
      getDefaultEscapingStrategy in interface PebbleConfiguration
      Returns:
      Gets defaultEscapingStrategy property
    • setDefaultEscapingStrategy

      public void setDefaultEscapingStrategy(String defaultEscapingStrategy)
      Sets the default escaping strategy of the built-in escaper extension. Default value ("html").
      Parameters:
      defaultEscapingStrategy - The name of the default escaping strategy
    • isStrictVariables

      public boolean isStrictVariables()
      Specified by:
      isStrictVariables in interface PebbleConfiguration
      Returns:
      Gets strictVariables property
    • setStrictVariables

      public void setStrictVariables(boolean strictVariables)
      Changes the strictVariables setting of the PebbleEngine. Default value (false).
      Parameters:
      strictVariables - Whether or not strict variables is used
    • isGreedyMatchMethod

      public boolean isGreedyMatchMethod()
      Specified by:
      isGreedyMatchMethod in interface PebbleConfiguration
      Returns:
      Gets greedyMatchMethod property
    • setGreedyMatchMethod

      public void setGreedyMatchMethod(boolean greedyMatchMethod)
      Enable/disable greedy matching mode for finding java method. Default is disabled. If enabled, when can not find perfect method (method name, parameter length and parameter type are all satisfied), reduce the limit of the parameter type, try to find other method which has compatible parameter types. Default value (false).
      Parameters:
      greedyMatchMethod - toggle to enable/disable greedy match method
      See Also:
      • TypeUtils.compatibleCast(Object, Class)
    • isAllowOverrideCoreOperators

      public boolean isAllowOverrideCoreOperators()
      Specified by:
      isAllowOverrideCoreOperators in interface PebbleConfiguration
      Returns:
      Gets isAllowOverrideCoreOperators property
    • setAllowOverrideCoreOperators

      public void setAllowOverrideCoreOperators(boolean allowOverrideCoreOperators)
      Sets whether or not core operators overrides should be allowed. Default value (false).
      Parameters:
      allowOverrideCoreOperators - Whether or not core operators overrides should be allowed.
    • isLiteralDecimalsAsIntegers

      public boolean isLiteralDecimalsAsIntegers()
      Specified by:
      isLiteralDecimalsAsIntegers in interface PebbleConfiguration
      Returns:
      Gets literalDecimalsAsInteger property
    • setLiteralDecimalsAsIntegers

      public void setLiteralDecimalsAsIntegers(boolean literalDecimalsAsIntegers)
      Enable/disable treat literal decimal as Integer. Default value (false), treated as Long.
      Parameters:
      literalDecimalsAsIntegers - toggle to enable/disable literal decimal treated as integer
    • isLiteralNumbersAsBigDecimals

      public boolean isLiteralNumbersAsBigDecimals()
      Specified by:
      isLiteralNumbersAsBigDecimals in interface PebbleConfiguration
      Returns:
      Gets literalNumbersAsBigDecimals property
    • setLiteralNumbersAsBigDecimals

      public void setLiteralNumbersAsBigDecimals(boolean literalNumbersAsBigDecimals)
      Enable/disable treat literal numbers as BigDecimals. Default value (false), treated as Long/Double.
      Parameters:
      literalNumbersAsBigDecimals - toggle to enable/disable literal numbers treated as BigDecimals