T
- The class to be builtpublic abstract class TemplatedBuilder<T extends Renderable>
extends java.lang.Object
Constructor and Description |
---|
TemplatedBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract T |
build() |
java.lang.Object |
getTemplate() |
java.util.Optional<java.lang.Object> |
getTemplateModel() |
java.util.Optional<java.lang.String> |
getTemplateView() |
TemplatedBuilder<T> |
template(java.lang.String html)
Sets the Turbo Frame with a String.
|
TemplatedBuilder<T> |
template(java.lang.String view,
java.lang.Object model)
Sets the template with a View and Model.
|
TemplatedBuilder<T> |
template(io.micronaut.core.io.Writable writable)
Sets the Turbo frame content with a
Writable . |
TemplatedBuilder<T> |
templateModel(java.lang.Object templateModel)
Sets the template's model.
|
TemplatedBuilder<T> |
templateView(java.lang.String templateView)
Sets the template's view name.
|
public abstract T build()
@NonNull public java.util.Optional<java.lang.String> getTemplateView()
@NonNull public java.util.Optional<java.lang.Object> getTemplateModel()
@Nullable public java.lang.Object getTemplate()
@NonNull public TemplatedBuilder<T> template(@NonNull java.lang.String view, java.lang.Object model)
view
- The View namemodel
- The Model@NonNull public TemplatedBuilder<T> template(@NonNull java.lang.String html)
html
- The turbo frame content@NonNull public TemplatedBuilder<T> template(@NonNull io.micronaut.core.io.Writable writable)
Writable
.writable
- The template as a Writable
.@NonNull public TemplatedBuilder<T> templateView(@NonNull java.lang.String templateView)
templateView
- The View name@NonNull public TemplatedBuilder<T> templateModel(@NonNull java.lang.Object templateModel)
templateModel
- template model.