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.gwt.shared; 029 030import com.google.gwt.user.client.rpc.IsSerializable; 031 032/** 033 * Bean representing an entry in the quick launch menu.<p> 034 */ 035public class CmsQuickLaunchData implements IsSerializable { 036 037 /** Default URL (may be null). */ 038 private String m_defaultUrl; 039 040 /** Content for error alert box. */ 041 private String m_errorMessage; 042 043 /** Title for error alert box. */ 044 private String m_errorTitle; 045 046 /** The icon URL. */ 047 private String m_iconUrl; 048 049 /** True if this is a legacy tool (necessary because the icons for legacy tools are smaller). */ 050 private boolean m_legacy; 051 052 /** Flag to force page reload. */ 053 private boolean m_reload; 054 055 /** User readable title of the quick launch item. */ 056 private String m_title; 057 058 /** Additional button style classes. */ 059 private String m_buttonStyle; 060 061 /** 062 * Creates a new instance.<p> 063 * 064 * @param defaultUrl the default URL 065 * @param title the title 066 * @param iconUrl the icon URL 067 * @param buttonStyle the additional button style classes 068 * @param errorTitle the title for the error alert box 069 * @param errorMessage the content for the error alert box 070 * @param legacy true if this is a legacy dialog 071 * @param reload true if the page should just be reloaded when this is selected 072 */ 073 public CmsQuickLaunchData( 074 075 String defaultUrl, 076 String title, 077 String iconUrl, 078 String buttonStyle, 079 String errorTitle, 080 String errorMessage, 081 boolean legacy, 082 boolean reload) { 083 084 m_title = title; 085 m_defaultUrl = defaultUrl; 086 m_iconUrl = iconUrl; 087 m_buttonStyle = buttonStyle; 088 m_legacy = legacy; 089 m_reload = reload; 090 m_errorTitle = errorTitle; 091 m_errorMessage = errorMessage; 092 093 } 094 095 /** 096 * Default constructor for serialization.<p> 097 */ 098 protected CmsQuickLaunchData() { 099 // Default constructor for serialization 100 } 101 102 /** 103 * Returns the additional button style classes.<p> 104 * 105 * @return the additional button style classes 106 */ 107 public String getButtonStyle() { 108 109 return m_buttonStyle; 110 } 111 112 /** 113 * Returns the defaultUrl.<p> 114 * 115 * @return the defaultUrl 116 */ 117 public String getDefaultUrl() { 118 119 return m_defaultUrl; 120 } 121 122 /** 123 * Gets the error message.<p> 124 * 125 * @return the error message 126 */ 127 public String getErrorMessage() { 128 129 return m_errorMessage; 130 } 131 132 /** 133 * Gets the title for the error alert box.<p> 134 * 135 * @return the title for the error alert box 136 */ 137 public String getErrorTitle() { 138 139 return m_errorTitle; 140 } 141 142 /** 143 * Returns the iconUrl.<p> 144 * 145 * @return the iconUrl 146 */ 147 public String getIconUrl() { 148 149 return m_iconUrl; 150 } 151 152 /** 153 * Returns the title.<p> 154 * 155 * @return the title 156 */ 157 public String getTitle() { 158 159 return m_title; 160 } 161 162 /** 163 * Returns true if this item opens a legacy dialog.<p> 164 * 165 * @return true if this item opens a legacy dialog 166 */ 167 public boolean isLegacy() { 168 169 return m_legacy; 170 } 171 172 /** 173 * Return true if the page should be reloaded when this is selected.<p> 174 * 175 * @return true if the page should be reloaded 176 */ 177 public boolean isReload() { 178 179 return m_reload; 180 } 181 182 /** 183 * Sets the 'reload' flag.<p> 184 * 185 * @param reload the new value for the 'reload' flag 186 */ 187 public void setReload(boolean reload) { 188 189 m_reload = reload; 190 } 191 192}