001/*
002 *  Copyright 2010 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.plugins.forms;
017
018import java.util.ArrayList;
019import java.util.List;
020
021/**
022 * Class representing a form fieldset.
023 */
024public class Fieldset
025{
026    
027    /** The fieldset label. */
028    protected String _label;
029    
030    /** The IDs of the fields contained in this fieldset. */
031    protected List<String> _fieldIds;
032    
033    /**
034     * Default constructor.
035     */
036    public Fieldset()
037    {
038        this("", new ArrayList<String>());
039    }
040    
041    /**
042     * Constructor with parameters.
043     * @param label the fieldset label.
044     * @param fieldIds the field IDs.
045     */
046    public Fieldset(String label, List<String> fieldIds)
047    {
048        this._label = label;
049        this._fieldIds = fieldIds;
050    }
051    
052    /**
053     * Get the label.
054     * @return the label
055     */
056    public String getLabel()
057    {
058        return _label;
059    }
060
061    /**
062     * Set the label.
063     * @param label the label to set
064     */
065    public void setLabel(String label)
066    {
067        this._label = label;
068    }
069
070    /**
071     * Get the the field IDs.
072     * @return the the field IDs
073     */
074    public List<String> getFieldIds()
075    {
076        return _fieldIds;
077    }
078
079    /**
080     * Set the the field IDs.
081     * @param fieldIds the field IDs to set
082     */
083    public void setProperties(List<String> fieldIds)
084    {
085        this._fieldIds = fieldIds;
086    }
087    
088}