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