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