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 String getResourcePath(
064                    ServletContext servletContext, String portletId, String path);
065    
066            public String getRootPath();
067    
068            public String getServletContextName();
069    
070            public String getSetting(String key);
071    
072            public String[] getSettingOptions(String key);
073    
074            public Map<String, ThemeSetting> getSettings();
075    
076            public Properties getSettingsProperties();
077    
078            public SpriteImage getSpriteImage(String fileName);
079    
080            public String getStaticResourcePath();
081    
082            public String getTemplateExtension();
083    
084            public String getTemplatesPath();
085    
086            public ThemeCompanyLimit getThemeCompanyLimit();
087    
088            public ThemeGroupLimit getThemeGroupLimit();
089    
090            public String getThemeId();
091    
092            public long getTimestamp();
093    
094            public String getVelocityResourceListener();
095    
096            public String getVirtualPath();
097    
098            public boolean getWapTheme();
099    
100            public boolean getWARFile();
101    
102            public boolean hasColorSchemes();
103    
104            public boolean isCompanyAvailable(long companyId);
105    
106            public boolean isControlPanelTheme();
107    
108            public boolean isGroupAvailable(long groupId);
109    
110            public boolean isLoadFromServletContext();
111    
112            public boolean isPageTheme();
113    
114            public boolean isWapTheme();
115    
116            public boolean isWARFile();
117    
118            public boolean resourceExists(
119                            ServletContext servletContext, String portletId, String path)
120                    throws Exception;
121    
122            public void setControlPanelTheme(boolean controlPanelTheme);
123    
124            public void setCssPath(String cssPath);
125    
126            public void setImagesPath(String imagesPath);
127    
128            public void setJavaScriptPath(String javaScriptPath);
129    
130            public void setLoadFromServletContext(boolean loadFromServletContext);
131    
132            public void setName(String name);
133    
134            public void setPageTheme(boolean pageTheme);
135    
136            public void setRootPath(String rootPath);
137    
138            public void setServletContextName(String servletContextName);
139    
140            public void setSetting(String key, String value);
141    
142            public void setSpriteImages(
143                    String spriteFileName, Properties spriteProperties);
144    
145            public void setTemplateExtension(String templateExtension);
146    
147            public void setTemplatesPath(String templatesPath);
148    
149            public void setThemeCompanyLimit(ThemeCompanyLimit themeCompanyLimit);
150    
151            public void setThemeGroupLimit(ThemeGroupLimit themeGroupLimit);
152    
153            public void setTimestamp(long timestamp);
154    
155            public void setVirtualPath(String virtualPath);
156    
157            public void setWapTheme(boolean wapTheme);
158    
159    }