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 GmbH & Co. KG, 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.workplace.administration;
029
030import org.opencms.jsp.CmsJspActionElement;
031import org.opencms.workplace.CmsWorkplaceSettings;
032import org.opencms.workplace.tools.CmsToolDialog;
033
034import javax.servlet.http.HttpServletRequest;
035
036/**
037 * Helper class to create the administration frameset.<p>
038 *
039 * It allows to specify if you want or not an left side menu.<p>
040 *
041 * The following files use this class:<br>
042 * <ul>
043 * <li>/views/admin/external-fs.jsp</li>
044 * <li>/views/admin/admin-fs.jsp</li>
045 * </ul>
046 * <p>
047 *
048 * @since 6.0.0
049 */
050public class CmsAdminFrameset extends CmsToolDialog {
051
052    /** Request parameter name for the "with menu" flag. */
053    public static final String PARAM_MENU = "menu";
054
055    /** Request parameter value. */
056    private String m_paramMenu;
057
058    /**
059     * Public constructor.<p>
060     *
061     * @param jsp an initialized JSP action element
062     */
063    public CmsAdminFrameset(CmsJspActionElement jsp) {
064
065        super(jsp);
066    }
067
068    /**
069     * Returns the menu parameter value.<p>
070     *
071     * @return the menu parameter value
072     */
073    public String getParamMenu() {
074
075        return m_paramMenu;
076    }
077
078    /**
079     * Sets the menu parameter value.<p>
080     *
081     * @param paramMenu the menu parameter value to set
082     */
083    public void setParamMenu(String paramMenu) {
084
085        m_paramMenu = paramMenu;
086    }
087
088    /**
089     * Tests if the current dialog should be displayed with or without menu.<p>
090     *
091     * The default is with menu, use <code>menu=no</code> for avoiding it.<p>
092     *
093     * @return <code>true</code> if the dialog should be displayed with menu
094     */
095    public boolean withMenu() {
096
097        return (getParamMenu() == null) || !getParamMenu().equals("no");
098    }
099
100    /**
101     * @see org.opencms.workplace.CmsWorkplace#initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
102     */
103    @Override
104    protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) {
105
106        // fill the parameter values in the get/set methods
107        fillParamValues(request);
108    }
109
110}