|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lyra.Host.Playlist
public class Playlist
This class deals with the interaction between the application and play lists. Actions such as: Creating; Removing; and Maintaining of play lists are here.
Since the currently queued songs are a play list as well the ability to add and remove elements from that list will be enabled through here. This class will function much as does org.lyra.Database.Comptroller does.
Comptroller
Field Summary | |
---|---|
private static java.lang.String |
CLASS
|
private Terminus |
Host
|
private java.util.Map<java.lang.String,java.lang.String> |
Lang
|
private Ledger |
Logger
|
private Comptroller |
Manager
|
Constructor Summary | |
---|---|
Playlist(Ledger logger,
Comptroller manager,
Terminus host,
java.util.Map<java.lang.String,java.lang.String> lang)
Core constructor for the class. |
Method Summary | |
---|---|
void |
addCurrent(int pos,
java.util.List<java.lang.String> songs)
Internal method that will pass on the commands necessary to write out the structure to the host in order to add songs to the Current playlist. |
void |
addCurrent(int pos,
java.lang.String... songs)
Will take an array of File elements and append them directly to the Current play list. |
void |
addCurrent(java.util.List<java.lang.String> songs)
Internal method that will pass on the commands necessary to write out the structure to the host in order to add songs to the Current playlist. |
void |
addCurrent(java.lang.String... songs)
Will take an array of File elements and append them directly to the Current play list. |
void |
addCurrentAlbum(int pos,
java.lang.String... albums)
Adds an album and all associated songs into the currently playing queue. |
void |
addCurrentAlbum(java.util.Map<java.lang.String,java.lang.String> filter)
Adds an album and all associated songs into the currently playing queue. |
void |
addCurrentAlbum(java.lang.String... albums)
Adds an album and all associated songs into the currently playing queue. |
void |
addCurrentArtist(int pos,
java.lang.String... artists)
Adds an artist and all associated songs into the currently playing queue. |
void |
addCurrentArtist(java.util.Map<java.lang.String,java.lang.String> filter)
Adds an artist and all associated songs into the currently playing queue. |
void |
addCurrentArtist(java.lang.String... artists)
Adds an artist and all associated songs into the currently playing queue. |
void |
addCurrentGenre(int pos,
java.lang.String... genres)
Adds an genre and all associated songs into the currently playing queue. |
void |
addCurrentGenre(java.util.Map<java.lang.String,java.lang.String> filter)
Adds an genre and all associated songs into the currently playing queue. |
void |
addCurrentGenre(java.lang.String... genres)
Adds an genre and all associated songs into the currently playing queue. |
boolean |
clearCurrent()
This specific method is designed to clear out all entries in the current playlist. |
boolean |
clearCurrent(int... pos)
Clear entries as specified. |
boolean |
clearCurrent(java.lang.String... pos)
Clear entries as specified. |
void |
loadLocal(java.util.List<java.lang.String> names)
Loads the contents specified by a list of songs into the current playlist. |
boolean |
loadRemote(java.lang.String name)
Loads the contents of the listed playlist into the current playlist. |
boolean |
moveCurrent(int pos,
boolean up,
java.lang.String... ids)
Will take an initial insertion point, followed by an array of elements that are to be moved to that particular point. |
boolean |
removeRemote(java.lang.String name)
Has the exact opposite effect of the saveCurrent and saveRemote methods as this will remove a playlist from the host entry. |
boolean |
saveCurrent(java.lang.String name)
This is the only method in this section that will not be sharing the remote name. |
boolean |
saveRemote(java.lang.String name)
This is the same method as saveCurrent with a different name to hopefully cause less confusion and maintain consistency. |
boolean |
shuffleCurrent()
Shuffles the songs in the current playlist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Ledger Logger
private Comptroller Manager
private Terminus Host
private java.util.Map<java.lang.String,java.lang.String> Lang
private static final java.lang.String CLASS
Constructor Detail |
---|
public Playlist(Ledger logger, Comptroller manager, Terminus host, java.util.Map<java.lang.String,java.lang.String> lang)
logger
- Ledger instance for logging and debugging purposes.manager
- Comptroller instance for interacting with the database.host
- Terminus instance for direct interaction with the Host.lang
- Language elements.Method Detail |
---|
public void addCurrent(java.util.List<java.lang.String> songs)
songs
- List of strings containing the File attribute.public void addCurrent(int pos, java.util.List<java.lang.String> songs)
pos
- Integer containing initial position for insertion.songs
- List of strings containing the File attribute.public void addCurrent(java.lang.String... songs)
songs
- List of strings containing the File attribute.public void addCurrent(int pos, java.lang.String... songs)
pos
- Integer containing insertion point.songs
- List of strings containing the File attribute.public void addCurrentAlbum(java.lang.String... albums)
albums
- String containing album name.public void addCurrentAlbum(int pos, java.lang.String... albums)
pos
- Position where the songs will be added.albums
- String containing album name.public void addCurrentAlbum(java.util.Map<java.lang.String,java.lang.String> filter)
filter
- Map containing filtering elements.public void addCurrentArtist(java.lang.String... artists)
artists
- String containing artist name.public void addCurrentArtist(int pos, java.lang.String... artists)
pos
- integer containing insertion point.artists
- String containing artist name.public void addCurrentArtist(java.util.Map<java.lang.String,java.lang.String> filter)
filter
- Map containing filtering elements.public void addCurrentGenre(java.lang.String... genres)
genres
- String containing genre name.public void addCurrentGenre(int pos, java.lang.String... genres)
pos
- Integer containing insertion point.genres
- String containing genre name.public void addCurrentGenre(java.util.Map<java.lang.String,java.lang.String> filter)
filter
- Map containing filtering elements.public boolean clearCurrent()
public boolean clearCurrent(int... pos)
pos
- Array of integers indicating which elements.
public boolean clearCurrent(java.lang.String... pos)
pos
- Array of string indicating which elements.
public boolean moveCurrent(int pos, boolean up, java.lang.String... ids)
pos
- Integer indicating insertion point.up
- Boolean telling us if we are moving up the tree (incrementing in positions).ids
- String array indicating songs to move.
public boolean shuffleCurrent()
public boolean saveCurrent(java.lang.String name)
name
- String containing playlist name.
public boolean saveRemote(java.lang.String name)
name
- String containing playlist name.
public boolean removeRemote(java.lang.String name)
name
- String containing playlist name.
public boolean loadRemote(java.lang.String name)
name
- String containing playlist name.
public void loadLocal(java.util.List<java.lang.String> names)
names
- List of file names to be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |