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