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