1 package org.musicontroller.songselection; 2 3 import java.util.List; 4 5 import org.musicontroller.core.Song; 6 import org.musicontroller.security.IUser; 7 8 public interface SongSelector { 9 10 /** 11 * Returns one Song, which is selected using the Advanced Random algorithm. 12 * @param candidates The list of Songs that are requested. If this parameter 13 * is null, the result is null. If the set of candidates is empty the 14 * result is null. 15 * @param lpc The collection of the last songs played 16 * @param user The User 17 * @return The Song that is best suitable to be played 18 */ 19 public Song selectSong(List<Song> candidates, LastPlayedContainer lpc, IUser user); 20 21 /** 22 * Informs the SongSelector that a song of a certain Band has been played. 23 * @param bandid 24 */ 25 public void addBandPlay(long bandid); 26 27 /** 28 * Informs the SongSelector that a song of a certain Band has been skipped. 29 * @param bandid 30 */ 31 public void addBandSkip(long bandid); 32 33 /** 34 * Informs the SongSelector that a song of a certain Keyword has been played. 35 * @param keywordid 36 */ 37 public void addKeywordPlay(long keywordid); 38 39 /** 40 * Informs the SongSelector that a song of a certain Keyword has been skipped. 41 * @param keywordid 42 */ 43 public void addKeywordSkip(long keywordid); 44 }