001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.template;
016    
017    import java.util.Map;
018    
019    import javax.servlet.ServletContext;
020    import javax.servlet.http.HttpServletRequest;
021    import javax.servlet.http.HttpServletResponse;
022    
023    /**
024     * @author Tina Tian
025     * @author Raymond Aug??
026     */
027    public interface TemplateManager {
028    
029            public void addContextObjects(
030                    Map<String, Object> contextObjects,
031                    Map<String, Object> newContextObjects);
032    
033            public void addStaticClassSupport(
034                    Map<String, Object> contextObjects, String variableName,
035                    Class<?> variableClass);
036    
037            public void addTaglibApplication(
038                    Map<String, Object> contextObjects, String applicationName,
039                    ServletContext servletContext);
040    
041            public void addTaglibFactory(
042                    Map<String, Object> contextObjects, String taglibLiferayHash,
043                    ServletContext servletContext);
044    
045            public void addTaglibRequest(
046                    Map<String, Object> contextObjects, String applicationName,
047                    HttpServletRequest request, HttpServletResponse response);
048    
049            public void addTaglibTheme(
050                    Map<String, Object> contextObjects, String string,
051                    HttpServletRequest request, HttpServletResponse response);
052    
053            public void destroy();
054    
055            public void destroy(ClassLoader classLoader);
056    
057            public String getName();
058    
059            public String[] getRestrictedVariables();
060    
061            public Template getTemplate(
062                    TemplateResource templateResource, boolean restricted);
063    
064            public Template getTemplate(
065                    TemplateResource templateResource,
066                    TemplateResource errorTemplateResource, boolean restricted);
067    
068            public void init() throws TemplateException;
069    
070    }