Package io.quarkus.qute
Class TemplateInstanceBase
- java.lang.Object
-
- io.quarkus.qute.TemplateInstanceBase
-
- All Implemented Interfaces:
TemplateInstance
public abstract class TemplateInstanceBase extends Object implements TemplateInstance
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.quarkus.qute.TemplateInstance
TemplateInstance.Initializer
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Object>attributesprotected Objectdataprotected Map<String,Object>dataMapprotected List<Runnable>renderedActions-
Fields inherited from interface io.quarkus.qute.TemplateInstance
SELECTED_VARIANT, TIMEOUT, VARIANTS
-
-
Constructor Summary
Constructors Constructor Description TemplateInstanceBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Objectdata()TemplateInstancedata(Object data)Set the the root data object.TemplateInstancedata(String key, Object data)Put the data in a map.protected abstract Engineengine()ObjectgetAttribute(String key)longgetTimeout()TemplateInstanceonRendered(Runnable action)Register an action that is performed after the rendering is finished.TemplateInstancesetAttribute(String key, Object value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.qute.TemplateInstance
consume, createMulti, createUni, getTemplate, render, renderAsync
-
-
-
-
Method Detail
-
data
public TemplateInstance data(Object data)
Description copied from interface:TemplateInstanceSet the the root data object. Invocation of this method removes any data set previously byTemplateInstance.data(String, Object).- Specified by:
datain interfaceTemplateInstance- Returns:
-
data
public TemplateInstance data(String key, Object data)
Description copied from interface:TemplateInstancePut the data in a map. The map will be used as the root context object during rendering. Invocation of this method removes the root data object previously set byTemplateInstance.data(Object).- Specified by:
datain interfaceTemplateInstance- Returns:
- self
-
setAttribute
public TemplateInstance setAttribute(String key, Object value)
- Specified by:
setAttributein interfaceTemplateInstance- Returns:
- self
-
getAttribute
public Object getAttribute(String key)
- Specified by:
getAttributein interfaceTemplateInstance- Returns:
- the attribute or null
-
onRendered
public TemplateInstance onRendered(Runnable action)
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:
TemplateInstance.TIMEOUT
-
data
protected Object data()
-
engine
protected abstract Engine engine()
-
-