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.ui.apps;
029
030/**
031 * The app visibility status.<p>
032 */
033public class CmsAppVisibilityStatus {
034
035    /** The active and visible status. */
036    public static final CmsAppVisibilityStatus ACTIVE = new CmsAppVisibilityStatus(true, true, null);
037
038    /** The invisible status. */
039    public static final CmsAppVisibilityStatus INVISIBLE = new CmsAppVisibilityStatus(false, false, null);
040
041    /** The active flac. */
042    private boolean m_active;
043
044    /** The help text for visible but inactive apps. */
045    private String m_helpText;
046
047    /** The visibility flac. */
048    private boolean m_visible;
049
050    /**
051     * Constructor.<p>
052     *
053     * @param visible if visible
054     * @param active if active
055     * @param helpText the help text for visible but inactive apps
056     */
057    public CmsAppVisibilityStatus(boolean visible, boolean active, String helpText) {
058
059        m_visible = visible;
060        m_active = active;
061        m_helpText = helpText;
062    }
063
064    /**
065     * Returns the help text for visible but inactive apps.<p>
066     *
067     * @return the help text for visible but inactive apps
068     */
069    public String getHelpText() {
070
071        return m_helpText;
072    }
073
074    /**
075     * Returns if the app is active.<p>
076     *
077     * @return if active
078     */
079    public boolean isActive() {
080
081        return m_active;
082    }
083
084    /**
085     * Returns if the app is visible.<p>
086     *
087     * @return if visible
088     */
089    public boolean isVisible() {
090
091        return m_visible;
092    }
093
094}