Interface ViewsRenderer<T,R>

Type Parameters:
T - The model type
R - The request type
All Superinterfaces:
io.micronaut.core.order.Ordered
All Known Implementing Classes:
FreemarkerViewsRenderer, HandlebarsViewsRenderer, HtmlJteViewsRenderer, JteViewsRenderer, PebbleViewsRenderer, PlainJteViewsRenderer, RockerViewsRenderer, SoySauceViewsRenderer, ThymeleafViewsRenderer, VelocityViewsRenderer

public interface ViewsRenderer<T,R> extends io.micronaut.core.order.Ordered
Interface to be implemented by View Engines implementations.
Since:
1.0
Author:
Sergio del Amo
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    exists(@NonNull String viewName)
     
    @NonNull io.micronaut.core.io.Writable
    render(@NonNull String viewName, T data, R request)
     

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Method Details

    • render

      @NonNull @NonNull io.micronaut.core.io.Writable render(@NonNull @NonNull String viewName, @Nullable T data, @Nullable R request)
      Parameters:
      viewName - view name to be rendered
      data - response body to render it with a view
      request - HTTP request
      Returns:
      A writable where the view will be written to.
    • exists

      boolean exists(@NonNull @NonNull String viewName)
      Parameters:
      viewName - view name to be rendered
      Returns:
      true if a template can be found for the supplied view name.