org.musicontroller
Class UserProperties

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

public class UserProperties
extends java.lang.Object

Implements loading, setting and saving user properties.

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

Nested Class Summary
static class UserProperties.CandidateselectorPlayorder
          Specifies the possible strategies of the CandidateSelector to play requested songs.
 
Constructor Summary
UserProperties()
           
 
Method Summary
static void applyProperties(IUser user)
          Load the user properties and apply them to the MusiController.
static void applyProperties(IUser user, DJ dj)
           
static java.util.Properties loadUserProperties(IUser user)
          Loads the user properties from disk and returns them.
static void setUserProperty(User user, java.lang.String propName, java.lang.String propValue)
          Loads the users' properties file, sets the property specified in the propName parameter to the value specified in the propValue parameter and saves the properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserProperties

public UserProperties()
Method Detail

loadUserProperties

public static java.util.Properties loadUserProperties(IUser user)
Loads the user properties from disk and returns them.

Parameters:
user - Indicates the user whose properties should be loaded.
Returns:
The user properties.

applyProperties

public static void applyProperties(IUser user)
Load the user properties and apply them to the MusiController.

Parameters:
user - Specifies the user to apply the properties to.

applyProperties

public static void applyProperties(IUser user,
                                   DJ dj)

setUserProperty

public static void setUserProperty(User user,
                                   java.lang.String propName,
                                   java.lang.String propValue)
Loads the users' properties file, sets the property specified in the propName parameter to the value specified in the propValue parameter and saves the properties file.

Parameters:
user - The user.
propName - The key of the property to set.
propValue - The value of the property.


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