Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ExportManager |
|
| 1.0;1 |
1 | package org.jtheque.films.services.impl.utils.file.exports; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | import org.jtheque.films.utils.Constants.Files.FileType; | |
20 | ||
21 | /** | |
22 | * Manage the file exports. | |
23 | * | |
24 | * @author Baptiste Wicht | |
25 | */ | |
26 | public final class ExportManager { | |
27 | /** | |
28 | * Construct a new ImportManager. | |
29 | */ | |
30 | private ExportManager() { | |
31 | 0 | super(); |
32 | 0 | } |
33 | ||
34 | /** | |
35 | * Backup the database to a file. | |
36 | * | |
37 | * @param fileType The type of file. | |
38 | * @param filepath The path to the file. | |
39 | */ | |
40 | public static void backup(FileType fileType, String filepath) { | |
41 | 0 | Exporter exporter = ExporterFactory.getExporter(fileType); |
42 | ||
43 | 0 | exporter.export(filepath); |
44 | 0 | } |
45 | } |