View Javadoc
1   /*
2    * Copyright (c) 2002-2018, Mairie de 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.web.dto;
35  
36  import java.io.Serializable;
37  import java.sql.Date;
38  
39  import javax.validation.constraints.Min;
40  import javax.validation.constraints.NotNull;
41  import javax.validation.constraints.Size;
42  
43  import org.hibernate.validator.constraints.NotBlank;
44  
45  import fr.paris.lutece.plugins.appointment.business.rule.ReservationRule;
46  import fr.paris.lutece.portal.service.image.ImageResource;
47  import fr.paris.lutece.portal.service.rbac.RBACResource;
48  import fr.paris.lutece.portal.service.util.AppLogService;
49  import fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource;
50  
51  /**
52   * This is the DTO class for the object AppointmentForm
53   * 
54   * @author Laurent Payen
55   *
56   */
57  public final class AppointmentFormDTO extends ReservationRule implements RBACResource, AdminWorkgroupResource, Cloneable, Serializable
58  {
59      /**
60       * Name of the resource type of Appointment Forms
61       */
62      public static final String RESOURCE_TYPE = "APPOINTMENT_FORM";
63  
64      /**
65       * Name of the resource type of Appointment Forms
66       */
67      public static final String RESOURCE_TYPE_CREATE = "APPOINTMENT_FORM_CREATE";
68  
69      /**
70       * Serial version UID
71       */
72      private static final long serialVersionUID = 307685220867535209L;
73  
74      /**
75       * The title of the form
76       */
77      @NotBlank( message = "#i18n{appointment.validation.appointmentform.Title.notEmpty}" )
78      @Size( max = 255, message = "#i18n{appointment.validation.appointmentform.Title.size}" )
79      private String _strTitle;
80  
81      /**
82       * The description of the form
83       */
84      @NotBlank( message = "#i18n{appointment.validation.appointmentform.Description.notEmpty}" )
85      private String _strDescription;
86  
87      /**
88       * The starting time of a working day
89       */
90      @NotBlank( message = "#i18n{portal.validation.message.notEmpty}" )
91      private String _strTimeStart;
92  
93      /**
94       * The ending time of a working day
95       */
96      @NotBlank( message = "#i18n{portal.validation.message.notEmpty}" )
97      private String _strTimeEnd;
98  
99      /**
100      * The duration of an appointment
101      */
102     @NotNull( message = "#i18n{portal.validation.message.notEmpty}" )
103     @Min( value = 1, message = "#i18n{portal.validation.message.notEmpty}" )
104     private int _nDurationAppointments;
105 
106     /**
107      * The minimum time from now before a user can take an appointment
108      */
109     @NotNull( message = "#i18n{portal.validation.message.notEmpty}" )
110     @Min( value = 0, message = "#i18n{portal.validation.message.notEmpty}" )
111     private int _nMinTimeBeforeAppointment;
112 
113     /**
114      * True if it is open on Monday (checkbox)
115      */
116     private boolean _bIsOpenMonday;
117 
118     /**
119      * True if it is open on Tuesday (checkbox)
120      */
121     private boolean _bIsOpenTuesday;
122 
123     /**
124      * True if it is open on Wednesday (checkbox)
125      */
126     private boolean _bIsOpenWednesday;
127 
128     /**
129      * True if it is open on Thursday (checkbox)
130      */
131     private boolean _bIsOpenThursday;
132 
133     /**
134      * True if it is open on Friday (checkbox)
135      */
136     private boolean _bIsOpenFriday;
137 
138     /**
139      * True if it is open on Saturday (checkbox)
140      */
141     private boolean _bIsOpenSaturday;
142 
143     /**
144      * True if it is open on Sunday (checkbox)
145      */
146     private boolean _bIsOpenSunday;
147 
148     /**
149      * Starting validity date of the form
150      */
151     private Date _dateStartValidity;
152 
153     /**
154      * Ending validity date of the form
155      */
156     private Date _dateEndValidity;
157 
158     /**
159      * Date of modification of the form
160      */
161     private Date _dateOfModification;
162 
163     /**
164      * True if the form is active
165      */
166     private boolean _bIsActive;
167 
168     /**
169      * True if the title has to be displayed on the front office
170      */
171     private boolean _bDisplayTitleFo;
172 
173     /**
174      * True if the form has to be displayed on the front office portlet
175      */
176     private boolean _bIsDisplayOnPortlet = true;
177 
178     /**
179      * Number of weeks to display the form to the user
180      */
181     @NotNull( message = "#i18n{portal.validation.message.notEmpty}" )
182     @Min( value = 1, message = "#i18n{appointment.validation.appointmentform.NbWeeksToDisplay.notEmpty}" )
183     private int _nNbWeeksToDisplay = 1;
184 
185     /**
186      * True if the authentication is required
187      */
188     private boolean _bActiveAuthentication;
189 
190     /**
191      * The workflow Id
192      */
193     private int _nIdWorkflow;
194 
195     /**
196      * True if the captcha is enabled
197      */
198     private boolean _bEnableCaptcha;
199 
200     /**
201      * The Calendar Template Id
202      */
203     @Min( value = 1, message = "#i18n{portal.validation.message.notEmpty}" )
204     private int _nCalendarTemplateId;
205 
206     /**
207      * The Reference of the form (that will be in front of the reference appointment)
208      */
209     private String _strReference;
210 
211     /**
212      * True if the email is enabled
213      */
214     private boolean _bEnableMandatoryEmail;
215 
216     /**
217      * The icon of the form
218      */
219     private ImageResource _imageResource;
220 
221     /**
222      * The category of the form
223      */
224     private int _nIdCategory;
225 
226     /**
227      * Minimum of days between two appointments of a same user
228      */
229     private int _nNbDaysBeforeNewAppointment;
230 
231     /**
232      * Maximum appointments for a user on a given period
233      */
234     private int _nNbMaxAppointmentsPerUser;
235 
236     /**
237      * Number of days for the period for the the maximum appointments for a user
238      */
239     private int _nNbDaysForMaxAppointmentsPerUser;
240 
241     /**
242      * Workgroup of the form
243      */
244     private String _strWorkgroup;
245 
246     /**
247      * Longitude
248      */
249     private Double _dLongitude;
250 
251     /**
252      * Latitude
253      */
254     private Double _dLatitude;
255 
256     /**
257      * Address
258      */
259     private String _strAddress;
260 
261     /**
262      * Get the maximum number of appointments authorized for a same user
263      * 
264      * @return the maximum number
265      */
266     public int getNbMaxAppointmentsPerUser( )
267     {
268         return _nNbMaxAppointmentsPerUser;
269     }
270 
271     /**
272      * Set the maximum number of appointments authorized for a same user
273      * 
274      * @param nNbMaxAppointmentsPerUser
275      *            the maximum number of appointments to set
276      */
277     public void setNbMaxAppointmentsPerUser( int nNbMaxAppointmentsPerUser )
278     {
279         this._nNbMaxAppointmentsPerUser = nNbMaxAppointmentsPerUser;
280     }
281 
282     /**
283      * Get the number of days for the period of the maximum number of appointments authorized for a same user
284      * 
285      * @return the number of days of the period
286      */
287     public int getNbDaysForMaxAppointmentsPerUser( )
288     {
289         return _nNbDaysForMaxAppointmentsPerUser;
290     }
291 
292     /**
293      * Set the number of days of the period for the maximum number of appointments authorized for a same user
294      * 
295      * @param nNbDaysForMaxAppointmentsPerUser
296      *            the number of days to set
297      */
298     public void setNbDaysForMaxAppointmentsPerUser( int nNbDaysForMaxAppointmentsPerUser )
299     {
300         this._nNbDaysForMaxAppointmentsPerUser = nNbDaysForMaxAppointmentsPerUser;
301     }
302 
303     /**
304      * Returns the Title
305      * 
306      * @return The Title
307      */
308     public String getTitle( )
309     {
310         return _strTitle;
311     }
312 
313     /**
314      * Sets the Title
315      * 
316      * @param strTitle
317      *            The Title
318      */
319     public void setTitle( String strTitle )
320     {
321         _strTitle = strTitle;
322     }
323 
324     /**
325      * Get the date of modification of the form
326      * 
327      * @return the date of modification
328      */
329     public Date getDateOfModification( )
330     {
331         if ( _dateOfModification != null )
332         {
333             return (Date) _dateOfModification.clone( );
334         }
335         else
336         {
337             return null;
338         }
339     }
340 
341     /**
342      * Set the date of modification of the form
343      * 
344      * @param dateOfModification
345      *            the date to set
346      */
347     public void setDateOfModification( Date dateOfModification )
348     {
349         if ( dateOfModification != null )
350         {
351             this._dateOfModification = (Date) dateOfModification.clone( );
352         }
353         else
354         {
355             this._dateOfModification = null;
356         }
357     }
358 
359     /**
360      * Get the description of the appointment form
361      * 
362      * @return The description of the appointment form
363      */
364     public String getDescription( )
365     {
366         return _strDescription;
367     }
368 
369     /**
370      * Set the description of the appointment form
371      * 
372      * @param strDescription
373      *            The description of the appointment form
374      */
375     public void setDescription( String strDescription )
376     {
377         this._strDescription = strDescription;
378     }
379 
380     /**
381      * Returns the Reference of the form
382      * 
383      * @return The reference of the form
384      */
385     public String getReference( )
386     {
387         return _strReference;
388     }
389 
390     /**
391      * Sets the Reference of the form
392      * 
393      * @param the
394      *            reference to set
395      * 
396      */
397     public void setReference( String strRef )
398     {
399         _strReference = strRef;
400     }
401 
402     /**
403      * Returns the starting time of the working day of the form
404      * 
405      * @return The starting time
406      */
407     public String getTimeStart( )
408     {
409         return _strTimeStart;
410     }
411 
412     /**
413      * Sets the starting time of the working day of the form
414      * 
415      * @param the
416      *            starting time to set The TimeStart
417      */
418     public void setTimeStart( String timeStart )
419     {
420         _strTimeStart = timeStart;
421     }
422 
423     /**
424      * Returns the ending time of the working day of the form
425      * 
426      * @return The ending time
427      */
428     public String getTimeEnd( )
429     {
430         return _strTimeEnd;
431     }
432 
433     /**
434      * Sets the ending time of the working day of the form
435      * 
436      * @param the
437      *            ending time to set
438      */
439     public void setTimeEnd( String timeEnd )
440     {
441         _strTimeEnd = timeEnd;
442     }
443 
444     /**
445      * Returns the duration of an appointment
446      * 
447      * @return The duration of an appointment
448      */
449     public int getDurationAppointments( )
450     {
451         return _nDurationAppointments;
452     }
453 
454     /**
455      * Sets the duration of an appointment
456      * 
457      * @param nDurationAppointments
458      *            The Duration of an Appointments
459      */
460     public void setDurationAppointments( int nDurationAppointments )
461     {
462         _nDurationAppointments = nDurationAppointments;
463     }
464 
465     /**
466      * Get the minimum time from now before a user can take an appointment
467      * 
468      * @return
469      */
470     public int getMinTimeBeforeAppointment( )
471     {
472         return _nMinTimeBeforeAppointment;
473     }
474 
475     public void setMinTimeBeforeAppointment( int nMinTimeBeforeAppointment )
476     {
477         this._nMinTimeBeforeAppointment = nMinTimeBeforeAppointment;
478     }
479 
480     /**
481      * Returns if it is open on Monday (if the checkbox is checked or not)
482      * 
483      * @return true if it is open on Monday
484      */
485     public boolean getIsOpenMonday( )
486     {
487         return _bIsOpenMonday;
488     }
489 
490     /**
491      * Sets if it is open on Monday (if the checkbox is checked or not)
492      * 
493      * @param bIsOpenMonday
494      *            The boolean value
495      */
496     public void setIsOpenMonday( boolean bIsOpenMonday )
497     {
498         _bIsOpenMonday = bIsOpenMonday;
499     }
500 
501     /**
502      * Returns if it is open on Tuesday (if the checkbox is checked or not)
503      * 
504      * @return true if it is open on Tuesday
505      */
506     public boolean getIsOpenTuesday( )
507     {
508         return _bIsOpenTuesday;
509     }
510 
511     /**
512      * Sets if it is open on Tuesday (if the checkbox is checked or not)
513      * 
514      * @param bIsOpenTuesday
515      *            The boolean value
516      */
517     public void setIsOpenTuesday( boolean bIsOpenTuesday )
518     {
519         _bIsOpenTuesday = bIsOpenTuesday;
520     }
521 
522     /**
523      * Returns if it is open on Wednesday (if the checkbox is checked or not)
524      * 
525      * @return true if it is open on Wednesday
526      */
527     public boolean getIsOpenWednesday( )
528     {
529         return _bIsOpenWednesday;
530     }
531 
532     /**
533      * Sets if it is open on Wednesday (if the checkbox is checked or not)
534      * 
535      * @param bIsOpenWednesday
536      *            The boolean value
537      */
538     public void setIsOpenWednesday( boolean bIsOpenWednesday )
539     {
540         _bIsOpenWednesday = bIsOpenWednesday;
541     }
542 
543     /**
544      * Returns if it is open on Thursday (if the checkbox is checked or not)
545      * 
546      * @return true if it is open on Thursday
547      */
548     public boolean getIsOpenThursday( )
549     {
550         return _bIsOpenThursday;
551     }
552 
553     /**
554      * Sets if it is open on Thursday (if the checkbox is checked or not)
555      * 
556      * @param bIsOpenThursday
557      *            The boolean value
558      */
559     public void setIsOpenThursday( boolean bIsOpenThursday )
560     {
561         _bIsOpenThursday = bIsOpenThursday;
562     }
563 
564     /**
565      * Returns if it is open on Friday (if the checkbox is checked or not)
566      * 
567      * @return true if it is open on Friday
568      */
569     public boolean getIsOpenFriday( )
570     {
571         return _bIsOpenFriday;
572     }
573 
574     /**
575      * Sets if it is open on Friday (if the checkbox is checked or not)
576      * 
577      * @param bIsOpenFriday
578      *            The boolean value
579      */
580     public void setIsOpenFriday( boolean bIsOpenFriday )
581     {
582         _bIsOpenFriday = bIsOpenFriday;
583     }
584 
585     /**
586      * Returns if it is open on Saturday (if the checkbox is checked or not)
587      * 
588      * @return true if it is open on Saturday
589      */
590     public boolean getIsOpenSaturday( )
591     {
592         return _bIsOpenSaturday;
593     }
594 
595     /**
596      * Sets if it is open on Saturday (if the checkbox is checked or not)
597      * 
598      * @param bIsOpenSaturday
599      *            The boolean value
600      */
601     public void setIsOpenSaturday( boolean bIsOpenSaturday )
602     {
603         _bIsOpenSaturday = bIsOpenSaturday;
604     }
605 
606     /**
607      * Returns if it is open on Monday (if the checkbox is checked or not)
608      * 
609      * @return true if it is open on Sunday
610      */
611     public boolean getIsOpenSunday( )
612     {
613         return _bIsOpenSunday;
614     }
615 
616     /**
617      * Sets if it is open on Sunday (if the checkbox is checked or not)
618      * 
619      * @param bIsOpenSunday
620      *            The boolean value
621      */
622     public void setIsOpenSunday( boolean bIsOpenSunday )
623     {
624         _bIsOpenSunday = bIsOpenSunday;
625     }
626 
627     /**
628      * Returns the starting validity date of the form
629      * 
630      * @return The starting validity date of the form
631      */
632     public Date getDateStartValidity( )
633     {
634         if ( _dateStartValidity != null )
635         {
636             return (Date) _dateStartValidity.clone( );
637         }
638         else
639         {
640             return null;
641         }
642     }
643 
644     /**
645      * Sets the starting validity date of the form
646      * 
647      * @param dateStartValidity
648      *            The starting validity date
649      */
650     public void setDateStartValidity( Date dateStartValidity )
651     {
652         if ( dateStartValidity != null )
653         {
654             this._dateStartValidity = (Date) dateStartValidity.clone( );
655         }
656         else
657         {
658             this._dateStartValidity = null;
659         }
660     }
661 
662     /**
663      * Returns the ending validity date of the form
664      * 
665      * @return The ending validity date
666      */
667     public Date getDateEndValidity( )
668     {
669         if ( _dateEndValidity != null )
670         {
671             return (Date) _dateEndValidity.clone( );
672         }
673         else
674         {
675             return null;
676         }
677     }
678 
679     /**
680      * Sets the ending validity date of the form
681      * 
682      * @param dateEndValidity
683      *            the ending validity date to set
684      */
685     public void setDateEndValidity( Date dateEndValidity )
686     {
687         if ( dateEndValidity != null )
688         {
689             this._dateEndValidity = (Date) dateEndValidity.clone( );
690         }
691         else
692         {
693             this._dateEndValidity = null;
694         }
695     }
696 
697     /**
698      * Returns if the form is active or not
699      * 
700      * @return true if the form is active
701      */
702     public boolean getIsActive( )
703     {
704         return _bIsActive;
705     }
706 
707     /**
708      * Sets if the form is active or not
709      * 
710      * @param bIsActive
711      *            The boolean value
712      */
713     public void setIsActive( boolean bIsActive )
714     {
715         _bIsActive = bIsActive;
716     }
717 
718     /**
719      * Returns if the title of the form has to be displayed on the front office
720      * 
721      * @return true if it has to be displayed
722      */
723     public boolean getDisplayTitleFo( )
724     {
725         return _bDisplayTitleFo;
726     }
727 
728     /**
729      * Sets if the title of the form has to be displayed on the front office
730      * 
731      * @param bDisplayTitleFo
732      *            The boolean value
733      */
734     public void setDisplayTitleFo( boolean bDisplayTitleFo )
735     {
736         _bDisplayTitleFo = bDisplayTitleFo;
737     }
738 
739     /**
740      * Returns if the form has to be displayed on the front office portlet
741      * 
742      * @return true if it has to be displayed
743      */
744     public boolean getIsDisplayedOnPortlet( )
745     {
746         return _bIsDisplayOnPortlet;
747     }
748 
749     /**
750      * Sets if the form has to be displayed on the front office portlet
751      * 
752      * @param bIsDisplayedOnPortlet
753      *            The boolean value
754      */
755     public void setIsDisplayedOnPortlet( boolean bIsDisplayedOnPortlet )
756     {
757         this._bIsDisplayOnPortlet = bIsDisplayedOnPortlet;
758     }
759 
760     /**
761      * Returns the number of weeks to display the form to the user (for an appointment)
762      * 
763      * @return The number of weeks to display
764      */
765     public int getNbWeeksToDisplay( )
766     {
767         return _nNbWeeksToDisplay;
768     }
769 
770     /**
771      * Sets the number of weeks to display the form to the user (for an appointment)
772      * 
773      * @param nNbWeeksToDisplay
774      *            the number of weeks to display the form
775      */
776     public void setNbWeeksToDisplay( int nNbWeeksToDisplay )
777     {
778         _nNbWeeksToDisplay = nNbWeeksToDisplay;
779     }
780 
781     /**
782      * Get the id of the workflow associated with this appointment form
783      * 
784      * @return The id of the workflow
785      */
786     public int getIdWorkflow( )
787     {
788         return _nIdWorkflow;
789     }
790 
791     /**
792      * Set the id of the workflow associated with this appointment form
793      * 
794      * @param nIdWorkflow
795      *            The id of the workflow
796      */
797     public void setIdWorkflow( int nIdWorkflow )
798     {
799         _nIdWorkflow = nIdWorkflow;
800     }
801 
802     /**
803      * Check if the captcha is enabled for this appointment form
804      * 
805      * @return True if the captcha is enabled, false otherwise
806      */
807     public boolean getEnableCaptcha( )
808     {
809         return _bEnableCaptcha;
810     }
811 
812     /**
813      * Enable or disable the captcha for this appointment form
814      * 
815      * @param bEnableCaptcha
816      *            True to enable the captcha, false to disable it
817      */
818     public void setEnableCaptcha( boolean bEnableCaptcha )
819     {
820         this._bEnableCaptcha = bEnableCaptcha;
821     }
822 
823     /**
824      * Get the id of the calendar template of this appointment form
825      * 
826      * @return The id of the calendar template of this appointment form
827      */
828     public int getCalendarTemplateId( )
829     {
830         return _nCalendarTemplateId;
831     }
832 
833     /**
834      * Set the id of the calendar template of this appointment form
835      * 
836      * @param nCalendarTemplateId
837      *            The id of the calendar template of this appointment form
838      */
839     public void setCalendarTemplateId( int nCalendarTemplateId )
840     {
841         _nCalendarTemplateId = nCalendarTemplateId;
842     }
843 
844     /**
845      * Check if the email is mandatory or not
846      * 
847      * @return true if enable mandatory email
848      */
849     public boolean getEnableMandatoryEmail( )
850     {
851         return _bEnableMandatoryEmail;
852     }
853 
854     /**
855      * Set enable mandatory email
856      * 
857      * @param bEnableMandatoryEmail
858      *            the boolean value for mandatory email
859      */
860     public void setEnableMandatoryEmail( boolean bEnableMandatoryEmail )
861     {
862         this._bEnableMandatoryEmail = bEnableMandatoryEmail;
863     }
864 
865     /**
866      * Get the Icon of the form
867      * 
868      * @return the icon of the form
869      */
870     public ImageResource getIcon( )
871     {
872         return _imageResource;
873     }
874 
875     /**
876      * Set the icon of the form
877      * 
878      * @param imgIcon
879      *            the icon to associate to the form
880      */
881     public void setIcon( ImageResource imgIcon )
882     {
883         this._imageResource = imgIcon;
884     }
885 
886     /**
887      * Get the number of days between two appointments of the same user
888      * 
889      * @return the delay in days
890      */
891     public int getNbDaysBeforeNewAppointment( )
892     {
893         return _nNbDaysBeforeNewAppointment;
894     }
895 
896     /**
897      * Set the number of days between two appointments of the same user (0 : no delay)
898      * 
899      * @param nNbDaysBeforeNewAppointment
900      *            the number of days to set
901      */
902     public void setNbDaysBeforeNewAppointment( int nNbDaysBeforeNewAppointment )
903     {
904         this._nNbDaysBeforeNewAppointment = nNbDaysBeforeNewAppointment;
905     }
906 
907     /**
908      * Get the category of the form
909      * 
910      * @return the category of the form
911      */
912     public int getIdCategory( )
913     {
914         return _nIdCategory;
915     }
916 
917     /**
918      * Set the category of the form
919      * 
920      * @param nIdCategory
921      *            the category to set
922      */
923     public void setIdCategory( int nIdCategory )
924     {
925         _nIdCategory = nIdCategory;
926     }
927 
928     /**
929      * Get the authentication
930      * 
931      * @return true if the authentication is required
932      */
933     public boolean getActiveAuthentication( )
934     {
935         return _bActiveAuthentication;
936     }
937 
938     /**
939      * Set the authentication of the form
940      * 
941      * @param _bActiveAuthentication
942      *            the boolean value for the authentication
943      */
944     public void setActiveAuthentication( boolean bActiveAuthentication )
945     {
946         this._bActiveAuthentication = bActiveAuthentication;
947     }
948 
949     /**
950      * Get latitude
951      * 
952      * @return latitude
953      */
954     public Double getLatitude( )
955     {
956         return _dLatitude;
957     }
958 
959     /**
960      * Set latitude
961      * 
962      * @param dLatitude
963      *            latitude
964      */
965     public void setLatitude( Double dLatitude )
966     {
967         this._dLatitude = dLatitude;
968     }
969 
970     /**
971      * Get longitude
972      * 
973      * @return longitude
974      */
975     public Double getLongitude( )
976     {
977         return _dLongitude;
978     }
979 
980     /**
981      * Set longitude
982      * 
983      * @param dLongitude
984      *            longitude
985      */
986     public void setLongitude( Double dLongitude )
987     {
988         this._dLongitude = dLongitude;
989     }
990 
991     /**
992      * Get address
993      * 
994      * @return address
995      */
996     public String getAddress( )
997     {
998         return _strAddress;
999     }
1000 
1001     /**
1002      * Set address
1003      * 
1004      * @param strAddress
1005      *            address
1006      */
1007     public void setAddress( String strAddress )
1008     {
1009         this._strAddress = strAddress;
1010     }
1011 
1012     /**
1013      * {@inheritDoc}
1014      */
1015     @Override
1016     public String getResourceTypeCode( )
1017     {
1018         return RESOURCE_TYPE;
1019     }
1020 
1021     /**
1022      * {@inheritDoc}
1023      */
1024     @Override
1025     public String getResourceId( )
1026     {
1027         return Integer.toString( getIdForm( ) );
1028     }
1029 
1030     /**
1031      * {@inheritDoc}
1032      */
1033     @Override
1034     public Object clone( )
1035     {
1036         try
1037         {
1038             return super.clone( );
1039         }
1040         catch( CloneNotSupportedException e )
1041         {
1042             AppLogService.error( e.getMessage( ), e );
1043 
1044             return null;
1045         }
1046     }
1047 
1048     @Override
1049     public String getWorkgroup( )
1050     {
1051         return _strWorkgroup;
1052     }
1053 
1054     /**
1055      * set the work group associate to the form
1056      * 
1057      * @param workGroup
1058      *            the work group associate to the form
1059      */
1060     public void setWorkgroup( String workGroup )
1061     {
1062         _strWorkgroup = workGroup;
1063     }
1064 
1065 }