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.util;
016    
017    import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018    import com.liferay.portal.model.Theme;
019    
020    /**
021     * @author Harrison Schueler
022     */
023    public class ThemeFactoryUtil {
024    
025            public static Theme getDefaultRegularTheme(long companyId) {
026                    return getThemeFactory().getDefaultRegularTheme(companyId);
027            }
028    
029            public static String getDefaultRegularThemeId(long companyId) {
030                    return getThemeFactory().getDefaultRegularThemeId(companyId);
031            }
032    
033            public static Theme getDefaultWapTheme(long companyId) {
034                    return getThemeFactory().getDefaultWapTheme(companyId);
035            }
036    
037            public static String getDefaultWapThemeId(long companyId) {
038                    return getThemeFactory().getDefaultWapThemeId(companyId);
039            }
040    
041            public static Theme getTheme() {
042                    return getThemeFactory().getTheme();
043            }
044    
045            public static Theme getTheme(String themeId) {
046                    return getThemeFactory().getTheme(themeId);
047            }
048    
049            public static Theme getTheme(String themeId, String name) {
050                    return getThemeFactory().getTheme(themeId, name);
051            }
052    
053            public static ThemeFactory getThemeFactory() {
054                    PortalRuntimePermission.checkGetBeanProperty(ThemeFactoryUtil.class);
055    
056                    return _ThemeFactory;
057            }
058    
059            public void setThemeFactory(ThemeFactory ThemeFactory) {
060                    PortalRuntimePermission.checkSetBeanProperty(getClass());
061    
062                    _ThemeFactory = ThemeFactory;
063            }
064    
065            private static ThemeFactory _ThemeFactory;
066    
067    }