001/*
002 * Copyright 2002-2017 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.freemarker;
018
019import freemarker.ext.jsp.TaglibFactory;
020import freemarker.template.Configuration;
021
022/**
023 * Interface to be implemented by objects that configure and manage a
024 * FreeMarker Configuration object in a web environment. Detected and
025 * used by {@link FreeMarkerView}.
026 *
027 * @author Darren Davison
028 * @author Rob Harrop
029 * @since 03.03.2004
030 * @see FreeMarkerConfigurer
031 * @see FreeMarkerView
032 */
033public interface FreeMarkerConfig {
034
035        /**
036         * Return the FreeMarker {@link Configuration} object for the current
037         * web application context.
038         * <p>A FreeMarker Configuration object may be used to set FreeMarker
039         * properties and shared objects, and allows to retrieve templates.
040         * @return the FreeMarker Configuration
041         */
042        Configuration getConfiguration();
043
044        /**
045         * Return the {@link TaglibFactory} used to enable JSP tags to be
046         * accessed from FreeMarker templates.
047         */
048        TaglibFactory getTaglibFactory();
049
050}