View Javadoc
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.document.business.attributes;
35  
36  import java.util.List;
37  
38  
39  /**
40   * This class represents the business object DocumentAttribute
41   */
42  public class DocumentAttribute
43  {
44      // Variables declarations
45      private int _nIdDocumentAttribute;
46      private String _strCodeDocumentType;
47      private String _strCodeAttributeType;
48      private String _strCode;
49      private String _strName;
50      private String _strDescription;
51      private int _nAttributeOrder;
52      private boolean _bRequired;
53      private boolean _bSearchable;
54      private List<AttributeTypeParameter> _listParameters;
55      private String _strTextValue;
56      private byte[] _bytes;
57      private boolean _bBinary;
58      private String _strValueContentType;
59      private IMapProvider _mapProvider; // For attribute type Geolocation
60  
61      /**
62       * Returns the IdDocumentAttribute
63       *
64       * @return The IdDocumentAttribute
65       */
66      public int getId(  )
67      {
68          return _nIdDocumentAttribute;
69      }
70  
71      /**
72       * Sets the IdDocumentAttribute
73       *
74       * @param nIdDocumentAttribute The IdDocumentAttribute
75       */
76      public void setId( int nIdDocumentAttribute )
77      {
78          _nIdDocumentAttribute = nIdDocumentAttribute;
79      }
80  
81      /**
82       * Returns the CodeDocumentType
83       *
84       * @return The CodeDocumentType
85       */
86      public String getCodeDocumentType(  )
87      {
88          return _strCodeDocumentType;
89      }
90  
91      /**
92       * Sets the CodeDocumentType
93       *
94       * @param strCodeDocumentType The CodeDocumentType
95       */
96      public void setCodeDocumentType( String strCodeDocumentType )
97      {
98          _strCodeDocumentType = strCodeDocumentType;
99      }
100 
101     /**
102      * Returns the CodeAttributeType
103      *
104      * @return The CodeAttributeType
105      */
106     public String getCodeAttributeType(  )
107     {
108         return _strCodeAttributeType;
109     }
110 
111     /**
112      * Sets the CodeAttributeType
113      *
114      * @param strCodeAttributeType The CodeAttributeType
115      */
116     public void setCodeAttributeType( String strCodeAttributeType )
117     {
118         _strCodeAttributeType = strCodeAttributeType;
119     }
120 
121     /**
122      * Returns the Code
123      *
124      * @return The Code
125      */
126     public String getCode(  )
127     {
128         return _strCode;
129     }
130 
131     /**
132      * Sets the Code
133      *
134      * @param strCode The Code
135      */
136     public void setCode( String strCode )
137     {
138         _strCode = strCode;
139     }
140 
141     /**
142      * Returns the Name
143      *
144      * @return The Name
145      */
146     public String getName(  )
147     {
148         return _strName;
149     }
150 
151     /**
152      * Sets the Name
153      *
154      * @param strName The Name
155      */
156     public void setName( String strName )
157     {
158         _strName = strName;
159     }
160 
161     /**
162      * Returns the Description
163      *
164      * @return The Description
165      */
166     public String getDescription(  )
167     {
168         return _strDescription;
169     }
170 
171     /**
172      * Sets the Description
173      *
174      * @param strDescription The Description
175      */
176     public void setDescription( String strDescription )
177     {
178         _strDescription = strDescription;
179     }
180 
181     /**
182      * Returns the AttributeOrder
183      *
184      * @return The AttributeOrder
185      */
186     public int getAttributeOrder(  )
187     {
188         return _nAttributeOrder;
189     }
190 
191     /**
192      * Sets the AttributeOrder
193      *
194      * @param nAttributeOrder The AttributeOrder
195      */
196     public void setAttributeOrder( int nAttributeOrder )
197     {
198         _nAttributeOrder = nAttributeOrder;
199     }
200 
201     /**
202      * Returns the Required
203      *
204      * @return The Required
205      */
206     public boolean isRequired(  )
207     {
208         return _bRequired;
209     }
210 
211     /**
212      * Sets if Required
213      * @param bRequired The required value
214      */
215     public void setRequired( boolean bRequired )
216     {
217         _bRequired = bRequired;
218     }
219 
220     /**
221      * Returns the Searchable
222      *
223      * @return The Searchable
224      */
225     public boolean isSearchable(  )
226     {
227         return _bSearchable;
228     }
229 
230     /**
231      * Sets the Searchable
232      * @param bSearchable The searchable value
233      */
234     public void setSearchable( boolean bSearchable )
235     {
236         _bSearchable = bSearchable;
237     }
238 
239     /**
240      * Returns the Binary
241      *
242      * @return The Binary
243      */
244     public boolean isBinary(  )
245     {
246         return _bBinary;
247     }
248 
249     /**
250      * Sets the Binary
251      * @param bBinary The Binary value
252      */
253     public void setBinary( boolean bBinary )
254     {
255         _bBinary = bBinary;
256     }
257 
258     /**
259      * Sets parameters list
260      * @param listParameters The parameters list
261      */
262     public void setParameters( List<AttributeTypeParameter> listParameters )
263     {
264         _listParameters = listParameters;
265     }
266 
267     /**
268      * Gets parameters list
269      * @return The parameters list
270      */
271     public List<AttributeTypeParameter> getParameters(  )
272     {
273         return _listParameters;
274     }
275 
276     /**
277      * Sets the value
278      * @param strTextValue The value
279      */
280     public void setTextValue( String strTextValue )
281     {
282         _strTextValue = strTextValue;
283     }
284 
285     /**
286      * Gets the value
287      * @return The value
288      */
289     public String getTextValue(  )
290     {
291         return _strTextValue;
292     }
293 
294     /**
295      * Sets the value
296      * @param bytes The value
297      */
298     public void setBinaryValue( byte[] bytes )
299     {
300         _bytes = bytes;
301     }
302 
303     /**
304      * Gets the value
305      * @return The value
306      */
307     public byte[] getBinaryValue(  )
308     {
309         return _bytes;
310     }
311 
312     /**
313      * Sets the content type value
314      * @param strValueContentType The content type value
315      */
316     public void setValueContentType( String strValueContentType )
317     {
318         _strValueContentType = strValueContentType;
319     }
320 
321     /**
322      * Gets the content type value
323      * @return The content type value
324      */
325     public String getValueContentType(  )
326     {
327         return _strValueContentType;
328     }
329 
330     /**
331      * @return the _mapProvider
332      */
333     public IMapProvider getMapProvider(  )
334     {
335         return _mapProvider;
336     }
337 
338     /**
339      * @param _mapProvider the _mapProvider to set
340      */
341     public void setMapProvider( IMapProvider mapProvider )
342     {
343         this._mapProvider = mapProvider;
344     }
345 }