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.util;
016    
017    import com.liferay.portal.kernel.util.ColorSchemeFactory;
018    import com.liferay.portal.kernel.util.StringPool;
019    import com.liferay.portal.model.ColorScheme;
020    import com.liferay.portal.model.impl.ColorSchemeImpl;
021    
022    /**
023     * @author Vilmos Papp
024     */
025    public class ColorSchemeFactoryImpl implements ColorSchemeFactory {
026    
027            @Override
028            public ColorScheme getColorScheme() {
029                    return new ColorSchemeImpl();
030            }
031    
032            @Override
033            public ColorScheme getColorScheme(String colorSchemeId) {
034                    return new ColorSchemeImpl(colorSchemeId);
035            }
036    
037            @Override
038            public ColorScheme getColorScheme(
039                    String colorSchemeId, String name, String cssClass) {
040    
041                    return new ColorSchemeImpl(colorSchemeId, name, cssClass);
042            }
043    
044            @Override
045            public ColorScheme getDefaultRegularColorScheme() {
046                    return new ColorSchemeImpl(
047                            getDefaultRegularColorSchemeId(), StringPool.BLANK,
048                            StringPool.BLANK);
049            }
050    
051            @Override
052            public String getDefaultRegularColorSchemeId() {
053                    return PropsValues.DEFAULT_REGULAR_COLOR_SCHEME_ID;
054            }
055    
056            @Override
057            public ColorScheme getDefaultWapColorScheme() {
058                    return new ColorSchemeImpl(
059                            getDefaultWapColorSchemeId(), StringPool.BLANK, StringPool.BLANK);
060            }
061    
062            @Override
063            public String getDefaultWapColorSchemeId() {
064                    return PropsValues.DEFAULT_WAP_COLOR_SCHEME_ID;
065            }
066    
067    }