001/*
002 * Copyright 2002-2015 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.web.servlet.view.groovy;
018
019import groovy.text.markup.MarkupTemplateEngine;
020
021/**
022 * Interface to be implemented by objects that configure and manage a Groovy
023 * {@link MarkupTemplateEngine} for automatic lookup in a web environment.
024 * Detected and used by {@link GroovyMarkupView}.
025 *
026 * @author Brian Clozel
027 * @since 4.1
028 * @see GroovyMarkupConfigurer
029 */
030public interface GroovyMarkupConfig {
031
032        /**
033         * Return the Groovy {@link MarkupTemplateEngine} for the current
034         * web application context. May be unique to one servlet, or shared
035         * in the root context.
036         * @return the Groovy MarkupTemplateEngine engine
037         */
038        MarkupTemplateEngine getTemplateEngine();
039
040}