001package io.jstach.opt.spring.webmvc;
002
003import java.util.Map;
004
005import jakarta.servlet.http.HttpServletRequest;
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 */
013public interface JStachioModelViewConfigurer {
014
015        /**
016         * Configures a JStache model with the current request and traditional Spring model
017         * before being rendered.
018         * <p>
019         * This is useful to add specific request meta data like CSRF token to the JStache
020         * model so that the Controllers do not have to worry about doing that.
021         * @param page the current {@link io.jstach.jstache.JStache} model
022         * @param model the current Spring MVC model
023         * @param request the current servlet request
024         */
025        @SuppressWarnings("exports")
026        void configure(Object page, Map<String, Object> model, HttpServletRequest request);
027
028}