| Constructor and Description |
|---|
TemplateBody(BodyType bodyType,
io.micronaut.views.ModelAndView<T> modelAndView) |
TemplateBody(BodyType bodyType,
java.lang.String view,
T model) |
TemplateBody(io.micronaut.views.ModelAndView<T> modelAndView) |
TemplateBody(java.lang.String view,
T model)
Body HTML with view name and model.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.String> |
get(BodyType bodyType) |
io.micronaut.views.ModelAndView<T> |
getModelAndView() |
void |
setBody(java.lang.String body) |
public TemplateBody(@Nullable
java.lang.String view,
@Nullable
T model)
view - view name to be renderedmodel - Model to be rendered against the viewpublic TemplateBody(@NonNull
io.micronaut.views.ModelAndView<T> modelAndView)
modelAndView - Emails Template's name and model for htmlpublic TemplateBody(@NonNull
BodyType bodyType,
@Nullable
java.lang.String view,
@Nullable
T model)
view - View name to be renderedmodel - Model to be rendered against the viewbodyType - The content type of the template@NonNull public io.micronaut.views.ModelAndView<T> getModelAndView()
public void setBody(java.lang.String body)
body - The result of the view being rendered