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.List;
018    import java.util.Map;
019    
020    import javax.servlet.ServletContext;
021    import javax.servlet.http.HttpServletRequest;
022    import javax.servlet.http.HttpServletResponse;
023    
024    /**
025     * @author Tina Tian
026     * @author Raymond Aug??
027     */
028    public interface TemplateManager {
029    
030            public void addContextObjects(
031                    Map<String, Object> contextObjects,
032                    Map<String, Object> newContextObjects);
033    
034            public void addStaticClassSupport(
035                    Map<String, Object> contextObjects, String variableName,
036                    Class<?> variableClass);
037    
038            public void addTaglibApplication(
039                    Map<String, Object> contextObjects, String applicationName,
040                    ServletContext servletContext);
041    
042            public void addTaglibFactory(
043                    Map<String, Object> contextObjects, String taglibLiferayHash,
044                    ServletContext servletContext);
045    
046            public void addTaglibRequest(
047                    Map<String, Object> contextObjects, String applicationName,
048                    HttpServletRequest request, HttpServletResponse response);
049    
050            public void addTaglibTheme(
051                    Map<String, Object> contextObjects, String string,
052                    HttpServletRequest request, HttpServletResponse response);
053    
054            public void destroy();
055    
056            public void destroy(ClassLoader classLoader);
057    
058            public String getName();
059    
060            public String[] getRestrictedVariables();
061    
062            public Template getTemplate(
063                    List<TemplateResource> templateResources, boolean restricted);
064    
065            public Template getTemplate(
066                    List<TemplateResource> templateResources,
067                    TemplateResource errorTemplateResource, boolean restricted);
068    
069            public Template getTemplate(
070                    TemplateResource templateResource, boolean restricted);
071    
072            public Template getTemplate(
073                    TemplateResource templateResource,
074                    TemplateResource errorTemplateResource, boolean restricted);
075    
076            public void init() throws TemplateException;
077    
078    }