| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| AutoImportService |
|
| 1.0;1 |
| 1 | package org.jtheque.films.services.impl; | |
| 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.persistence.od.able.Film; | |
| 20 | import org.jtheque.films.services.able.IAutoImportService; | |
| 21 | import org.jtheque.films.services.impl.utils.AutoManager; | |
| 22 | import org.jtheque.films.utils.Constants.Site; | |
| 23 | ||
| 24 | import java.io.File; | |
| 25 | import java.util.Collection; | |
| 26 | ||
| 27 | /** | |
| 28 | * An auto-import service implementation. | |
| 29 | * | |
| 30 | * @author Baptiste Wicht | |
| 31 | */ | |
| 32 | 0 | public final class AutoImportService implements IAutoImportService { |
| 33 | @Override | |
| 34 | public Collection<String> getFilmTitles(File folder, boolean fileMode) { | |
| 35 | 0 | return AutoManager.getInstance().getFilmTitles(folder, fileMode); |
| 36 | } | |
| 37 | ||
| 38 | @Override | |
| 39 | public Collection<Film> importFilms(Collection<String> titles, boolean webMode, Site site) { | |
| 40 | 0 | return AutoManager.getInstance().getFilmsOfFolder(titles, webMode, site); |
| 41 | } | |
| 42 | } |