001/*
002 *  Copyright 2011 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.web.skin;
017
018import org.ametys.runtime.i18n.I18nizableText;
019import org.ametys.runtime.parameter.Parameter;
020import org.ametys.runtime.parameter.ParameterHelper.ParameterType;
021
022/**
023 * Definition of a {@link Skin} parameter.
024 */
025public class SkinParameter extends Parameter<ParameterType>
026{
027    
028    /** The display category. */
029    protected I18nizableText _displayCategory;
030    
031    /** The display group. */
032    protected I18nizableText _displayGroup;
033    
034    /**
035     * Get the display category.
036     * @return the display category.
037     */
038    public I18nizableText getDisplayCategory()
039    {
040        return _displayCategory;
041    }
042    
043    /**
044     * Set the parameter display category.
045     * @param displayCategory the display category to set.
046     */
047    public void setDisplayCategory(I18nizableText displayCategory)
048    {
049        _displayCategory = displayCategory;
050    }
051    
052    /**
053     * Get the display group.
054     * @return the display group.
055     */
056    public I18nizableText getDisplayGroup()
057    {
058        return _displayGroup;
059    }
060    
061    /**
062     * Set the parameter display group.
063     * @param displayGroup the display group to set.
064     */
065    public void setDisplayGroup(I18nizableText displayGroup)
066    {
067        _displayGroup = displayGroup;
068    }
069    
070    @Override
071    public String toString()
072    {
073        return "'" + getId() + "' (type:    " + getType().name() + ", label:    " + getLabel().toString() + ", " + (getDefaultValue() != null ? ("default value: " + getDefaultValue()) : "no default value")  + ", " + (getEnumerator() != null ? ("enumerator: " + getEnumerator()) : "no enumerator") + ")";
074    }
075    
076}