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