Package io.micronaut.views.soy
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 Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final boolean
Whether to mount renaming maps.static final String
-
Constructor Summary
ConstructorDescriptionSoyViewsRendererConfigurationProperties
(ViewsConfiguration viewsConfiguration, SoyFileSetProvider fileSetProvider) Default constructor for Soy views renderer config properties. -
Method Summary
Modifier and TypeMethodDescription@Nullable com.google.template.soy.jbcsrc.api.SoySauce
@Nullable com.google.template.soy.SoyFileSet
boolean
boolean
Specifies whether renaming is enabled.void
setEnabled
(boolean enabled) Whether Soy-backed views are enabled.void
setRenamingEnabled
(boolean renaming) Turns renaming on or off.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_RENAMING
public static final boolean DEFAULT_RENAMINGWhether to mount renaming maps.- See Also:
-
-
Constructor Details
-
SoyViewsRendererConfigurationProperties
public SoyViewsRendererConfigurationProperties(ViewsConfiguration viewsConfiguration, SoyFileSetProvider fileSetProvider) Default constructor for Soy views renderer config properties.- Parameters:
viewsConfiguration
- The views configurationfileSetProvider
- Soy file set provider (template sources)
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.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 interfaceSoyViewsRendererConfiguration
- Returns:
- True if it is enabled.
-
setRenamingEnabled
public void setRenamingEnabled(boolean renaming) Turns renaming on or off. Default value `true`- Specified by:
setRenamingEnabled
in interfaceSoyViewsRendererConfiguration
- Parameters:
renaming
- Renaming status.
-
getFileSet
@Nullable public @Nullable com.google.template.soy.SoyFileSet getFileSet()- Specified by:
getFileSet
in interfaceSoyViewsRendererConfiguration
- Returns:
- The Soy file set to render from
-
getCompiledTemplates
@Nullable public @Nullable com.google.template.soy.jbcsrc.api.SoySauce getCompiledTemplates()- Specified by:
getCompiledTemplates
in interfaceSoyViewsRendererConfiguration
- Returns:
- Return a set of pre-compiled Soy templates, if supported
-