Package io.quarkus.qute
Class TemplateInstanceBase
java.lang.Object
io.quarkus.qute.TemplateInstanceBase
- All Implemented Interfaces:
TemplateInstance
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.quarkus.qute.TemplateInstance
TemplateInstance.Initializer -
Field Summary
FieldsFields inherited from interface io.quarkus.qute.TemplateInstance
LOCALE, SELECTED_VARIANT, TIMEOUT, VARIANTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputedData(String key, Function<String, Object> function) Associates the specified mapping function with the specified key.protected Objectdata()Set the the root data object.Put the data in a map.protected abstract Engineengine()getAttribute(String key) longonRendered(Runnable action) Register an action that is performed after the rendering is finished.setAttribute(String key, Object value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.qute.TemplateInstance
consume, createMulti, createUni, getFragment, getTemplate, render, renderAsync, setLocale, setLocale, setVariant
-
Field Details
-
data
-
dataMap
-
attributes
-
renderedActions
-
-
Constructor Details
-
TemplateInstanceBase
public TemplateInstanceBase()
-
-
Method Details
-
data
Description copied from interface:TemplateInstanceSet the the root data object. Invocation of this method removes any data set previously byTemplateInstance.data(String, Object)andTemplateInstance.computedData(String, Function).- Specified by:
datain interfaceTemplateInstance- Returns:
-
data
Description copied from interface:TemplateInstancePut the data in a map. The map will be used as the root context object during rendering. Remove the root data object previously set byTemplateInstance.data(Object).- Specified by:
datain interfaceTemplateInstance- Returns:
- self
-
computedData
Description copied from interface:TemplateInstanceAssociates the specified mapping function with the specified key. The function is applied each time a value for the given key is requested. Also removes the root data object previously set byTemplateInstance.data(Object).If the key is already associated with a value using the
TemplateInstance.data(String, Object)method then the mapping function is never used.- Specified by:
computedDatain interfaceTemplateInstance- Returns:
- self
-
setAttribute
- Specified by:
setAttributein interfaceTemplateInstance- Returns:
- self
-
getAttribute
- Specified by:
getAttributein interfaceTemplateInstance- Returns:
- the attribute or null
-
onRendered
Description copied from interface:TemplateInstanceRegister an action that is performed after the rendering is finished.- Specified by:
onRenderedin interfaceTemplateInstance- Returns:
- self
-
getTimeout
public long getTimeout()- Specified by:
getTimeoutin interfaceTemplateInstance- Returns:
- the timeout
- See Also:
-
data
-
engine
-