1 /*
2 * Copyright (c) 2002-2025, 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.pluginwizard.web.formbean;
35
36 import org.hibernate.validator.constraints.URL;
37
38 import java.io.Serializable;
39
40 import javax.validation.constraints.NotEmpty;
41 import javax.validation.constraints.Pattern;
42 import javax.validation.constraints.Size;
43
44 /**
45 * Description FormBean
46 */
47 public class DescriptionFormBean implements Serializable
48 {
49 // Variables declarations
50 private int _nIdPlugin;
51 private String _strPluginName;
52 private String _strPluginClass;
53 @NotEmpty( message = "pluginwizard.error.plugin.description.notEmpty" )
54 @Size( min = 5, max = 255, message = "pluginwizard.error.plugin.description.size" )
55 private String _strPluginDescription;
56 @NotEmpty( message = "pluginwizard.error.plugin.provider.notEmpty" )
57 @Size( min = 3, max = 255, message = "pluginwizard.error.plugin.provider.size" )
58 private String _strPluginProvider;
59 @NotEmpty( message = "pluginwizard.error.plugin.version.notEmpty" )
60 @Pattern( regexp = "[0-9].[0-9].[0-9]", message = "pluginwizard.error.plugin.version.pattern" )
61 private String _strPluginVersion;
62 @NotEmpty( message = "pluginwizard.error.plugin.copyright.notEmpty" )
63 private String _strPluginCopyright;
64 private String _strPluginIconUrl;
65 @NotEmpty( message = "pluginwizard.error.plugin.urlProvider.notEmpty" )
66 @URL( message = "pluginwizard.error.plugin.urlProvider.url" )
67 private String _strPluginProviderUrl;
68 private String _strPluginDbPoolRequired;
69 @Pattern( regexp = "^(MODULE|PLUGIN|WORKFLOWTASK)$", message = "pluginwizard.error.description.type" )
70 private String _strType;
71 private boolean _bIsModule;
72
73 /**
74 *
75 */
76 public DescriptionFormBean( )
77 {
78 }
79
80 /**
81 * Returns the IdPlugin
82 *
83 * @return The IdPlugin
84 */
85 public int getIdPlugin( )
86 {
87 return _nIdPlugin;
88 }
89
90 /**
91 * Sets the IdPlugin
92 *
93 * @param nIdPlugin
94 * The IdPlugin
95 */
96 public void setIdPlugin( int nIdPlugin )
97 {
98 _nIdPlugin = nIdPlugin;
99 }
100
101 /**
102 * Returns the PluginName
103 *
104 * @return The PluginName
105 */
106 public String getPluginName( )
107 {
108 return _strPluginName;
109 }
110
111 /**
112 * Sets the PluginName
113 *
114 * @param strPluginName
115 * The PluginName
116 */
117 public void setPluginName( String strPluginName )
118 {
119 _strPluginName = strPluginName;
120 }
121
122 /**
123 * Returns the PluginClass
124 *
125 * @return The PluginClass
126 */
127 public String getPluginClass( )
128 {
129 return _strPluginClass;
130 }
131
132 /**
133 * Sets the PluginClass
134 *
135 * @param strPluginClass
136 * The PluginClass
137 */
138 public void setPluginClass( String strPluginClass )
139 {
140 _strPluginClass = strPluginClass;
141 }
142
143 /**
144 * Returns the PluginDescription
145 *
146 * @return The PluginDescription
147 */
148 public String getPluginDescription( )
149 {
150 return _strPluginDescription;
151 }
152
153 /**
154 * Sets the PluginDescription
155 *
156 * @param strPluginDescription
157 * The PluginDescription
158 */
159 public void setPluginDescription( String strPluginDescription )
160 {
161 _strPluginDescription = strPluginDescription;
162 }
163
164 /**
165 * Returns the PluginVersion
166 *
167 * @return The PluginVersion
168 */
169 public String getPluginVersion( )
170 {
171 return _strPluginVersion;
172 }
173
174 /**
175 * Sets the PluginVersion
176 *
177 * @param strPluginVersion
178 * The PluginVersion
179 */
180 public void setPluginVersion( String strPluginVersion )
181 {
182 _strPluginVersion = strPluginVersion;
183 }
184
185 /**
186 * Returns the PluginCopyright
187 *
188 * @return The PluginCopyright
189 */
190 public String getPluginCopyright( )
191 {
192 return _strPluginCopyright;
193 }
194
195 /**
196 * Sets the PluginCopyright
197 *
198 * @param strPluginCopyright
199 * The PluginCopyright
200 */
201 public void setPluginCopyright( String strPluginCopyright )
202 {
203 _strPluginCopyright = strPluginCopyright;
204 }
205
206 /**
207 * Returns the PluginIconUrl
208 *
209 * @return The PluginIconUrl
210 */
211 public String getPluginIconUrl( )
212 {
213 return _strPluginIconUrl;
214 }
215
216 /**
217 * Sets the PluginIconUrl
218 *
219 * @param strPluginIconUrl
220 * The PluginIconUrl
221 */
222 public void setPluginIconUrl( String strPluginIconUrl )
223 {
224 _strPluginIconUrl = strPluginIconUrl;
225 }
226
227 /**
228 * Returns the PluginProvider
229 *
230 * @return The PluginProvider
231 */
232 public String getPluginProvider( )
233 {
234 return _strPluginProvider;
235 }
236
237 /**
238 * Sets the PluginProvider
239 *
240 * @param strPluginProvider
241 * The PluginProvider
242 */
243 public void setPluginProvider( String strPluginProvider )
244 {
245 _strPluginProvider = strPluginProvider;
246 }
247
248 /**
249 * Returns the PluginProviderUrl
250 *
251 * @return The PluginProviderUrl
252 */
253 public String getPluginProviderUrl( )
254 {
255 return _strPluginProviderUrl;
256 }
257
258 /**
259 * Sets the PluginProviderUrl
260 *
261 * @param strPluginProviderUrl
262 * The PluginProviderUrl
263 */
264 public void setPluginProviderUrl( String strPluginProviderUrl )
265 {
266 _strPluginProviderUrl = strPluginProviderUrl;
267 }
268
269 /**
270 * Returns the PluginDbPoolRequired
271 *
272 * @return The PluginDbPoolRequired
273 */
274 public String getPluginDbPoolRequired( )
275 {
276 return _strPluginDbPoolRequired;
277 }
278
279 /**
280 * Sets the PluginDbPoolRequired
281 *
282 * @param strPluginDbPoolRequired
283 * The PluginDbPoolRequired
284 */
285 public void setPluginDbPoolRequired( String strPluginDbPoolRequired )
286 {
287 _strPluginDbPoolRequired = strPluginDbPoolRequired;
288 }
289
290 /**
291 * returns the type
292 *
293 * @return the type
294 */
295 public String getType( )
296 {
297 return _strType;
298 }
299
300 /**
301 * sets the type
302 *
303 * @param _strType
304 */
305 public void setType( String _strType )
306 {
307 this._strType = _strType;
308 }
309
310 /**
311 * Returns if the plugin is a module
312 *
313 * @return true if the plugin is a module
314 */
315 public boolean isModule( )
316 {
317 return _bIsModule;
318 }
319
320 /**
321 * Returns if the plugin is a module
322 *
323 * @return true if the plugin is a module
324 */
325 public boolean getModule( )
326 {
327 return _bIsModule;
328 }
329
330 /**
331 * Sets the isModule flag
332 *
333 * @param bIsModule
334 * true if the plugin is a module
335 */
336 public void setModule( boolean _bIsModule )
337 {
338 this._bIsModule = _bIsModule;
339 }
340 }