Package io.micronaut.email.template
Class DefaultTemplateBodyDecorator
java.lang.Object
io.micronaut.email.template.DefaultTemplateBodyDecorator
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,EmailDecorator
,TemplateBodyDecorator
@Requires(beans=io.micronaut.views.ViewsRendererLocator.class)
@Singleton
public class DefaultTemplateBodyDecorator
extends Object
implements TemplateBodyDecorator
DefaultImplementation
of TemplateBodyDecorator
.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionDefaultTemplateBodyDecorator
(io.micronaut.views.ViewsRendererLocator viewsRendererLocator) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
Methods inherited from interface io.micronaut.email.template.TemplateBodyDecorator
decorate, renderBody
-
Constructor Details
-
DefaultTemplateBodyDecorator
public DefaultTemplateBodyDecorator(io.micronaut.views.ViewsRendererLocator viewsRendererLocator) - Parameters:
viewsRendererLocator
- ViewRendererLocator
-
-
Method Details
-
getLogger
public org.slf4j.Logger getLogger()- Specified by:
getLogger
in interfaceTemplateBodyDecorator
-
resolveViewsRenderer
@NonNull public @NonNull Optional<io.micronaut.views.ViewsRenderer> resolveViewsRenderer(@NonNull @NonNull BodyType bodyType, @NonNull @NonNull String viewName, @Nullable @Nullable Object data) - Specified by:
resolveViewsRenderer
in interfaceTemplateBodyDecorator
- Parameters:
bodyType
- Emails Body typeviewName
- template view namedata
- Template Model- Returns:
- The view rendered to be used
-