uk.org.ury.common.show
Class ShowUtils
java.lang.Object
uk.org.ury.common.show.ShowUtils
public class ShowUtils
- extends java.lang.Object
A set of common utility routines to facilitate the extraction of show items
from the show storage areas of the URY database.
- Author:
- Matt Windsor
Field Summary |
static int |
NUM_CHANNELS
The number of channels reserved for show items. |
Method Summary |
static java.util.List<ShowItem> |
getChannelList(DatabaseDriver db,
int showID,
int channel)
Given a show and a channel, retrieve a list of all show items bound to
that channel for the show. |
static java.util.List<java.lang.String> |
getPublicFolders(DatabaseDriver db)
Return the names of the public track folders, or "bins". |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NUM_CHANNELS
public static final int NUM_CHANNELS
- The number of channels reserved for show items.
TODO: move this somewhere more appropriate.
- See Also:
- Constant Field Values
ShowUtils
public ShowUtils()
getPublicFolders
public static java.util.List<java.lang.String> getPublicFolders(DatabaseDriver db)
throws QueryFailureException
- Return the names of the public track folders, or "bins".
- Parameters:
db
- The database to query.
- Returns:
- a list of the public folder names. The list may be empty.
- Throws:
java.lang.IllegalArgumentException
- if the database is null, the show ID is negative or the
channel index falls out of bounds.
QueryFailureException
- if the database backend yielded an error while executing the
search query.
getChannelList
public static java.util.List<ShowItem> getChannelList(DatabaseDriver db,
int showID,
int channel)
throws QueryFailureException
- Given a show and a channel, retrieve a list of all show items bound to
that channel for the show.
- Parameters:
db
- The database to query.showID
- The unique number that identifies the show.channel
- The index of the channel to query.
- Returns:
- a list of ShowItems extracted from the show and channel. The list
may be empty.
- Throws:
java.lang.IllegalArgumentException
- if the database is null, the show ID is negative or the
channel index falls out of bounds.
QueryFailureException
- if the database backend yielded an error while executing the
search query.