001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (C) Alkacon Software (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.acacia.shared;
029
030import com.google.gwt.user.client.rpc.IsSerializable;
031
032/**
033 * Form tab information bean.<p>
034 */
035public class CmsTabInfo implements IsSerializable {
036
037    /** Indicates if the first level of left labels should be shown in the editor. */
038    private boolean m_collapsed;
039
040    /** The XML element name where this tab starts. */
041    private String m_startName;
042
043    /** The name for the tab ID, generated from the start name. */
044    private String m_tabId;
045
046    /** The name to display on the tab. */
047    private String m_tabName;
048
049    /** The tab description HTML. */
050    private String m_description;
051
052    /** The tab localization key. */
053    private String m_tabKey;
054
055    /** Localization key for the description. */
056    private String m_descriptionKey;
057
058    /** The raw configured tab name string. */
059    private String m_tabRaw;
060
061    /** The raw configured description string. */
062    private String m_descriptionRaw;
063
064    /**
065     * Constructor.<p>
066     *
067     * @param tabName the tab name
068     * @param tabKey the tab localization key
069     * @param tabId the tab id
070     * @param startName the start element name
071     * @param collapsed if the labels should be collapsed
072     * @param description the description HTML
073     * @param descriptionKey the description key
074     */
075    public CmsTabInfo(
076        String tabName,
077        String tabKey,
078        String tabRaw,
079        String tabId,
080        String startName,
081        boolean collapsed,
082        String description,
083        String descriptionKey,
084        String descriptionRaw) {
085
086        m_tabName = tabName;
087        m_tabKey = tabKey;
088        m_tabRaw = tabRaw;
089        m_tabId = tabId;
090        m_startName = startName;
091        m_collapsed = collapsed;
092        m_description = description;
093        m_descriptionKey = descriptionKey;
094        m_descriptionRaw = descriptionRaw;
095    }
096
097    /**
098     * Constructor for serialization only.<p>
099     */
100    protected CmsTabInfo() {
101
102        // nothing to do
103    }
104
105    /**
106     * Gets the description HTML.<p>
107     *
108     * @return the description HTML
109     */
110    public String getDescription() {
111
112        return m_description;
113    }
114
115    /**
116     * Gets the localization key for the description.
117     *
118     * @return the localization key for the description
119     */
120    public String getDescriptionKey() {
121
122        return m_descriptionKey;
123    }
124
125    /**
126     * Gets the raw configured description string.
127     *
128     * @return the raw description
129     */
130    public String getDescriptionRaw() {
131
132        return m_descriptionRaw;
133
134    }
135
136    /**
137     * Returns the startName.<p>
138     *
139     * @return the startName
140     */
141    public String getStartName() {
142
143        return m_startName;
144    }
145
146    /**
147     * Returns the tabId.<p>
148     *
149     * @return the tabId
150     */
151    public String getTabId() {
152
153        return m_tabId;
154    }
155
156    /**
157     * Returns the tabName.<p>
158     *
159     * @return the tabName
160     */
161    public String getTabName() {
162
163        return m_tabName;
164    }
165
166    /**
167     * Gets the localization key for the tab name.
168     *
169     * @return the tab name localization key
170     */
171    public String getTabNameKey() {
172
173        return m_tabKey;
174    }
175
176    /**
177     * Gets the raw configured tab name.
178     *
179     * @return the raw configured tab name
180     */
181    public String getTabNameRaw() {
182
183        return m_tabRaw;
184    }
185
186    /**
187     * Returns the collapsed.<p>
188     *
189     * @return the collapsed
190     */
191    public boolean isCollapsed() {
192
193        return m_collapsed;
194    }
195}