Coverage Report - org.jtheque.films.services.able.IFilmsService
 
Classes in this File Line Coverage Branch Coverage Complexity
IFilmsService
N/A
N/A
1
 
 1  
 package org.jtheque.films.services.able;
 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.core.managers.persistence.able.DataContainer;
 20  
 import org.jtheque.core.managers.persistence.able.DataListener;
 21  
 import org.jtheque.films.persistence.od.able.Film;
 22  
 import org.jtheque.films.services.impl.utils.VideoFile;
 23  
 
 24  
 import java.util.Collection;
 25  
 
 26  
 /**
 27  
  * A service for the films functions.
 28  
  *
 29  
  * @author Baptiste Wicht
 30  
  */
 31  
 public interface IFilmsService extends DataContainer<Film> {
 32  
     String DATA_TYPE = "Films";
 33  
 
 34  
     /**
 35  
      * Return an empty film.
 36  
      *
 37  
      * @return An empty film.
 38  
      */
 39  
     Film getDefaultFilm();
 40  
 
 41  
     /**
 42  
      * Print the list of films.
 43  
      */
 44  
     void printListOfFilms();
 45  
 
 46  
     /**
 47  
      * Generate an email with the description of the film to advise it to someone else.
 48  
      *
 49  
      * @param film The film to advise.
 50  
      * @return The String representing the body of the email.
 51  
      */
 52  
     String generateEmail(Film film);
 53  
 
 54  
     /**
 55  
      * Generate the description of the film in a String for printing it.
 56  
      *
 57  
      * @param film The film to describe.
 58  
      * @return The String representation of the description of the film.
 59  
      */
 60  
     String generateFilmDescriptionForPrinting(Film film);
 61  
 
 62  
     /**
 63  
      * Return all the video files.
 64  
      *
 65  
      * @return a List containing all the video files.
 66  
      */
 67  
     Collection<VideoFile> getVideoFiles();
 68  
 
 69  
     /**
 70  
      * Create the film.
 71  
      *
 72  
      * @param film The film to create.
 73  
      */
 74  
     void create(Film film);
 75  
 
 76  
     /**
 77  
      * Save the film.
 78  
      *
 79  
      * @param film The film to save.
 80  
      */
 81  
     void save(Film film);
 82  
 
 83  
     /**
 84  
      * Delete the film.
 85  
      *
 86  
      * @param film The film to delete.
 87  
      * @return true if the film has been deleted else false.
 88  
      */
 89  
     boolean delete(Film film);
 90  
 
 91  
     /**
 92  
      * Indicate if the service has nos films.
 93  
      *
 94  
      * @return true if there is no films else false.
 95  
      */
 96  
     boolean isNoFilms();
 97  
 
 98  
     /**
 99  
      * Create all the films.
 100  
      *
 101  
      * @param films The films to create.
 102  
      */
 103  
     void createAll(Collection<Film> films);
 104  
 
 105  
     /**
 106  
      * Return the films of the current collection.
 107  
      *
 108  
      * @return The films of the current collection.
 109  
      */
 110  
     Collection<Film> getFilms();
 111  
 
 112  
     @Override
 113  
     void addDataListener(DataListener listener);
 114  
 
 115  
     /**
 116  
      * Return an empty film.
 117  
      *
 118  
      * @return An empty film.
 119  
      */
 120  
     Film getEmptyFilm();
 121  
 }