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.model.impl;
016    
017    import com.liferay.portal.kernel.util.StringPool;
018    import com.liferay.portal.model.ThemeSetting;
019    
020    /**
021     * @author Julio Camarero
022     * @author Raymond Aug??
023     */
024    public class ThemeSettingImpl implements ThemeSetting {
025    
026            public static String namespaceProperty(String device) {
027                    return _PROPERTY_NAMESPACE.concat(device);
028            }
029    
030            public static String namespaceProperty(String device, String key) {
031                    return namespaceProperty(device).concat(StringPool.COLON).concat(key);
032            }
033    
034            public ThemeSettingImpl(
035                    boolean configurable, String[] options, String script, String type,
036                    String value) {
037    
038                    _configurable = configurable;
039                    _options = options;
040                    _script = script;
041                    _type = type;
042                    _value = value;
043            }
044    
045            @Override
046            public String[] getOptions() {
047                    return _options;
048            }
049    
050            @Override
051            public String getScript() {
052                    return _script;
053            }
054    
055            @Override
056            public String getType() {
057                    return _type;
058            }
059    
060            @Override
061            public String getValue() {
062                    return _value;
063            }
064    
065            @Override
066            public boolean isConfigurable() {
067                    return _configurable;
068            }
069    
070            @Override
071            public void setConfigurable(boolean configurable) {
072                    this._configurable = configurable;
073            }
074    
075            @Override
076            public void setOptions(String[] options) {
077                    _options = options;
078            }
079    
080            @Override
081            public void setScript(String script) {
082                    _script = script;
083            }
084    
085            @Override
086            public void setType(String type) {
087                    _type = type;
088            }
089    
090            @Override
091            public void setValue(String value) {
092                    _value = value;
093            }
094    
095            private static final String _PROPERTY_NAMESPACE = "lfr-theme:";
096    
097            private boolean _configurable;
098            private String[] _options;
099            private String _script;
100            private String _type;
101            private String _value;
102    
103    }