Coverage Report - org.jtheque.films.services.impl.FilmAutoService
 
Classes in this File Line Coverage Branch Coverage Complexity
FilmAutoService
0 %
0/8
0 %
0/2
1.25
 
 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.IFilmAutoService;
 21  
 import org.jtheque.films.services.impl.utils.EditArguments;
 22  
 import org.jtheque.films.services.impl.utils.web.FilmResult;
 23  
 import org.jtheque.films.services.impl.utils.web.WebGetterManager;
 24  
 import org.jtheque.films.utils.Constants.Site;
 25  
 
 26  
 import java.util.Collection;
 27  
 
 28  
 /**
 29  
  * The auto service implementation.
 30  
  *
 31  
  * @author Baptiste Wicht
 32  
  */
 33  0
 public final class FilmAutoService implements IFilmAutoService {
 34  
     private WebGetterManager webGetterManager;
 35  
 
 36  
     @Override
 37  
     public Collection<FilmResult> getFilms(Site site, String search) {
 38  0
         return getManager().getFilms(site, search);
 39  
     }
 40  
 
 41  
     @Override
 42  
     public Film getFilm(FilmResult selectedFilm) {
 43  0
         return getManager().getFilm(selectedFilm);
 44  
     }
 45  
 
 46  
     @Override
 47  
     public void modifyFilm(FilmResult result, Film film, EditArguments args) {
 48  0
         getManager().modifyFilm(result, film, args);
 49  0
     }
 50  
 
 51  
     /**
 52  
      * Return the manager.
 53  
      *
 54  
      * @return The web getter manager.
 55  
      */
 56  
     private WebGetterManager getManager() {
 57  0
         if (webGetterManager == null) {
 58  0
             webGetterManager = new WebGetterManager();
 59  
         }
 60  
 
 61  0
         return webGetterManager;
 62  
     }
 63  
 }