Class DefaultViewsModelDecorator

java.lang.Object
io.micronaut.views.DefaultViewsModelDecorator
All Implemented Interfaces:
ViewsModelDecorator

@Singleton @Requires(classes=io.micronaut.http.HttpRequest.class) public class DefaultViewsModelDecorator extends Object implements ViewsModelDecorator
Default implementation of ViewsModelDecorator which enhances a model by running it by all applicable ViewModelProcessors ViewModelProcessor.
Since:
3.0.0
Author:
Sergio del Amo
  • Constructor Details

    • DefaultViewsModelDecorator

      public DefaultViewsModelDecorator(io.micronaut.context.ApplicationContext applicationContext)
  • Method Details

    • decorate

      public void decorate(io.micronaut.http.HttpRequest<?> request, @NonNull @NonNull ModelAndView<?> modelAndView)
      Enhances a model by running it by all applicable ViewModelProcessors ViewModelProcessor.
      Specified by:
      decorate in interface ViewsModelDecorator
      Parameters:
      request - The http request this model relates to.
      modelAndView - The ModelAndView to be enhanced.