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.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.theme.ThemeCompanyLimit;
020    import com.liferay.portal.theme.ThemeGroupLimit;
021    
022    import java.io.Serializable;
023    
024    import java.util.List;
025    import java.util.Map;
026    import java.util.Properties;
027    
028    import javax.servlet.ServletContext;
029    
030    /**
031     * @author Brian Wing Shun Chan
032     * @author Raymond Aug??
033     */
034    @ProviderType
035    public interface Theme extends Comparable<Theme>, Plugin, Serializable {
036    
037            public void addSetting(
038                    String key, String value, boolean configurable, String type,
039                    String[] options, String script);
040    
041            public List<ColorScheme> getColorSchemes();
042    
043            public Map<String, ColorScheme> getColorSchemesMap();
044    
045            public Map<String, ThemeSetting> getConfigurableSettings();
046    
047            public String getContextPath();
048    
049            public String getCssPath();
050    
051            public String getDevice();
052    
053            public String getFreeMarkerTemplateLoader();
054    
055            public String getImagesPath();
056    
057            public String getJavaScriptPath();
058    
059            public boolean getLoadFromServletContext();
060    
061            public String getName();
062    
063            public List<PortletDecorator> getPortletDecorators();
064    
065            public Map<String, PortletDecorator> getPortletDecoratorsMap();
066    
067            public String getResourcePath(
068                    ServletContext servletContext, String portletId, String path);
069    
070            public String getRootPath();
071    
072            public String getServletContextName();
073    
074            public String getSetting(String key);
075    
076            public String[] getSettingOptions(String key);
077    
078            public Map<String, ThemeSetting> getSettings();
079    
080            public Properties getSettingsProperties();
081    
082            public SpriteImage getSpriteImage(String fileName);
083    
084            public String getStaticResourcePath();
085    
086            public String getTemplateExtension();
087    
088            public String getTemplatesPath();
089    
090            public ThemeCompanyLimit getThemeCompanyLimit();
091    
092            public ThemeGroupLimit getThemeGroupLimit();
093    
094            public String getThemeId();
095    
096            public long getTimestamp();
097    
098            public String getVelocityResourceListener();
099    
100            public String getVirtualPath();
101    
102            public boolean getWapTheme();
103    
104            public boolean getWARFile();
105    
106            public boolean hasColorSchemes();
107    
108            public boolean isCompanyAvailable(long companyId);
109    
110            public boolean isControlPanelTheme();
111    
112            public boolean isGroupAvailable(long groupId);
113    
114            public boolean isLoadFromServletContext();
115    
116            public boolean isPageTheme();
117    
118            public boolean isWapTheme();
119    
120            public boolean isWARFile();
121    
122            public boolean resourceExists(
123                            ServletContext servletContext, String portletId, String path)
124                    throws Exception;
125    
126            public void setControlPanelTheme(boolean controlPanelTheme);
127    
128            public void setCssPath(String cssPath);
129    
130            public void setImagesPath(String imagesPath);
131    
132            public void setJavaScriptPath(String javaScriptPath);
133    
134            public void setLoadFromServletContext(boolean loadFromServletContext);
135    
136            public void setName(String name);
137    
138            public void setPageTheme(boolean pageTheme);
139    
140            public void setRootPath(String rootPath);
141    
142            public void setServletContextName(String servletContextName);
143    
144            public void setSetting(String key, String value);
145    
146            public void setSpriteImages(
147                    String spriteFileName, Properties spriteProperties);
148    
149            public void setTemplateExtension(String templateExtension);
150    
151            public void setTemplatesPath(String templatesPath);
152    
153            public void setThemeCompanyLimit(ThemeCompanyLimit themeCompanyLimit);
154    
155            public void setThemeGroupLimit(ThemeGroupLimit themeGroupLimit);
156    
157            public void setTimestamp(long timestamp);
158    
159            public void setVirtualPath(String virtualPath);
160    
161            public void setWapTheme(boolean wapTheme);
162    
163    }