View Javadoc
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.calendar;
35  
36  import java.io.Serializable;
37  
38  import javax.validation.constraints.NotBlank;
39  import javax.validation.constraints.Size;
40  
41  /**
42   * The business class of the Calendar Template
43   * 
44   * @author Laurent Payen
45   *
46   */
47  public final class CalendarTemplate implements Serializable
48  {
49  
50      public static final String CALENDAR = "Calendrier";
51  
52      public static final String FREE_SLOTS_GROUPED = "Liste des creneaux disponible regroupés";
53      public static final String CALENDAR_OPEN_DAYS = "Calendrier jours ouverts";
54      public static final String FREE_SLOTS = "Liste des creneaux disponibles";
55      public static final String FREE_SLOTS_ON_OPEN_DAYS = "Liste des creneaux disponibles jours ouverts";
56  
57      /**
58       * Serial version UID
59       */
60      private static final long serialVersionUID = 8029294463873867355L;
61  
62      /**
63       * Calendar Template Id
64       */
65      private int _nIdCalendarTemplate;
66  
67      /**
68       * Calendar Title
69       */
70      @NotBlank( message = "#i18n{appointment.calendarTemplate.labelTitleBlank}" )
71      @Size( max = 255, message = "#i18n{appointment.labelTemplatePathSize}" )
72      private String _strTitle;
73  
74      /**
75       * Calendar Description
76       */
77      @NotBlank( message = "#i18n{appointment.calendarTemplate.labelDescriptionBlank}" )
78      @Size( max = 255, message = "#i18n{appointment.calendarTemplate.labelDescriptionSize}" )
79      private String _strDescription;
80  
81      /**
82       * Path for the template
83       */
84      @NotBlank( message = "#i18n{appointment.calendarTemplate.labelTemplatePathBlank}" )
85      @Size( max = 255, message = "#i18n{appointment.labelTemplatePathSize}" )
86      private String _strTemplatePath;
87  
88      /**
89       * Get the id of the template
90       * 
91       * @return The id of the template
92       */
93      public int getIdCalendarTemplate( )
94      {
95          return _nIdCalendarTemplate;
96      }
97  
98      /**
99       * Set the id of the template
100      * 
101      * @param nId
102      *            The id of the template
103      */
104     public void setIdCalendarTemplate( int nIdCalendarTemplate )
105     {
106         this._nIdCalendarTemplate = nIdCalendarTemplate;
107     }
108 
109     /**
110      * Get the title of the template
111      * 
112      * @return The title of the template
113      */
114     public String getTitle( )
115     {
116         return _strTitle;
117     }
118 
119     /**
120      * Set the title of the template
121      * 
122      * @param strTitle
123      *            The title of the template
124      */
125     public void setTitle( String strTitle )
126     {
127         this._strTitle = strTitle;
128     }
129 
130     /**
131      * Get the description of the template
132      * 
133      * @return The description of the template
134      */
135     public String getDescription( )
136     {
137         return _strDescription;
138     }
139 
140     /**
141      * Set the description of the template
142      * 
143      * @param strDescription
144      *            The description of the template
145      */
146     public void setDescription( String strDescription )
147     {
148         this._strDescription = strDescription;
149     }
150 
151     /**
152      * Get the path of the file of the template
153      * 
154      * @return The path of the file of the template
155      */
156     public String getTemplatePath( )
157     {
158         return _strTemplatePath;
159     }
160 
161     /**
162      * Set the path of the file of the template
163      * 
164      * @param strTemplatePath
165      *            The path of the file of the template
166      */
167     public void setTemplatePath( String strTemplatePath )
168     {
169         this._strTemplatePath = strTemplatePath;
170     }
171 }