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.security.pacl.permission.PortalRuntimePermission;
018    import com.liferay.portal.model.ColorScheme;
019    
020    /**
021     * @author Vilmos Papp
022     */
023    public class ColorSchemeFactoryUtil {
024    
025            public static ColorScheme getColorScheme() {
026                    return getColorSchemeFactory().getColorScheme();
027            }
028    
029            public static ColorScheme getColorScheme(String colorSchemeId) {
030                    return getColorSchemeFactory().getColorScheme(colorSchemeId);
031            }
032    
033            public static ColorScheme getColorScheme(
034                    String colorSchemeId, String name, String cssClass) {
035    
036                    return getColorSchemeFactory().getColorScheme(
037                            colorSchemeId, name, cssClass);
038            }
039    
040            public static ColorSchemeFactory getColorSchemeFactory() {
041                    PortalRuntimePermission.checkGetBeanProperty(
042                            ColorSchemeFactoryUtil.class);
043    
044                    return _colorSchemeFactory;
045            }
046    
047            public static ColorScheme getDefaultRegularColorScheme() {
048                    return getColorSchemeFactory().getDefaultRegularColorScheme();
049            }
050    
051            public static String getDefaultRegularColorSchemeId() {
052                    return getColorSchemeFactory().getDefaultRegularColorSchemeId();
053            }
054    
055            public static ColorScheme getDefaultWapColorScheme() {
056                    return getColorSchemeFactory().getDefaultWapColorScheme();
057            }
058    
059            public static String getDefaultWapColorSchemeId() {
060                    return getColorSchemeFactory().getDefaultWapColorSchemeId();
061            }
062    
063            public void setColorSchemeFactory(ColorSchemeFactory colorSchemeFactory) {
064                    PortalRuntimePermission.checkSetBeanProperty(getClass());
065    
066                    _colorSchemeFactory = colorSchemeFactory;
067            }
068    
069            private static ColorSchemeFactory _colorSchemeFactory;
070    
071    }