001    /**
002     * Copyright (c) 2000-2012 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            public String[] getOptions() {
046                    return _options;
047            }
048    
049            public String getScript() {
050                    return _script;
051            }
052    
053            public String getType() {
054                    return _type;
055            }
056    
057            public String getValue() {
058                    return _value;
059            }
060    
061            public boolean isConfigurable() {
062                    return _configurable;
063            }
064    
065            public void setConfigurable(boolean configurable) {
066                    this._configurable = configurable;
067            }
068    
069            public void setOptions(String[] options) {
070                    _options = options;
071            }
072    
073            public void setScript(String script) {
074                    _script = script;
075            }
076    
077            public void setType(String type) {
078                    _type = type;
079            }
080    
081            public void setValue(String value) {
082                    _value = value;
083            }
084    
085            private static final String _PROPERTY_NAMESPACE = "lfr-theme:";
086    
087            private boolean _configurable;
088            private String[] _options;
089            private String _script;
090            private String _type;
091            private String _value;
092    
093    }