com.neoworks.jukex.tracksource
Class AudioBannerPipelineElement

java.lang.Object
  |
  +--com.neoworks.jukex.tracksource.TrackSourcePipelineElementSkeleton
        |
        +--com.neoworks.jukex.tracksource.AudioBannerPipelineElement
All Implemented Interfaces:
SearchPipelineElement, java.io.Serializable, TrackSource, TrackSourcePipelineElement

public class AudioBannerPipelineElement
extends TrackSourcePipelineElementSkeleton
implements SearchPipelineElement

PipelineElement that plays the results of a query at regular intervals.

Author:
Nigel Atkinson nigel@neoworks.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.neoworks.jukex.tracksource.TrackSourcePipelineElementSkeleton
name
 
Constructor Summary
AudioBannerPipelineElement()
          Public constructor
AudioBannerPipelineElement(Query q)
          Public constructor
 
Method Summary
 java.lang.Object clone()
          Clone this RandomiserPipelineElement
 java.lang.String getDescription()
          Return a String describing what, in general terms, this TrackSource does
 Track getNextTrack()
          Get a track at random
 java.lang.String getQueryString()
          Get a String representation of the current query
 java.util.Map getState()
          Get the current state of this PipelineElement for persisting
 java.lang.String getSummary()
          Return a String summarising the configuration of the task the source is performing
 java.util.List peekTracks(int count)
          Peek up the track list
 void setQuery(Query q)
          Set the query to use
 boolean setState(java.util.Map state)
          Load the configuration of this PipelineElement
 
Methods inherited from class com.neoworks.jukex.tracksource.TrackSourcePipelineElementSkeleton
delegateGetNextTrack, delegatePeekTracks, disable, enable, getName, getNextTrackSource, getOwner, isEnabled, removeTrack, setName, setNextTrackSource, setOwner, storeState
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.neoworks.jukex.tracksource.TrackSourcePipelineElement
disable, enable, getNextTrackSource, removeTrack, setName, setNextTrackSource, setOwner, storeState
 
Methods inherited from interface com.neoworks.jukex.tracksource.TrackSource
getName, isEnabled
 

Constructor Detail

AudioBannerPipelineElement

public AudioBannerPipelineElement()
Public constructor


AudioBannerPipelineElement

public AudioBannerPipelineElement(Query q)
Public constructor

Parameters:
q - The query to execute
Method Detail

setQuery

public void setQuery(Query q)
Set the query to use

Specified by:
setQuery in interface SearchPipelineElement
Parameters:
q - The new query

getState

public java.util.Map getState()
Get the current state of this PipelineElement for persisting

Specified by:
getState in interface TrackSourcePipelineElement
Specified by:
getState in class TrackSourcePipelineElementSkeleton
Returns:
a String keyed Map of objects representing the state of this PipelineElement, e.g. for a Playlist this would be information allowing the reconstruction of the current playlist queue.

setState

public boolean setState(java.util.Map state)
Load the configuration of this PipelineElement

Specified by:
setState in interface TrackSourcePipelineElement
Specified by:
setState in class TrackSourcePipelineElementSkeleton
Parameters:
state - a Map of values keyed by Strings representing the state of this PipelineElement.
Returns:
success

getNextTrack

public Track getNextTrack()
Get a track at random

Specified by:
getNextTrack in interface TrackSource
Returns:
a Track object

peekTracks

public java.util.List peekTracks(int count)
Peek up the track list

Specified by:
peekTracks in interface TrackSourcePipelineElement
Parameters:
count - The number of tracks to peek
Returns:
A List of Track objects

getQueryString

public java.lang.String getQueryString()
Get a String representation of the current query

Specified by:
getQueryString in interface SearchPipelineElement
Returns:
The JukeXQL query as a String

clone

public java.lang.Object clone()
Clone this RandomiserPipelineElement

Specified by:
clone in interface TrackSource
Specified by:
clone in class TrackSourcePipelineElementSkeleton
Returns:
A clone of this RandomiserPipelineElement

getDescription

public java.lang.String getDescription()
Return a String describing what, in general terms, this TrackSource does

Specified by:
getDescription in interface TrackSource
Returns:
A String

getSummary

public java.lang.String getSummary()
Return a String summarising the configuration of the task the source is performing

Specified by:
getSummary in interface TrackSource
Returns:
A String