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