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    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            @Override
048            public String[] getOptions() {
049                    return _options;
050            }
051    
052            @Override
053            public String getScript() {
054                    return _script;
055            }
056    
057            @Override
058            public String getType() {
059                    return _type;
060            }
061    
062            @Override
063            public String getValue() {
064                    return _value;
065            }
066    
067            @Override
068            public boolean isConfigurable() {
069                    return _configurable;
070            }
071    
072            @Override
073            public void setConfigurable(boolean configurable) {
074                    this._configurable = configurable;
075            }
076    
077            @Override
078            public void setOptions(String[] options) {
079                    _options = options;
080            }
081    
082            @Override
083            public void setScript(String script) {
084                    _script = script;
085            }
086    
087            @Override
088            public void setType(String type) {
089                    _type = type;
090            }
091    
092            @Override
093            public void setValue(String value) {
094                    _value = value;
095            }
096    
097            private static final String _PROPERTY_NAMESPACE = "lfr-theme:";
098    
099            private static final long serialVersionUID = 1L;
100    
101            private boolean _configurable;
102            private String[] _options;
103            private String _script;
104            private String _type;
105            private String _value;
106    
107    }