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.linkvalidation;
029
030import org.opencms.ui.apps.A_CmsWorkplaceAppConfiguration;
031import org.opencms.ui.apps.I_CmsWorkplaceApp;
032import org.opencms.ui.apps.Messages;
033
034import java.util.Locale;
035
036import com.vaadin.server.Resource;
037
038/**
039 * Configuration for Link Validation app.<p>
040 */
041public class CmsLinkValidationConfiguration extends A_CmsWorkplaceAppConfiguration {
042
043    /** The app id. */
044    public static final String APP_ID = "link-validation";
045
046    /**
047     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getAppCategory()
048     */
049    @Override
050    public String getAppCategory() {
051
052        return CmsLinkValidationFolder.ID;
053    }
054
055    /**
056     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getAppInstance()
057     */
058    public I_CmsWorkplaceApp getAppInstance() {
059
060        return new CmsLinkValidationApp();
061    }
062
063    /**
064     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getButtonStyle()
065     */
066    @Override
067    public String getButtonStyle() {
068
069        return null;
070    }
071
072    /**
073     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getHelpText(java.util.Locale)
074     */
075    @Override
076    public String getHelpText(Locale locale) {
077
078        return Messages.get().getBundle(locale).key(Messages.GUI_LINKVALIDATION_CHECK_INTERNAL_LINK_HELP_0);
079    }
080
081    /**
082     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getIcon()
083     */
084    public Resource getIcon() {
085
086        return CmsLinkValidationFolder.ICON;
087    }
088
089    /**
090     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getId()
091     */
092    public String getId() {
093
094        return APP_ID;
095    }
096
097    /**
098     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getName(java.util.Locale)
099     */
100    @Override
101    public String getName(Locale locale) {
102
103        return Messages.get().getBundle(locale).key(Messages.GUI_LINKVALIDATION_CHECK_INTERNAL_LINK_NAME_0);
104    }
105
106    /**
107     * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getOrder()
108     */
109    @Override
110    public int getOrder() {
111
112        return 1;
113    }
114}