org.musicontroller
Class DJFactory

java.lang.Object
  extended by org.musicontroller.DJFactory

public class DJFactory
extends java.lang.Object

Factory for DJ objects. The factory will create a new DJ, equip it with a candidate selector and a song selector. The factory will also try to load and apply the user properties to the new DJ and its components.

Version:
$Id: DJFactory.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $
Author:
drexler

Constructor Summary
DJFactory()
           
 
Method Summary
 DJ create(java.lang.Long userid)
          Creates a DJ object.
 CandidateSelector getCandidateSelector()
          Getter for the candidate selector.
 MusiController getMusiController()
          Getter for the MusiController object.
 void setCandidateSelector(CandidateSelector selector)
          Setter for the candidate selector.
 void setMusiController(MusiController controller)
          Setter for the MusiController object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DJFactory

public DJFactory()
Method Detail

create

public DJ create(java.lang.Long userid)
Creates a DJ object. The DJ object is fitted with a song selector object for selecting the songs to play, and a MusiController object to save the song-events, and a random candidate selector to select candidates for the songselector.

Parameters:
userid - The id of the user the Dj will play songs for.
Returns:
The created DJ.

getMusiController

public MusiController getMusiController()
Getter for the MusiController object.

Returns:
The MusiController object.

setMusiController

public void setMusiController(MusiController controller)
Setter for the MusiController object.

Parameters:
controller - The MusiController object.

getCandidateSelector

public CandidateSelector getCandidateSelector()
Getter for the candidate selector.

Returns:
The candidate selector.

setCandidateSelector

public void setCandidateSelector(CandidateSelector selector)
Setter for the candidate selector. This selector will be shared among all DJ's.

Parameters:
selector - The candidate selector.


Copyright © 2010 A.J.V.. All Rights Reserved.