org.fosstrak.hal
Class ControllerProperties

java.lang.Object
  extended by org.fosstrak.hal.ControllerProperties

public class ControllerProperties
extends java.lang.Object

The ControllerProperties class encapsulates the methods responsible for the parameter setting. It can be seen as a helper class that frees the user from implementing the related methods and function calls in his concrete AutoIdController imlementation. As a convention the properties file associated with a certain reader has to be named according to its class name.

Version:
19.01.2004
Author:
Stefan Schlegel (schlstef@student.ethz.ch) Modified 06.10.2004 (Roland Schneider schnerol): Instead of using the class name to locate the properties file newly the reader ID defines the properties file name. see new constructor.

Constructor Summary
ControllerProperties(java.lang.String configFile, java.lang.String defaultConfigFile)
           
 
Method Summary
 java.lang.String getParameter(java.lang.String param)
          Gets the parameter with the specified name from the appropriate properties file.
 java.lang.String[] getParameterNames()
          Gets the names of the configurable parameters.
 void setParameter(java.lang.String param, java.lang.String value)
          Sets the specified parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerProperties

public ControllerProperties(java.lang.String configFile,
                            java.lang.String defaultConfigFile)
Method Detail

getParameter

public java.lang.String getParameter(java.lang.String param)
                              throws java.lang.Exception
Gets the parameter with the specified name from the appropriate properties file.

Parameters:
param - parameter name.
Returns:
the value of the parameter or null if parameter not available.
Throws:
Exception.
java.lang.Exception

setParameter

public void setParameter(java.lang.String param,
                         java.lang.String value)
Sets the specified parameter.

Parameters:
param - The parameter that has to be set.
value - The new value for the parameter.

getParameterNames

public java.lang.String[] getParameterNames()
                                     throws java.lang.Exception
Gets the names of the configurable parameters.

Returns:
The parameter names.
Throws:
java.lang.Exception


Copyright © 2008. All Rights Reserved.