001package io.jstach.opt.spring.webflux;
002
003import java.util.Map;
004
005import org.springframework.web.server.ServerWebExchange;
006
007/**
008 * User can provide instances in the application context and they will be applied to each
009 * {@link JStachioModelView} instance before rendering.
010 * 
011 * @author dsyer
012 */
013@SuppressWarnings("exports")
014public interface JStachioModelViewConfigurer {
015
016        /**
017         * Configures a JStache model with the current request and traditional Spring model
018         * before being rendered.
019         * <p>
020         * This is useful to add specific request meta data like CSRF token to the JStache
021         * model so that the Controllers do not have to worry about doing that.
022         * @param page the current {@link io.jstach.jstache.JStache} model
023         * @param model the current model
024         * @param request the current request context
025         */
026        void configure(Object page, Map<String, Object> model, ServerWebExchange request);
027
028}