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.sitemanager;
029
030import org.opencms.security.CmsRole;
031import org.opencms.ui.CmsCssIcon;
032import org.opencms.ui.apps.A_CmsWorkplaceAppConfiguration;
033import org.opencms.ui.apps.CmsWorkplaceAppManager;
034import org.opencms.ui.apps.I_CmsWorkplaceApp;
035import org.opencms.ui.apps.Messages;
036
037import java.util.Locale;
038
039import com.vaadin.server.Resource;
040
041/**
042 * Configuration class for the site management app.<p>
043 */
044
045public class CmsSiteManagerConfiguration extends A_CmsWorkplaceAppConfiguration {
046
047    /** The app id. */
048    public static final String APP_ID = "site-management";
049
050    /** The app icon resource (size 32x32). */
051    public static final CmsCssIcon ICON = new CmsCssIcon("oc-icon-32-site");
052
053    /**
054     * @see org.opencms.ui.apps.A_CmsWorkplaceAppConfiguration#getAppCategory()
055     */
056    @Override
057    public String getAppCategory() {
058
059        return CmsWorkplaceAppManager.ADMINISTRATION_CATEGORY_ID;
060    }
061
062    /**
063     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getAppInstance()
064     */
065    public I_CmsWorkplaceApp getAppInstance() {
066
067        return new CmsSiteManager();
068    }
069
070    /**
071     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getHelpText(java.util.Locale)
072     */
073    @Override
074    public String getHelpText(Locale locale) {
075
076        return Messages.get().getBundle(locale).key(Messages.GUI_SITE_MANAGER_HELP_0);
077    }
078
079    /**
080     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getIcon()
081     */
082    public Resource getIcon() {
083
084        return ICON;
085    }
086
087    /**
088     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getId()
089     */
090    public String getId() {
091
092        return APP_ID;
093    }
094
095    /**
096     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getName(java.util.Locale)
097     */
098    @Override
099    public String getName(Locale locale) {
100
101        return Messages.get().getBundle(locale).key(Messages.GUI_SITE_MANAGER_TITLE_0);
102    }
103
104    /**
105     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getOrder()
106     */
107    @Override
108    public int getOrder() {
109
110        return 30;
111    }
112
113    /**
114     * @see org.opencms.ui.apps.A_CmsWorkplaceAppConfiguration#getRequiredRole()
115     */
116    @Override
117    public CmsRole getRequiredRole() {
118
119        return CmsRole.ROOT_ADMIN;
120    }
121}