001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (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.ade.sitemap.client.toolbar;
029
030import org.opencms.gwt.client.ui.contextmenu.A_CmsContextMenuItem;
031import org.opencms.gwt.client.ui.contextmenu.CmsContextMenuItem;
032import org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry;
033
034import java.util.List;
035
036/**
037 * Common super class for all sitemap context menu entries.<p>
038 *
039 * @since 8.0.0
040 */
041public abstract class A_CmsSitemapModeEntry implements I_CmsContextMenuEntry {
042
043    /** The label (text) for the menu entry. */
044    private String m_label;
045
046    /**
047     * Constructor.<p>
048     *
049     * @param label the label
050     */
051    public A_CmsSitemapModeEntry(String label) {
052
053        m_label = label;
054    }
055
056    /**
057     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#generateMenuItem()
058     */
059    public A_CmsContextMenuItem generateMenuItem() {
060
061        return new CmsContextMenuItem(this);
062    }
063
064    /**
065     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#getIconClass()
066     */
067    public String getIconClass() {
068
069        return null;
070    }
071
072    /**
073     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#getJspPath()
074     */
075    public String getJspPath() {
076
077        return null;
078    }
079
080    /**
081     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#getLabel()
082     */
083    public String getLabel() {
084
085        return m_label;
086    }
087
088    /**
089     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#getName()
090     */
091    public String getName() {
092
093        return null;
094    }
095
096    /**
097     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#getReason()
098     */
099    public String getReason() {
100
101        return null;
102    }
103
104    /**
105     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#getSubMenu()
106     */
107    public List<I_CmsContextMenuEntry> getSubMenu() {
108
109        return null;
110    }
111
112    /**
113     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#hasSubMenu()
114     */
115    public boolean hasSubMenu() {
116
117        return false;
118    }
119
120    /**
121     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#isActive()
122     */
123    public boolean isActive() {
124
125        return true;
126    }
127
128    /**
129     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#isSeparator()
130     */
131    public boolean isSeparator() {
132
133        return false;
134    }
135
136    /**
137     * @see org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuEntry#isVisible()
138     */
139    public boolean isVisible() {
140
141        return true;
142    }
143}