1 /*
2 * Copyright (c) 2002-2020, 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.participatorybudget.business.campaign;
35
36 import java.io.Serializable;
37
38 import javax.validation.constraints.Size;
39
40 import org.hibernate.validator.constraints.NotEmpty;
41
42 import fr.paris.lutece.portal.business.file.File;
43
44 /**
45 * This is the business class for the object CampaignTheme
46 */
47 public class CampaignTheme implements Serializable
48 {
49 private static final long serialVersionUID = 1L;
50
51 // Variables declarations
52 private int _nId;
53
54 @NotEmpty( message = "#i18n{participatorybudget.validation.campaigntheme.CodeCampaign.notEmpty}" )
55 @Size( max = 50, message = "#i18n{participatorybudget.validation.campaigntheme.CodeCampaign.size}" )
56 private String _strCodeCampaign;
57
58 @NotEmpty( message = "#i18n{participatorybudget.validation.campaigntheme.Code.notEmpty}" )
59 @Size( max = 50, message = "#i18n{participatorybudget.validation.campaigntheme.Code.size}" )
60 private String _strCode;
61
62 @NotEmpty( message = "#i18n{participatorybudget.validation.campaigntheme.Title.notEmpty}" )
63 @Size( max = 50, message = "#i18n{participatorybudget.validation.campaigntheme.Title.size}" )
64 private String _strTitle;
65
66 @NotEmpty( message = "#i18n{participatorybudget.validation.campaigntheme.Description.notEmpty}" )
67 private String _strDescription;
68
69 private String _strFrontRgb;
70
71 private boolean _bActive;
72
73 private File _fileImage;
74
75 /**
76 * Returns the Id
77 *
78 * @return The Id
79 */
80 public int getId( )
81 {
82 return _nId;
83 }
84
85 /**
86 * Sets the Id
87 *
88 * @param nId
89 * The Id
90 */
91 public void setId( int nId )
92 {
93 _nId = nId;
94 }
95
96 /**
97 * Returns the CodeCampaign
98 *
99 * @return The CodeCampaign
100 */
101 public String getCodeCampaign( )
102 {
103 return _strCodeCampaign;
104 }
105
106 /**
107 * Sets the CodeCampaign
108 *
109 * @param strCodeCampaign
110 * The CodeCampaign
111 */
112 public void setCodeCampaign( String strCodeCampaign )
113 {
114 _strCodeCampaign = strCodeCampaign;
115 }
116
117 /**
118 * Returns the Title
119 *
120 * @return The Title
121 */
122 public String getTitle( )
123 {
124 return _strTitle;
125 }
126
127 /**
128 * Sets the Title
129 *
130 * @param strTitle
131 * The Title
132 */
133 public void setTitle( String strTitle )
134 {
135 _strTitle = strTitle;
136 }
137
138 /**
139 * Returns the Description
140 *
141 * @return The Description
142 */
143 public String getDescription( )
144 {
145 return _strDescription;
146 }
147
148 /**
149 * Sets the Description
150 *
151 * @param strDescription
152 * The Description
153 */
154 public void setDescription( String strDescription )
155 {
156 _strDescription = strDescription;
157 }
158
159 /**
160 * Returns the Active
161 *
162 * @return The Active
163 */
164 public boolean getActive( )
165 {
166 return _bActive;
167 }
168
169 /**
170 * Sets the Active
171 *
172 * @param bActive
173 * The Active
174 */
175 public void setActive( boolean bActive )
176 {
177 _bActive = bActive;
178 }
179
180 /**
181 * @return the Code
182 */
183 public String getCode( )
184 {
185 return _strCode;
186 }
187
188 /**
189 * @param Code
190 * the Code to set
191 */
192 public void setCode( String strCode )
193 {
194 this._strCode = strCode;
195 }
196
197 /**
198 * @return the Image
199 */
200 public File getImage( )
201 {
202 return _fileImage;
203 }
204
205 /**
206 * @param _fileImage
207 * the Image to set
208 */
209 public void setImage( File _fileImage )
210 {
211 this._fileImage = _fileImage;
212 }
213
214 /**
215 * @return the front color as rgb
216 */
217 public String getFrontRgb( )
218 {
219 return _strFrontRgb;
220 }
221
222 /**
223 * @param Code
224 * the front color as rgb (ex : #fe5213 )
225 */
226 public void setFrontRgb( String strFrontRgb )
227 {
228 this._strFrontRgb = strFrontRgb;
229 }
230
231 }