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.ade.sitemap.shared; 029 030import org.opencms.gwt.shared.property.CmsClientProperty; 031import org.opencms.util.CmsUUID; 032 033import java.util.List; 034import java.util.Map; 035 036import com.google.gwt.user.client.rpc.IsSerializable; 037 038/** 039 * Data used for the property editor in the sitemap editor's locale comparison view.<p> 040 */ 041public class CmsLocaleComparePropertyData implements IsSerializable { 042 043 /** The default file id. */ 044 private CmsUUID m_defaultFileId; 045 046 /** The default file properties. */ 047 private Map<String, CmsClientProperty> m_defaultFileProperties; 048 049 /** The forbidden URL names. */ 050 private List<String> m_forbiddenUrlNames; 051 052 /** True if the entry has an editable file name. */ 053 private boolean m_hasEditableName; 054 055 /** The id. */ 056 private CmsUUID m_id; 057 058 /** The inherited properties. */ 059 private Map<String, CmsClientProperty> m_inheritedProperties; 060 061 /** True if the entry is a folder. */ 062 private boolean m_isFolder; 063 064 /** The current file name. */ 065 private String m_name; 066 067 /** The folder properties. */ 068 private Map<String, CmsClientProperty> m_ownProperties; 069 070 /** The path. */ 071 private String m_path; 072 073 /** 074 * Default constructor.<p> 075 * 076 * Creates a new, empty instance. 077 */ 078 public CmsLocaleComparePropertyData() { 079 // do nothing 080 081 } 082 083 /** 084 * Returns the defaultFileId.<p> 085 * 086 * @return the defaultFileId 087 */ 088 public CmsUUID getDefaultFileId() { 089 090 return m_defaultFileId; 091 } 092 093 /** 094 * Returns the defaultFileProperties.<p> 095 * 096 * @return the defaultFileProperties 097 */ 098 public Map<String, CmsClientProperty> getDefaultFileProperties() { 099 100 return m_defaultFileProperties; 101 } 102 103 /** 104 * Gets the list of forbidden url names.<p> 105 * 106 * @return the list of forbidden url names 107 */ 108 public List<String> getForbiddenUrlNames() { 109 110 return m_forbiddenUrlNames; 111 } 112 113 /** 114 * Gets the structure id of the entry to edit.<p> 115 * 116 * @return the structure id of the entry to edit 117 */ 118 public CmsUUID getId() { 119 120 return m_id; 121 } 122 123 /** 124 * Gets the inherited property with the given name , or null if none exist.<p> 125 * 126 * @param name the property name 127 * @return the inherited property 128 */ 129 public CmsClientProperty getInheritedProperty(String name) { 130 131 return m_inheritedProperties.get(name); 132 } 133 134 /** 135 * Gets the current name.<p> 136 * 137 * @return the current name 138 */ 139 public String getName() { 140 141 return m_name; 142 } 143 144 /** 145 * Returns the ownProperties.<p> 146 * 147 * @return the ownProperties 148 */ 149 public Map<String, CmsClientProperty> getOwnProperties() { 150 151 return m_ownProperties; 152 } 153 154 /** 155 * Returns the path.<p> 156 * 157 * @return the path 158 */ 159 public String getPath() { 160 161 return m_path; 162 } 163 164 /** 165 * Returns tree if the entry has an editable name.<p> 166 * 167 * @return true if the entry has an editable name 168 */ 169 public boolean hasEditableName() { 170 171 return m_hasEditableName; 172 } 173 174 /** 175 * Returns the isFolder.<p> 176 * 177 * @return the isFolder 178 */ 179 public boolean isFolder() { 180 181 return m_isFolder; 182 } 183 184 /** 185 * Sets the defaultFileId.<p> 186 * 187 * @param defaultFileId the defaultFileId to set 188 */ 189 public void setDefaultFileId(CmsUUID defaultFileId) { 190 191 m_defaultFileId = defaultFileId; 192 } 193 194 /** 195 * Sets the defaultFileProperties.<p> 196 * 197 * @param defaultFileProperties the defaultFileProperties to set 198 */ 199 public void setDefaultFileProperties(Map<String, CmsClientProperty> defaultFileProperties) { 200 201 m_defaultFileProperties = defaultFileProperties; 202 } 203 204 /** 205 * Sets the isFolder.<p> 206 * 207 * @param isFolder the isFolder to set 208 */ 209 public void setFolder(boolean isFolder) { 210 211 m_isFolder = isFolder; 212 } 213 214 /** 215 * Sets the forbiddenUrlNames.<p> 216 * 217 * @param forbiddenUrlNames the forbiddenUrlNames to set 218 */ 219 public void setForbiddenUrlNames(List<String> forbiddenUrlNames) { 220 221 m_forbiddenUrlNames = forbiddenUrlNames; 222 } 223 224 /** 225 * Enables / disables editing of the file name.<p> 226 * 227 * @param editable true if the file name should be editable 228 */ 229 public void setHasEditableName(boolean editable) { 230 231 m_hasEditableName = editable; 232 } 233 234 /** 235 * Sets the structure id of the entry to edit.<p> 236 * 237 * @param id the id 238 */ 239 public void setId(CmsUUID id) { 240 241 m_id = id; 242 } 243 244 /** 245 * Sets the inherited properties.<p> 246 * 247 * @param inheritedProps the inherited properties 248 */ 249 public void setInheritedProperties(Map<String, CmsClientProperty> inheritedProps) { 250 251 m_inheritedProperties = inheritedProps; 252 253 } 254 255 /** 256 * Sets the name.<p> 257 * 258 * @param name the name 259 */ 260 public void setName(String name) { 261 262 m_name = name; 263 } 264 265 /** 266 * Sets the ownProperties.<p> 267 * 268 * @param ownProperties the ownProperties to set 269 */ 270 public void setOwnProperties(Map<String, CmsClientProperty> ownProperties) { 271 272 m_ownProperties = ownProperties; 273 } 274 275 /** 276 * Sets the path.<p> 277 * 278 * @param path the path to set 279 */ 280 public void setPath(String path) { 281 282 m_path = path; 283 } 284 285}