001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (C) Alkacon Software (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.client.alias; 029 030import org.opencms.ade.sitemap.client.Messages; 031import org.opencms.gwt.shared.alias.CmsAliasImportResult; 032 033/** 034 * Message accessor collection for the alias editor.<p> 035 */ 036public final class CmsAliasMessages { 037 038 /** 039 * Hide constructor.<p> 040 */ 041 private CmsAliasMessages() { 042 043 // do nothing 044 } 045 046 /** 047 * Message accessor.<p> 048 * 049 * @param result an alias import result 050 * 051 * @return the message text 052 */ 053 public static String messageAliasImportLine(CmsAliasImportResult result) { 054 055 if ((result.getAliasPath() == null) || (result.getTargetPath() == null)) { 056 return result.getLine(); 057 } else { 058 return Messages.get().key( 059 Messages.GUI_ALIASES_IMPORT_LINE_2, 060 result.getAliasPath(), 061 result.getTargetPath()); 062 } 063 } 064 065 /** 066 * Message accessor.<p> 067 * 068 * @param lockOwner the lock owner 069 * 070 * @return the message text 071 */ 072 public static String messageAliasTableLocked(String lockOwner) { 073 074 return Messages.get().key(Messages.GUI_ALIASES_TABLE_LOCKED_1, lockOwner); 075 } 076 077 /** 078 * Message accessor.<p> 079 * 080 * @return the message text 081 */ 082 public static String messageAliasTableLockedTitle() { 083 084 return Messages.get().key(Messages.GUI_ALIASES_TABLE_LOCKED_TITLE_0); 085 } 086 087 /** 088 * Message accessor.<p> 089 * 090 * @return the message text 091 */ 092 public static String messageButtonCancel() { 093 094 return Messages.get().key(Messages.GUI_ALIASES_BUTTON_CANCEL_0); 095 } 096 097 /** 098 * Message accessor.<p> 099 * 100 * @return the message text 101 */ 102 public static String messageButtonDelete() { 103 104 return Messages.get().key(Messages.GUI_ALIASES_BUTTON_DELETE_0); 105 } 106 107 /** 108 * Message accessor.<p> 109 * 110 * @return the message text 111 */ 112 public static String messageButtonDownload() { 113 114 return Messages.get().key(Messages.GUI_ALIASES_BUTTON_DOWNLOAD_0); 115 } 116 117 /** 118 * Message accessor.<p> 119 * 120 * @return the message text 121 */ 122 public static String messageButtonSave() { 123 124 return Messages.get().key(Messages.GUI_ALIASES_BUTTON_SAVE_0); 125 } 126 127 /** 128 * Message accessor.<p> 129 * 130 * @return the message text 131 */ 132 public static String messageButtonSelectFile() { 133 134 return Messages.get().key(Messages.GUI_ALIASES_BUTTON_SELECT_FILE_0); 135 } 136 137 /** 138 * Message accessor.<p> 139 * 140 * @return the message text 141 */ 142 public static String messageButtonSubmit() { 143 144 return Messages.get().key(Messages.GUI_ALIASES_BUTTON_IMPORT_0); 145 } 146 147 /** 148 * Message accessor.<p> 149 * 150 * @return the message text 151 */ 152 public static String messageButtonUpload() { 153 154 return Messages.get().key(Messages.GUI_ALIASES_BUTTON_UPLOAD_0); 155 } 156 157 /** 158 * Message accessor.<p> 159 * 160 * @return the message text 161 */ 162 public static String messageColumnAlias() { 163 164 return Messages.get().key(Messages.GUI_ALIASES_COLUMN_ALIAS_0); 165 } 166 167 /** 168 * Message accessor.<p> 169 * 170 * @return the message text 171 */ 172 public static String messageColumnError() { 173 174 return Messages.get().key(Messages.GUI_ALIASES_COLUMN_ERROR_0); 175 } 176 177 /** 178 * Message accessor.<p> 179 * 180 * @return the message text 181 */ 182 public static String messageColumnMode() { 183 184 return Messages.get().key(Messages.GUI_ALIASES_COLUMN_MODE_0); 185 } 186 187 /** 188 * Message accessor.<p> 189 * 190 * @return the message text 191 */ 192 public static String messageColumnPath() { 193 194 return Messages.get().key(Messages.GUI_ALIASES_COLUMN_PATH_0); 195 } 196 197 /** 198 * Message accessor.<p> 199 * 200 * @return the message text 201 */ 202 public static String messageColumnPattern() { 203 204 return Messages.get().key(Messages.GUI_ALIASES_COLUMN_PATTERN_0); 205 } 206 207 /** 208 * Message accessor.<p> 209 * 210 * @return the message text 211 */ 212 public static String messageColumnReplacement() { 213 214 return Messages.get().key(Messages.GUI_ALIASES_COLUMN_REPLACEMENT_0); 215 } 216 217 /** 218 * Message accessor.<p> 219 * 220 * @return the message text 221 */ 222 public static String messageColumnSelect() { 223 224 return Messages.get().key(Messages.GUI_ALIASES_COLUMN_SELECT_0); 225 } 226 227 /** 228 * Message accessor.<p> 229 * 230 * @return the message text 231 */ 232 public static String messageContextMenuEditAliases() { 233 234 return Messages.get().key(Messages.GUI_ALIASES_CONTEXT_MENU_EDIT_0); 235 236 //return "Edit aliases"; 237 } 238 239 /** 240 * Message accessor.<p> 241 * 242 * @return the message text 243 */ 244 public static String messageEditAliasesNotPermitted() { 245 246 return Messages.get().key(Messages.GUI_ALIAS_EDITING_NOT_PERMITTED_0); 247 248 } 249 250 /** 251 * Message accessor.<p> 252 * 253 * @return the message text 254 */ 255 public static String messageImportSeparator() { 256 257 return Messages.get().key(Messages.GUI_ALIAS_FIELD_SEPARATOR_0); 258 } 259 260 /** 261 * Message accessor.<p> 262 * 263 * @return the message text 264 */ 265 public static String messageLabelRegex() { 266 267 return messageColumnPattern() + ":"; 268 } 269 270 /** 271 * Message accessor.<p> 272 * 273 * @return the message text 274 */ 275 public static String messageLabelReplacement() { 276 277 return messageColumnReplacement() + ":"; 278 } 279 280 /** 281 * Message accessor.<p> 282 * 283 * @return the message text 284 */ 285 public static String messageLegendNewRewrite() { 286 287 return Messages.get().key(Messages.GUI_ALIASES_LEGEND_NEW_REWRITE_0); 288 } 289 290 /** 291 * Message accessor.<p> 292 * 293 * @return the message text 294 */ 295 public static String messageLegendRewriteTable() { 296 297 return Messages.get().key(Messages.GUI_ALIASES_LEGEND_REWRITE_TABLE_0); 298 } 299 300 /** 301 * Message accessor.<p> 302 * 303 * @return the message text 304 */ 305 public static String messageNewAliasActionLabel() { 306 307 return messageColumnMode() + ":"; 308 } 309 310 /** 311 * Message accessor.<p> 312 * 313 * @return the message text 314 */ 315 public static String messageNewAliasLabel() { 316 317 return messageColumnAlias() + ":"; 318 } 319 320 /** 321 * Message accessor.<p> 322 * 323 * @return the message text 324 */ 325 public static String messageNewAliasTargetLabel() { 326 327 return messageColumnPath() + ":"; 328 } 329 330 /** 331 * Message accessor.<p> 332 * 333 * @return the message text 334 */ 335 public static String messageNewFieldsetLegend() { 336 337 return Messages.get().key(Messages.GUI_ALIASES_NEW_BOX_LEGEND_0); 338 } 339 340 /** 341 * Message accessor.<p> 342 * 343 * @return the message text 344 */ 345 public static String messagePage() { 346 347 return Messages.get().key(Messages.GUI_ALIASES_MODE_PAGE_0); 348 } 349 350 /** 351 * Message accessor.<p> 352 * 353 * @return the message text 354 */ 355 public static String messagePassthrough() { 356 357 return Messages.get().key(Messages.GUI_ALIASES_PASSTHROUGH_0); 358 } 359 360 /** 361 * Message accessor.<p> 362 * 363 * @return the message text 364 */ 365 public static String messagePermanentRedirect() { 366 367 return Messages.get().key(Messages.GUI_ALIASES_MODE_PERMANENT_0); 368 } 369 370 /** 371 * Message accessor.<p> 372 * 373 * @return the message text 374 */ 375 public static String messageRedirect() { 376 377 return Messages.get().key(Messages.GUI_ALIASES_MODE_REDIRECT_0); 378 } 379 380 /** 381 * Message accessor.<p> 382 * 383 * @param newRowCount the alias row count 384 * 385 * @return the message text 386 */ 387 public static String messageRowCount(int newRowCount) { 388 389 return Messages.get().key(Messages.GUI_ALIASES_COUNT_1, "" + newRowCount); 390 } 391 392 /** 393 * Message accessor.<p> 394 * 395 * @return the message text 396 */ 397 public static String messagesEmptyImportResult() { 398 399 return Messages.get().key(Messages.GUI_ALIASES_IMPORT_EMPTY_0); 400 } 401 402 /** 403 * Message accessor.<p> 404 * 405 * @return the message text 406 */ 407 public static String messageStatusError() { 408 409 return Messages.get().key(Messages.GUI_ALIASES_STATUS_ERROR_0); 410 } 411 412 /** 413 * Message accessor.<p> 414 * 415 * @return the message text 416 */ 417 public static String messageStatusOk() { 418 419 return Messages.get().key(Messages.GUI_ALIASES_STATUS_OK_0); 420 } 421 422 /** 423 * Message accessor.<p> 424 * 425 * @return the message text 426 */ 427 public static String messageTableFieldsetLegend() { 428 429 return Messages.get().key(Messages.GUI_ALIASES_TABLE_BOX_LEGEND_0); 430 } 431 432 /** 433 * Message accessor.<p> 434 * 435 * @return the message text 436 */ 437 public static String messageTitleAliasEditor() { 438 439 return Messages.get().key(Messages.GUI_ALIASES_TITLE_EDITOR_0); 440 } 441 442 /** 443 * Message accessor.<p> 444 * 445 * @return the message text 446 */ 447 public static String messageTitleImport() { 448 449 return Messages.get().key(Messages.GUI_ALIASES_TITLE_IMPORT_0); 450 } 451 452}