View Javadoc
1   /*
2    * Copyright (c) 2002-2021, 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.importexport.business.export;
35  
36  import fr.paris.lutece.portal.service.plugin.Plugin;
37  
38  import java.util.List;
39  
40  /**
41   * Class that represents a configuration of an export that is processed by the export daemon
42   */
43  public class AutomaticExportConfig
44  {
45      private int _nId;
46      private String _strTableName;
47      private String _strOutputFileName;
48      private List<String> _listColumns;
49      private int _nXslStylesheetId;
50      private Plugin _plugin;
51  
52      /**
53       * Get the id of the export configuration
54       * 
55       * @return the id of the export configuration
56       */
57      public int getId( )
58      {
59          return _nId;
60      }
61  
62      /**
63       * set the id of the export configuration
64       * 
65       * @param nId
66       *            the id of the export configuration
67       */
68      public void setId( int nId )
69      {
70          this._nId = nId;
71      }
72  
73      /**
74       * Get the name of the table of the database to export data from
75       * 
76       * @return the name of the table of the database
77       */
78      public String getTableName( )
79      {
80          return _strTableName;
81      }
82  
83      /**
84       * Set the name of the table of the database to export data from
85       * 
86       * @param strTableName
87       *            the name of the table of the database
88       */
89      public void setTableName( String strTableName )
90      {
91          this._strTableName = strTableName;
92      }
93  
94      /**
95       * Get the name of the file that will contain the result of the export
96       * 
97       * @return The name of the file that will contain the result of the export
98       */
99      public String getOutputFileName( )
100     {
101         return _strOutputFileName;
102     }
103 
104     /**
105      * Set the name of the file that will contain the result of the export
106      * 
107      * @param strOutputFileName
108      *            The name of the file that will contain the result of the export
109      */
110     public void setOutputFileName( String strOutputFileName )
111     {
112         this._strOutputFileName = strOutputFileName;
113     }
114 
115     /**
116      * Get the list of columns to include in the export
117      * 
118      * @return The list of columns to include in the export
119      */
120     public List<String> getListColumns( )
121     {
122         return _listColumns;
123     }
124 
125     /**
126      * Set the list of columns to include in the export
127      * 
128      * @param listColumns
129      *            The list of columns to include in the export
130      */
131     public void setListColumns( List<String> listColumns )
132     {
133         this._listColumns = listColumns;
134     }
135 
136     /**
137      * Get the id of the style sheet to apply to the data retrieved from the database
138      * 
139      * @return the id of the style sheet
140      */
141     public int getXslStylesheetId( )
142     {
143         return _nXslStylesheetId;
144     }
145 
146     /**
147      * Set the id of the style sheet to apply to the data retrieved from the database
148      * 
149      * @param nXslStylesheetId
150      *            the id of the style sheet
151      */
152     public void setXslStylesheetId( int nXslStylesheetId )
153     {
154         this._nXslStylesheetId = nXslStylesheetId;
155     }
156 
157     /**
158      * Get the plugin to get the pool from
159      * 
160      * @return the plugin to get the pool from
161      */
162     public Plugin getPlugin( )
163     {
164         return _plugin;
165     }
166 
167     /**
168      * Set the plugin to get the pool from
169      * 
170      * @param plugin
171      *            the plugin to get the pool from
172      */
173     public void setPlugin( Plugin plugin )
174     {
175         this._plugin = plugin;
176     }
177 
178 }