1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.appointment.web.dto;
35
36 import java.sql.Date;
37
38 import javax.validation.constraints.Min;
39 import javax.validation.constraints.NotBlank;
40 import javax.validation.constraints.NotNull;
41 import javax.validation.constraints.Size;
42
43 import fr.paris.lutece.plugins.appointment.business.rule.ReservationRule;
44 import fr.paris.lutece.portal.service.image.ImageResource;
45 import fr.paris.lutece.portal.service.rbac.RBACResource;
46 import fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource;
47
48
49
50
51
52
53
54 public final class AppointmentFormDTO extends ReservationRule implements RBACResource, AdminWorkgroupResource
55 {
56
57
58
59 public static final String RESOURCE_TYPE = "APPOINTMENT_FORM";
60
61
62
63
64 public static final String RESOURCE_TYPE_CREATE = "APPOINTMENT_FORM_CREATE";
65
66
67
68
69 private static final long serialVersionUID = 307685220867535209L;
70
71
72
73
74 @NotBlank( message = "#i18n{appointment.validation.appointmentform.Title.notEmpty}" )
75 @Size( max = 255, message = "#i18n{appointment.validation.appointmentform.Title.size}" )
76 private String _strTitle;
77
78
79
80
81 @NotBlank( message = "#i18n{appointment.validation.appointmentform.Description.notEmpty}" )
82 private String _strDescription;
83
84
85
86
87 private String _strTimeStart;
88
89
90
91
92 private String _strTimeEnd;
93
94
95
96
97 @NotNull( message = "#i18n{portal.validation.message.notEmpty}" )
98 @Min( value = 0, message = "#i18n{portal.validation.message.notEmpty}" )
99 private int _nMinTimeBeforeAppointment;
100
101
102
103
104 private boolean _bIsOpenMonday;
105
106
107
108
109 private boolean _bIsOpenTuesday;
110
111
112
113
114 private boolean _bIsOpenWednesday;
115
116
117
118
119 private boolean _bIsOpenThursday;
120
121
122
123
124 private boolean _bIsOpenFriday;
125
126
127
128
129 private boolean _bIsOpenSaturday;
130
131
132
133
134 private boolean _bIsOpenSunday;
135
136
137
138
139 private Date _dateStartValidity;
140
141
142
143
144 private Date _dateEndValidity;
145
146
147
148
149 private Date _dateOfModification;
150
151
152
153
154 private boolean _bIsActive;
155
156
157
158
159 private boolean _bDisplayTitleFo;
160
161
162
163
164 private boolean _bIsDisplayOnPortlet = true;
165
166
167
168
169 @NotNull( message = "#i18n{portal.validation.message.notEmpty}" )
170 @Min( value = 1, message = "#i18n{appointment.validation.appointmentform.NbWeeksToDisplay.notEmpty}" )
171 private int _nNbWeeksToDisplay = 1;
172
173
174
175
176 private boolean _bActiveAuthentication;
177
178
179
180
181 private int _nIdWorkflow;
182
183
184
185
186 private boolean _bEnableCaptcha;
187
188
189
190
191 @Min( value = 1, message = "#i18n{portal.validation.message.notEmpty}" )
192 private int _nCalendarTemplateId;
193
194
195
196
197 private String _strReference;
198
199
200
201
202 private boolean _bEnableMandatoryEmail;
203
204
205
206
207 private ImageResource _imageResource;
208
209
210
211
212 private int _nIdCategory;
213
214
215
216
217 private int _nNbDaysBeforeNewAppointment;
218
219
220
221
222 private int _nNbMaxAppointmentsPerUser;
223
224
225
226
227 private int _nNbDaysForMaxAppointmentsPerUser;
228
229
230
231
232 private String _strWorkgroup;
233
234
235
236
237 private Double _dLongitude;
238
239
240
241
242 private Double _dLatitude;
243
244
245
246
247 private String _strAddress;
248
249
250
251 private boolean _bBoOverbooking;
252
253
254
255 private boolean _bIsMultislotAppointment;
256
257
258
259
260 @NotNull( message = "#i18n{portal.validation.message.notEmpty}" )
261 @Min( value = 1, message = "#i18n{portal.validation.message.notEmpty}" )
262 private int _nNbConsecutiveSlots = 1;
263
264
265
266
267 private String _strRole;
268
269
270
271
272 @Min( value = 1, message = "#i18n{portal.validation.message.notEmpty}" )
273 private int _nCapacityPerSlot = 1;
274
275
276
277
278 private boolean _bIsAnonymizable;
279
280
281
282
283 private String _strAnonymizationPattern;
284
285
286
287
288
289
290 public int getNbMaxAppointmentsPerUser( )
291 {
292 return _nNbMaxAppointmentsPerUser;
293 }
294
295
296
297
298
299
300
301 public void setNbMaxAppointmentsPerUser( int nNbMaxAppointmentsPerUser )
302 {
303 this._nNbMaxAppointmentsPerUser = nNbMaxAppointmentsPerUser;
304 }
305
306
307
308
309
310
311 public int getNbDaysForMaxAppointmentsPerUser( )
312 {
313 return _nNbDaysForMaxAppointmentsPerUser;
314 }
315
316
317
318
319
320
321
322 public void setNbDaysForMaxAppointmentsPerUser( int nNbDaysForMaxAppointmentsPerUser )
323 {
324 this._nNbDaysForMaxAppointmentsPerUser = nNbDaysForMaxAppointmentsPerUser;
325 }
326
327
328
329
330
331
332 public String getTitle( )
333 {
334 return _strTitle;
335 }
336
337
338
339
340
341
342
343 public void setTitle( String strTitle )
344 {
345 _strTitle = strTitle;
346 }
347
348
349
350
351
352
353 public Date getDateOfModification( )
354 {
355 if ( _dateOfModification != null )
356 {
357 return (Date) _dateOfModification.clone( );
358 }
359 else
360 {
361 return null;
362 }
363 }
364
365
366
367
368
369
370
371 public void setDateOfModification( Date dateOfModification )
372 {
373 if ( dateOfModification != null )
374 {
375 this._dateOfModification = (Date) dateOfModification.clone( );
376 }
377 else
378 {
379 this._dateOfModification = null;
380 }
381 }
382
383
384
385
386
387
388 public String getDescription( )
389 {
390 return _strDescription;
391 }
392
393
394
395
396
397
398
399 public void setDescription( String strDescription )
400 {
401 this._strDescription = strDescription;
402 }
403
404
405
406
407
408
409 public String getReference( )
410 {
411 return _strReference;
412 }
413
414
415
416
417
418
419
420
421 public void setReference( String strRef )
422 {
423 _strReference = strRef;
424 }
425
426
427
428
429
430
431 public String getTimeStart( )
432 {
433 return _strTimeStart;
434 }
435
436
437
438
439
440
441
442 public void setTimeStart( String timeStart )
443 {
444 _strTimeStart = timeStart;
445 }
446
447
448
449
450
451
452 public String getTimeEnd( )
453 {
454 return _strTimeEnd;
455 }
456
457
458
459
460
461
462
463 public void setTimeEnd( String timeEnd )
464 {
465 _strTimeEnd = timeEnd;
466 }
467
468
469
470
471
472
473 public int getMinTimeBeforeAppointment( )
474 {
475 return _nMinTimeBeforeAppointment;
476 }
477
478 public void setMinTimeBeforeAppointment( int nMinTimeBeforeAppointment )
479 {
480 this._nMinTimeBeforeAppointment = nMinTimeBeforeAppointment;
481 }
482
483
484
485
486
487
488 public boolean getIsOpenMonday( )
489 {
490 return _bIsOpenMonday;
491 }
492
493
494
495
496
497
498
499 public void setIsOpenMonday( boolean bIsOpenMonday )
500 {
501 _bIsOpenMonday = bIsOpenMonday;
502 }
503
504
505
506
507
508
509 public boolean getIsOpenTuesday( )
510 {
511 return _bIsOpenTuesday;
512 }
513
514
515
516
517
518
519
520 public void setIsOpenTuesday( boolean bIsOpenTuesday )
521 {
522 _bIsOpenTuesday = bIsOpenTuesday;
523 }
524
525
526
527
528
529
530 public boolean getIsOpenWednesday( )
531 {
532 return _bIsOpenWednesday;
533 }
534
535
536
537
538
539
540
541 public void setIsOpenWednesday( boolean bIsOpenWednesday )
542 {
543 _bIsOpenWednesday = bIsOpenWednesday;
544 }
545
546
547
548
549
550
551 public boolean getIsOpenThursday( )
552 {
553 return _bIsOpenThursday;
554 }
555
556
557
558
559
560
561
562 public void setIsOpenThursday( boolean bIsOpenThursday )
563 {
564 _bIsOpenThursday = bIsOpenThursday;
565 }
566
567
568
569
570
571
572 public boolean getIsOpenFriday( )
573 {
574 return _bIsOpenFriday;
575 }
576
577
578
579
580
581
582
583 public void setIsOpenFriday( boolean bIsOpenFriday )
584 {
585 _bIsOpenFriday = bIsOpenFriday;
586 }
587
588
589
590
591
592
593 public boolean getIsOpenSaturday( )
594 {
595 return _bIsOpenSaturday;
596 }
597
598
599
600
601
602
603
604 public void setIsOpenSaturday( boolean bIsOpenSaturday )
605 {
606 _bIsOpenSaturday = bIsOpenSaturday;
607 }
608
609
610
611
612
613
614 public boolean getIsOpenSunday( )
615 {
616 return _bIsOpenSunday;
617 }
618
619
620
621
622
623
624
625 public void setIsOpenSunday( boolean bIsOpenSunday )
626 {
627 _bIsOpenSunday = bIsOpenSunday;
628 }
629
630
631
632
633
634
635 public Date getDateStartValidity( )
636 {
637 if ( _dateStartValidity != null )
638 {
639 return (Date) _dateStartValidity.clone( );
640 }
641 else
642 {
643 return null;
644 }
645 }
646
647
648
649
650
651
652
653 public void setDateStartValidity( Date dateStartValidity )
654 {
655 if ( dateStartValidity != null )
656 {
657 this._dateStartValidity = (Date) dateStartValidity.clone( );
658 }
659 else
660 {
661 this._dateStartValidity = null;
662 }
663 }
664
665
666
667
668
669
670 public Date getDateEndValidity( )
671 {
672 if ( _dateEndValidity != null )
673 {
674 return (Date) _dateEndValidity.clone( );
675 }
676 else
677 {
678 return null;
679 }
680 }
681
682
683
684
685
686
687
688 public void setDateEndValidity( Date dateEndValidity )
689 {
690 if ( dateEndValidity != null )
691 {
692 this._dateEndValidity = (Date) dateEndValidity.clone( );
693 }
694 else
695 {
696 this._dateEndValidity = null;
697 }
698 }
699
700
701
702
703
704
705 public boolean getIsActive( )
706 {
707 return _bIsActive;
708 }
709
710
711
712
713
714
715
716 public void setIsActive( boolean bIsActive )
717 {
718 _bIsActive = bIsActive;
719 }
720
721
722
723
724
725
726 public boolean getDisplayTitleFo( )
727 {
728 return _bDisplayTitleFo;
729 }
730
731
732
733
734
735
736
737 public void setDisplayTitleFo( boolean bDisplayTitleFo )
738 {
739 _bDisplayTitleFo = bDisplayTitleFo;
740 }
741
742
743
744
745
746
747 public boolean getIsDisplayedOnPortlet( )
748 {
749 return _bIsDisplayOnPortlet;
750 }
751
752
753
754
755
756
757
758 public void setIsDisplayedOnPortlet( boolean bIsDisplayedOnPortlet )
759 {
760 this._bIsDisplayOnPortlet = bIsDisplayedOnPortlet;
761 }
762
763
764
765
766
767
768 public int getNbWeeksToDisplay( )
769 {
770 return _nNbWeeksToDisplay;
771 }
772
773
774
775
776
777
778
779 public void setNbWeeksToDisplay( int nNbWeeksToDisplay )
780 {
781 _nNbWeeksToDisplay = nNbWeeksToDisplay;
782 }
783
784
785
786
787
788
789 public int getIdWorkflow( )
790 {
791 return _nIdWorkflow;
792 }
793
794
795
796
797
798
799
800 public void setIdWorkflow( int nIdWorkflow )
801 {
802 _nIdWorkflow = nIdWorkflow;
803 }
804
805
806
807
808
809
810 public boolean getEnableCaptcha( )
811 {
812 return _bEnableCaptcha;
813 }
814
815
816
817
818
819
820
821 public void setEnableCaptcha( boolean bEnableCaptcha )
822 {
823 this._bEnableCaptcha = bEnableCaptcha;
824 }
825
826
827
828
829
830
831 public int getCalendarTemplateId( )
832 {
833 return _nCalendarTemplateId;
834 }
835
836
837
838
839
840
841
842 public void setCalendarTemplateId( int nCalendarTemplateId )
843 {
844 _nCalendarTemplateId = nCalendarTemplateId;
845 }
846
847
848
849
850
851
852 public boolean getEnableMandatoryEmail( )
853 {
854 return _bEnableMandatoryEmail;
855 }
856
857
858
859
860
861
862
863 public void setEnableMandatoryEmail( boolean bEnableMandatoryEmail )
864 {
865 this._bEnableMandatoryEmail = bEnableMandatoryEmail;
866 }
867
868
869
870
871
872
873 public ImageResource getIcon( )
874 {
875 return _imageResource;
876 }
877
878
879
880
881
882
883
884 public void setIcon( ImageResource imgIcon )
885 {
886 this._imageResource = imgIcon;
887 }
888
889
890
891
892
893
894 public int getNbDaysBeforeNewAppointment( )
895 {
896 return _nNbDaysBeforeNewAppointment;
897 }
898
899
900
901
902
903
904
905 public void setNbDaysBeforeNewAppointment( int nNbDaysBeforeNewAppointment )
906 {
907 this._nNbDaysBeforeNewAppointment = nNbDaysBeforeNewAppointment;
908 }
909
910
911
912
913
914
915 public int getIdCategory( )
916 {
917 return _nIdCategory;
918 }
919
920
921
922
923
924
925
926 public void setIdCategory( int nIdCategory )
927 {
928 _nIdCategory = nIdCategory;
929 }
930
931
932
933
934
935
936 public boolean getActiveAuthentication( )
937 {
938 return _bActiveAuthentication;
939 }
940
941
942
943
944
945
946
947 public void setActiveAuthentication( boolean bActiveAuthentication )
948 {
949 this._bActiveAuthentication = bActiveAuthentication;
950 }
951
952
953
954
955
956
957 public Double getLatitude( )
958 {
959 return _dLatitude;
960 }
961
962
963
964
965
966
967
968 public void setLatitude( Double dLatitude )
969 {
970 this._dLatitude = dLatitude;
971 }
972
973
974
975
976
977
978 public Double getLongitude( )
979 {
980 return _dLongitude;
981 }
982
983
984
985
986
987
988
989 public void setLongitude( Double dLongitude )
990 {
991 this._dLongitude = dLongitude;
992 }
993
994
995
996
997
998
999 public String getAddress( )
1000 {
1001 return _strAddress;
1002 }
1003
1004
1005
1006
1007
1008
1009
1010 public void setAddress( String strAddress )
1011 {
1012 this._strAddress = strAddress;
1013 }
1014
1015
1016
1017
1018 @Override
1019 public String getResourceTypeCode( )
1020 {
1021 return RESOURCE_TYPE;
1022 }
1023
1024
1025
1026
1027 @Override
1028 public String getResourceId( )
1029 {
1030 return Integer.toString( getIdForm( ) );
1031 }
1032
1033 @Override
1034 public String getWorkgroup( )
1035 {
1036 return _strWorkgroup;
1037 }
1038
1039
1040
1041
1042
1043
1044
1045 public void setWorkgroup( String workGroup )
1046 {
1047 _strWorkgroup = workGroup;
1048 }
1049
1050
1051
1052
1053
1054
1055 public boolean getBoOverbooking( )
1056 {
1057 return _bBoOverbooking;
1058 }
1059
1060
1061
1062
1063
1064
1065
1066 public void setBoOverbooking( boolean bBoOverbooking )
1067 {
1068 _bBoOverbooking = bBoOverbooking;
1069 }
1070
1071
1072
1073
1074
1075
1076 public boolean getIsMultislotAppointment( )
1077 {
1078 return _bIsMultislotAppointment;
1079 }
1080
1081
1082
1083
1084
1085
1086
1087 public void setIsMultislotAppointment( boolean bIsMultislotAppointment )
1088 {
1089 _bIsMultislotAppointment = bIsMultislotAppointment;
1090 }
1091
1092
1093
1094
1095
1096
1097 public int getNbConsecutiveSlots( )
1098 {
1099 return _nNbConsecutiveSlots;
1100 }
1101
1102
1103
1104
1105
1106
1107
1108 public void setNbConsecutiveSlots( int nbConsecutiveSlots )
1109 {
1110 this._nNbConsecutiveSlots = nbConsecutiveSlots;
1111 }
1112
1113
1114
1115
1116 public String getRole( )
1117 {
1118 return _strRole;
1119 }
1120
1121
1122
1123
1124
1125 public void setRole( String strRole )
1126 {
1127 _strRole = strRole;
1128 }
1129
1130
1131
1132
1133
1134
1135 public int getCapacityPerSlot( )
1136 {
1137 return _nCapacityPerSlot;
1138 }
1139
1140
1141
1142
1143
1144
1145
1146 public void setCapacityPerSlot( int nCapacityPerSlot )
1147 {
1148 _nCapacityPerSlot = nCapacityPerSlot;
1149 }
1150
1151 public String getAnonymizationPattern() {
1152 return _strAnonymizationPattern;
1153 }
1154
1155 public void setAnonymizationPattern(String strAnonymizationPattern) {
1156 _strAnonymizationPattern = strAnonymizationPattern;
1157 }
1158
1159 public boolean isAnonymizable()
1160 {
1161 return _bIsAnonymizable;
1162 }
1163
1164 public void setAnonymizable(boolean bIsAnonymizable)
1165 {
1166 this._bIsAnonymizable = bIsAnonymizable;
1167 }
1168
1169 }