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.jasper.business;
35  
36  import java.util.ArrayList;
37  
38  /**
39   * This is the business class for the object JasperReport
40   */
41  public class JasperReport
42  {
43      // Variables declarations
44      private int _nIdReport;
45      private String _strCode;
46      private String _strUrl;
47      private String _strPool;
48      private String _strFileFolder;
49      private java.sql.Timestamp _dateModification;
50      private ArrayList<String> _listFileFormats = new ArrayList<String>( );
51  
52      /**
53       * Returns the IdReport
54       * 
55       * @return The IdReport
56       */
57      public int getIdReport( )
58      {
59          return _nIdReport;
60      }
61  
62      /**
63       * Sets the IdReport
64       * 
65       * @param nIdReport
66       *            The IdReport
67       */
68      public void setIdReport( int nIdReport )
69      {
70          _nIdReport = nIdReport;
71      }
72  
73      /**
74       * Returns the report code
75       * 
76       * @return the report code
77       */
78      public String getCode( )
79      {
80          return _strCode;
81      }
82  
83      /**
84       * Sets the report code
85       * 
86       * @param strCode
87       *            The Description
88       */
89      public void setCode( String strCode )
90      {
91          _strCode = strCode;
92      }
93  
94      public String getFileFolder( )
95      {
96          return _strFileFolder;
97      }
98  
99      public void setFileFolder( String strFileFolder )
100     {
101         _strFileFolder = strFileFolder;
102     }
103 
104     /**
105      * Returns the Url of the jasper file
106      * 
107      * @return The Url of the jasper file
108      */
109     public String getUrl( )
110     {
111         return _strUrl;
112     }
113 
114     /**
115      * Sets the Url of the jasper file
116      * 
117      * @param strUrl
118      *            The url
119      */
120     public void setUrl( String strUrl )
121     {
122         _strUrl = strUrl;
123     }
124 
125     public String getPool( )
126     {
127         return _strPool;
128     }
129 
130     /**
131      * Sets the Description
132      * 
133      * @param strDescription
134      *            The Description
135      */
136     public void setPool( String strPool )
137     {
138         _strPool = strPool;
139     }
140 
141     /**
142      * Returns the Date of the last Modification
143      *
144      * @return The Date of the last Modification
145      */
146     public java.sql.Timestamp getDateModification( )
147     {
148         return _dateModification;
149     }
150 
151     /**
152      * Sets the Date of the last Modification
153      *
154      * @param dateModification
155      *            The Date of the last Modification
156      */
157     public void setDateModification( java.sql.Timestamp dateModification )
158     {
159         _dateModification = dateModification;
160     }
161 
162     /**
163      * Adds a file format
164      *
165      * @param strFileFormat
166      *            A file format chosen
167      */
168     public void addFileFormat( String strFileFormat )
169     {
170         _listFileFormats.add( strFileFormat );
171     }
172 
173     /**
174      * Adds a file format
175      *
176      * @param listFileFormat
177      *            A file formats list
178      */
179     public void addFileFormats( ArrayList<String> listFileFormat )
180     {
181         for ( String strFileFormat : listFileFormat )
182         {
183             addFileFormat( strFileFormat );
184         }
185     }
186 
187     public ArrayList<String> getFileFormats( )
188     {
189         return _listFileFormats;
190     }
191 }