Top Description Methods
org.springframework.web.reactive.result.view.script

public Interface ScriptTemplateConfig

Known Direct Implementers
org.springframework.web.reactive.result.view.script.ScriptTemplateConfigurer
Imports
java.nio.charset.Charset, java.util.function.Supplier, javax.script.Bindings, .ScriptEngine, org.springframework.lang.Nullable

Interface to be implemented by objects that configure and manage a JSR-223 ScriptEngine for automatic lookup in a web environment. Detected and used by ScriptTemplateView.
Author
Sebastien Deleuze
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public Charset
getCharset()

Return the charset used to read script and template files.

public ScriptEngine
getEngine()

Return the ScriptEngine to use by the views.

public String
getEngineName()

Return the engine name that will be used to instantiate the ScriptEngine.

public Supplier<ScriptEngine>
getEngineSupplier()

Return the engine supplier that will be used to instantiate the ScriptEngine.

public String
getRenderFunction()

Return the render function name (optional).

public String
getRenderObject()

Return the object where the render function belongs (optional).

public String
getResourceLoaderPath()

Return the resource loader path(s) via a Spring resource location.

public String[]
getScripts()

Return the scripts to be loaded by the script engine (library or user provided).

public Boolean
isSharedEngine()

Return whether to use a shared engine for all threads or whether to create thread-local engine instances for each thread.

Method Detail

getCharsetback to summary
public Charset getCharset()

Return the charset used to read script and template files.

Annotations
@Nullable
getEngineback to summary
public ScriptEngine getEngine()

Return the ScriptEngine to use by the views.

Annotations
@Nullable
getEngineNameback to summary
public String getEngineName()

Return the engine name that will be used to instantiate the ScriptEngine.

Annotations
@Nullable
getEngineSupplierback to summary
public Supplier<ScriptEngine> getEngineSupplier()

Return the engine supplier that will be used to instantiate the ScriptEngine.

Annotations
@Nullable
Since
5.2
getRenderFunctionback to summary
public String getRenderFunction()

Return the render function name (optional). If not specified, the script templates will be evaluated with ScriptEngine#eval(String, Bindings).

Annotations
@Nullable
getRenderObjectback to summary
public String getRenderObject()

Return the object where the render function belongs (optional).

Annotations
@Nullable
getResourceLoaderPathback to summary
public String getResourceLoaderPath()

Return the resource loader path(s) via a Spring resource location.

Annotations
@Nullable
getScriptsback to summary
public String[] getScripts()

Return the scripts to be loaded by the script engine (library or user provided).

Annotations
@Nullable
isSharedEngineback to summary
public Boolean isSharedEngine()

Return whether to use a shared engine for all threads or whether to create thread-local engine instances for each thread.

Annotations
@Nullable