Coverage Report - org.jtheque.films.services.able.IActorService
 
Classes in this File Line Coverage Branch Coverage Complexity
IActorService
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.films.services.impl.utils.Filmography;
 21  
 import org.jtheque.films.view.impl.fb.IPersonFormBean;
 22  
 import org.jtheque.primary.od.able.Person;
 23  
 
 24  
 import java.util.Collection;
 25  
 
 26  
 /**
 27  
  * A service for the actor functions.
 28  
  *
 29  
  * @author Baptiste Wicht
 30  
  */
 31  
 public interface IActorService extends DataContainer<Person> {
 32  
     String DATA_TYPE = "Actors";
 33  
     String PERSON_TYPE = "Actor";
 34  
 
 35  
     /**
 36  
      * Return an empty actor.
 37  
      *
 38  
      * @return An empty actor.
 39  
      */
 40  
     Person getDefaultActor();
 41  
 
 42  
     /**
 43  
      * Return the filmography of the actor.
 44  
      *
 45  
      * @param actor The actor.
 46  
      * @return The filmography of the actor.
 47  
      */
 48  
     Filmography getFilmography(Person actor);
 49  
 
 50  
     /**
 51  
      * Create the actor.
 52  
      *
 53  
      * @param actor The actor to create.
 54  
      */
 55  
     void create(Person actor);
 56  
 
 57  
     /**
 58  
      * Save the actor.
 59  
      *
 60  
      * @param actor The actor to save.
 61  
      */
 62  
     void save(Person actor);
 63  
 
 64  
     /**
 65  
      * Edit the actor.
 66  
      *
 67  
      * @param actor The actor to edit.
 68  
      * @param infos The informations of the view.
 69  
      */
 70  
     void edit(Person actor, IPersonFormBean infos);
 71  
 
 72  
     /**
 73  
      * Indicate if the service has nos actors.
 74  
      *
 75  
      * @return true if there is no actors else false.
 76  
      */
 77  
     boolean hasNoActor();
 78  
 
 79  
     /**
 80  
      * Delete the actor.
 81  
      *
 82  
      * @param actor The actor to delete.
 83  
      * @return true if the actor has been deleted else false.
 84  
      */
 85  
     boolean delete(Person actor);
 86  
 
 87  
     /**
 88  
      * Return all the actors.
 89  
      *
 90  
      * @return A List containing all the actors.
 91  
      */
 92  
     Collection<Person> getActors();
 93  
 
 94  
     /**
 95  
      * Indicate if an actor exists or not.
 96  
      *
 97  
      * @param actor The actor to test.
 98  
      * @return true if the actor exists else false.
 99  
      */
 100  
     boolean exist(Person actor);
 101  
 
 102  
     /**
 103  
      * Return the actor denoted by this first name and name.
 104  
      *
 105  
      * @param firstName The first name of the actor.
 106  
      * @param name      The name of the actor.
 107  
      * @return The actor.
 108  
      */
 109  
     Person getActor(String firstName, String name);
 110  
 
 111  
 
 112  
     /**
 113  
      * Indicate if an actor with this first name and name exist or not.
 114  
      *
 115  
      * @param firstName The first name of the actor.
 116  
      * @param name      The name of the actor.
 117  
      * @return true if the actor exists else false.
 118  
      */
 119  
     boolean exist(String firstName, String name);
 120  
 
 121  
     /**
 122  
      * Return an empty actor.
 123  
      *
 124  
      * @return An empty actor.
 125  
      */
 126  
     Person getEmptyActor();
 127  
 }