1 /* 2 * Copyright (c) 2002-2022, City of Paris 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * 1. Redistributions of source code must retain the above copyright notice 10 * and the following disclaimer. 11 * 12 * 2. Redistributions in binary form must reproduce the above copyright notice 13 * and the following disclaimer in the documentation and/or other materials 14 * provided with the distribution. 15 * 16 * 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its 17 * contributors may be used to endorse or promote products derived from 18 * this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 * 32 * License 1.0 33 */ 34 package fr.paris.lutece.plugins.appointment.business.message; 35 36 import java.io.Serializable; 37 38 /** 39 * Business class of the Form Message 40 * 41 * @author Laurent Payen 42 * 43 */ 44 public final class FormMessage implements Serializable 45 { 46 47 /** 48 * Serial version UID 49 */ 50 private static final long serialVersionUID = 8770406931955371701L; 51 52 /** 53 * Form Message ID 54 */ 55 private int _nIdFormMessage; 56 57 /** 58 * Title of the page of the calendar in FO 59 */ 60 private String _strCalendarTitle; 61 62 /** 63 * Title of the first name field in the form page in FO 64 */ 65 private String _strFieldFirstNameTitle; 66 67 /** 68 * Help message of the first name field in the form page in FO 69 */ 70 private String _strFieldFirstNameHelp; 71 72 /** 73 * Title of the last name field in the form page in FO 74 */ 75 private String _strFieldLastNameTitle; 76 77 /** 78 * Help message of the last name field in the form page in FO 79 */ 80 private String _strFieldLastNameHelp; 81 82 /** 83 * Title of the email field in the form page in FO 84 */ 85 private String _strFieldEmailTitle; 86 87 /** 88 * Help message of the email field in the form page in FO 89 */ 90 private String _strFieldEmailHelp; 91 92 /** 93 * Field confirmation email 94 */ 95 private String _strFieldConfirmationEmail; 96 97 /** 98 * Field confirmation email help 99 */ 100 private String _strFieldConfirmationEmailHelp; 101 102 /** 103 * URL to redirect the user to after creation of an appointment 104 */ 105 private String _strUrlRedirectAfterCreation; 106 107 /** 108 * Text to display to the user after the creation of an appointment 109 */ 110 private String _strTextAppointmentCreated; 111 112 /** 113 * Text to display to the user after the canceling of an appointment 114 */ 115 private String _strTextAppointmentCanceled; 116 117 /** 118 * Label of the button after the creation of an appointment 119 */ 120 private String _strLabelButtonRedirection; 121 122 /** 123 * Message to display when there is no available slot for the associated form 124 */ 125 private String _strNoAvailableSlot; 126 127 /** 128 * Calendar description 129 */ 130 private String _strCalendarDescription; 131 132 /** 133 * Label that indicates that a slot is open for reservation 134 */ 135 private String _strCalendarReserveLabel; 136 137 /** 138 * Label that indicates that a slot is full 139 */ 140 private String _strCalendarFullLabel; 141 142 /** 143 * Form Id (foreign Key) 144 */ 145 private int _nIdForm; 146 147 /** 148 * Get the Form Message Id 149 * 150 * @return the FOrm Message Id 151 */ 152 public int getIdFormMessage( ) 153 { 154 return _nIdFormMessage; 155 } 156 157 /** 158 * Set the Form Message Id 159 * 160 * @param nIdFormMessage 161 * the Id to set 162 */ 163 public void setIdFormMessage( int nIdFormMessage ) 164 { 165 this._nIdFormMessage = nIdFormMessage; 166 } 167 168 /** 169 * Get the title of the page of the calendar in FO 170 * 171 * @return the title of the page of the calendar in FO 172 */ 173 public String getCalendarTitle( ) 174 { 175 return _strCalendarTitle; 176 } 177 178 /** 179 * Set the title of the page of the calendar in FO 180 * 181 * @param strCalendarTitle 182 * The title of the page of the calendar in FO 183 */ 184 public void setCalendarTitle( String strCalendarTitle ) 185 { 186 this._strCalendarTitle = strCalendarTitle; 187 } 188 189 /** 190 * Get the title of the first name field in the form page in FO 191 * 192 * @return The title of the first name field in the form page in FO 193 */ 194 public String getFieldFirstNameTitle( ) 195 { 196 return _strFieldFirstNameTitle; 197 } 198 199 /** 200 * Set the title of the first name field in the form page in FO 201 * 202 * @param strFieldFirstNameTitle 203 * The title of the first name field in the form page in FO 204 */ 205 public void setFieldFirstNameTitle( String strFieldFirstNameTitle ) 206 { 207 this._strFieldFirstNameTitle = strFieldFirstNameTitle; 208 } 209 210 /** 211 * Get the help message of the first name field in the form page in FO 212 * 213 * @return The help message of the first name field in the form page in FO 214 */ 215 public String getFieldFirstNameHelp( ) 216 { 217 return _strFieldFirstNameHelp; 218 } 219 220 /** 221 * Set the help message of the first name field in the form page in FO 222 * 223 * @param strFieldFirstNameHelp 224 * The help message of the first name field in the form page in FO 225 */ 226 public void setFieldFirstNameHelp( String strFieldFirstNameHelp ) 227 { 228 this._strFieldFirstNameHelp = strFieldFirstNameHelp; 229 } 230 231 /** 232 * Get the title of the last name field in the form page in FO 233 * 234 * @return The title of the last name field in the form page in FO 235 */ 236 public String getFieldLastNameTitle( ) 237 { 238 return _strFieldLastNameTitle; 239 } 240 241 /** 242 * Set the title of the last name field in the form page in FO 243 * 244 * @param strFieldLastNameTitle 245 * The title of the last name field in the form page in FO 246 */ 247 public void setFieldLastNameTitle( String strFieldLastNameTitle ) 248 { 249 this._strFieldLastNameTitle = strFieldLastNameTitle; 250 } 251 252 /** 253 * Get the help message of the last name field in the form page in FO 254 * 255 * @return The help message of the last name field in the form page in FO 256 */ 257 public String getFieldLastNameHelp( ) 258 { 259 return _strFieldLastNameHelp; 260 } 261 262 /** 263 * Get the help message of the last name field in the form page in FO 264 * 265 * @param strFieldLastNameHelp 266 * The help message of the last name field in the form page in FO 267 */ 268 public void setFieldLastNameHelp( String strFieldLastNameHelp ) 269 { 270 this._strFieldLastNameHelp = strFieldLastNameHelp; 271 } 272 273 /** 274 * Get the title of the email field in the form page in FO 275 * 276 * @return The title of the email field in the form page in FO 277 */ 278 public String getFieldEmailTitle( ) 279 { 280 return _strFieldEmailTitle; 281 } 282 283 /** 284 * Set the title of the email field in the form page in FO 285 * 286 * @param strFieldEmailTitle 287 * The title of the email field in the form page in FO 288 */ 289 public void setFieldEmailTitle( String strFieldEmailTitle ) 290 { 291 this._strFieldEmailTitle = strFieldEmailTitle; 292 } 293 294 /** 295 * Get the help message of the email field in the form page in FO 296 * 297 * @return The help message of the email field in the form page in FO 298 */ 299 public String getFieldEmailHelp( ) 300 { 301 return _strFieldEmailHelp; 302 } 303 304 /** 305 * Set the help message of the email field in the form page in FO 306 * 307 * @param strFieldEmailHelp 308 * The help message of the email field in the form page in FO 309 */ 310 public void setFieldEmailHelp( String strFieldEmailHelp ) 311 { 312 this._strFieldEmailHelp = strFieldEmailHelp; 313 } 314 315 /** 316 * Get Field confirmation email 317 * 318 * @return The field of confirmation email 319 */ 320 public String getFieldConfirmationEmail( ) 321 { 322 return _strFieldConfirmationEmail; 323 } 324 325 /** 326 * Set field confirmation email 327 * 328 * @param strFieldConfirmationEmail 329 */ 330 public void setFieldConfirmationEmail( String strFieldConfirmationEmail ) 331 { 332 this._strFieldConfirmationEmail = strFieldConfirmationEmail; 333 } 334 335 /** 336 * Get field confirmation email help 337 * 338 * @return The confirmation email help 339 */ 340 public String getFieldConfirmationEmailHelp( ) 341 { 342 return _strFieldConfirmationEmailHelp; 343 } 344 345 /** 346 * Set the field email confirmation help 347 * 348 * @param fieldConfirmationEmailHelp 349 */ 350 public void setFieldConfirmationEmailHelp( String fieldConfirmationEmailHelp ) 351 { 352 this._strFieldConfirmationEmailHelp = fieldConfirmationEmailHelp; 353 } 354 355 /** 356 * Get the URL to redirect the user to after creation of an appointment 357 * 358 * @return The URL to redirect the user to after creation of an appointment 359 */ 360 public String getUrlRedirectAfterCreation( ) 361 { 362 return _strUrlRedirectAfterCreation; 363 } 364 365 /** 366 * Set the URL to redirect the user to after creation of an appointment 367 * 368 * @param strUrlRedirectAfterCreation 369 * The URL to redirect the user to after creation of an appointment 370 */ 371 public void setUrlRedirectAfterCreation( String strUrlRedirectAfterCreation ) 372 { 373 this._strUrlRedirectAfterCreation = strUrlRedirectAfterCreation; 374 } 375 376 /** 377 * Get the text to display to the user after the creation of an appointment and before he is redirected to a given URL 378 * 379 * @return The text to display to the user after the creation of an appointment 380 */ 381 public String getTextAppointmentCreated( ) 382 { 383 return _strTextAppointmentCreated; 384 } 385 386 /** 387 * Set the text to display to the user after the creation of an appointment 388 * 389 * @param strTextAppointmentCreated 390 * The text to display to the user after the creation of an appointment 391 */ 392 public void setTextAppointmentCreated( String strTextAppointmentCreated ) 393 { 394 this._strTextAppointmentCreated = strTextAppointmentCreated; 395 } 396 397 /** 398 * Get the text to display to the user after the canceling of an appointment 399 * 400 * @return The text to display to the user after the canceling of an appointment 401 */ 402 public String getTextAppointmentCanceled( ) 403 { 404 return _strTextAppointmentCanceled; 405 } 406 407 /** 408 * Set the text to display to the user after the canceling of an appointment 409 * 410 * @param strTextAppointmentCanceled 411 * The text to display to the user after the canceling of an appointment 412 */ 413 public void setTextAppointmentCanceled( String strTextAppointmentCanceled ) 414 { 415 this._strTextAppointmentCanceled = strTextAppointmentCanceled; 416 } 417 418 /** 419 * Get the label of the button after the creation of an appointment 420 * 421 * @return The label of the button after the creation of an appointment 422 */ 423 public String getLabelButtonRedirection( ) 424 { 425 return _strLabelButtonRedirection; 426 } 427 428 /** 429 * Set the label of the button after the creation of an appointment 430 * 431 * @param strLabelButtonRedirection 432 * The label of the button after the creation of an appointment 433 */ 434 public void setLabelButtonRedirection( String strLabelButtonRedirection ) 435 { 436 this._strLabelButtonRedirection = strLabelButtonRedirection; 437 } 438 439 /** 440 * Get the message to display when there is no available slot for the associated form 441 * 442 * @return the message to display when there is no available slot 443 */ 444 public String getNoAvailableSlot( ) 445 { 446 return _strNoAvailableSlot; 447 } 448 449 /** 450 * Set the message to display when there is no available slot for the associated form 451 * 452 * @param strNoAvailableSlot 453 * The message to display when there is no available slot 454 */ 455 public void setNoAvailableSlot( String strNoAvailableSlot ) 456 { 457 this._strNoAvailableSlot = strNoAvailableSlot; 458 } 459 460 /** 461 * Get the calendar description 462 * 463 * @return The calendar description 464 */ 465 public String getCalendarDescription( ) 466 { 467 return _strCalendarDescription; 468 } 469 470 /** 471 * Set the calendar description 472 * 473 * @param strCalendarDescription 474 * The calendar description 475 */ 476 public void setCalendarDescription( String strCalendarDescription ) 477 { 478 this._strCalendarDescription = strCalendarDescription; 479 } 480 481 /** 482 * Get the label that indicates that a slot is open for reservation 483 * 484 * @return The label that indicates that a slot is open for reservation 485 */ 486 public String getCalendarReserveLabel( ) 487 { 488 return _strCalendarReserveLabel; 489 } 490 491 /** 492 * Set the label that indicates that a slot is open for reservation 493 * 494 * @param strCalendarReserveLabel 495 * The label that indicates that a slot is open for reservation 496 */ 497 public void setCalendarReserveLabel( String strCalendarReserveLabel ) 498 { 499 this._strCalendarReserveLabel = strCalendarReserveLabel; 500 } 501 502 /** 503 * Get the label that indicates that a slot is full 504 * 505 * @return The label that indicates that a slot is full 506 */ 507 public String getCalendarFullLabel( ) 508 { 509 return _strCalendarFullLabel; 510 } 511 512 /** 513 * Set the label that indicates that a slot is full 514 * 515 * @param strCalendarFullLabel 516 * The label that indicates that a slot is full 517 */ 518 public void setCalendarFullLabel( String strCalendarFullLabel ) 519 { 520 this._strCalendarFullLabel = strCalendarFullLabel; 521 } 522 523 /** 524 * Return the id of the associated form 525 * 526 * @return The id of the associated form 527 */ 528 public int getIdForm( ) 529 { 530 return _nIdForm; 531 } 532 533 /** 534 * Set the id of the associated form 535 * 536 * @param nIdForm 537 * The id of the associated form 538 */ 539 public void setIdForm( int nIdForm ) 540 { 541 _nIdForm = nIdForm; 542 } 543 }