de.cesr.parma.core
Class PmParameterManager

java.lang.Object
  extended by de.cesr.parma.core.PmAbstractParameterReader
      extended by de.cesr.parma.core.PmParameterManager
All Implemented Interfaces:
PmParameterReader

public class PmParameterManager
extends PmAbstractParameterReader

Defines an interface for classes that provide parameter values. Also defines all parameters used throughout the model. See ParametrFramework_Documentation.doc for further information!


Constructor Summary
PmParameterManager()
           
 
Method Summary
static void copyParameterValue(PmParameterDefinition source, PmParameterDefinition target)
          Copies the current parameter value of source to the parameter definition target.
static void deregisterReader(PmParameterReader reader)
          Register a parameter reader.
static String getFullName(PmParameterDefinition definition)
          Returns the full parameter definition name containing the name of the declaring class.
static Object getParameter(PmParameterDefinition parameter)
          Get any registered parameter.
static void init()
          Let registered PmParameterReaders read parameters.
static boolean isCustomised(PmParameterDefinition definition)
          Checks whether the given definition has been set by setParameter(PmParameterDefinition, Object).
static void logParameterValues()
          Logs the current parameter values for parameters that were read into this parameter manager by PmParameterReaders before.
static void logParameterValues(PmParameterDefinition[]... params)
          Logs the current parameter values for the parameters defined in the given arrays of type PmParameterDefinitions.
static void registerReader(PmParameterReader reader)
          Register a parameter reader.
static void reset()
          Set every field to null
static void setDefaultParameterDef(PmParameterDefinition definition, PmParameterDefinition defaultDefinition)
          Registers another parameter definition that is used if there is no value set for the given parameter.
static void setParameter(PmParameterDefinition definition, Object value)
           
 
Methods inherited from class de.cesr.parma.core.PmAbstractParameterReader
deregisterAll, deregisterParameterReader, initParameters, registerParameterReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmParameterManager

public PmParameterManager()
Method Detail

getParameter

public static Object getParameter(PmParameterDefinition parameter)
Get any registered parameter. If no value is registered for the given parameter it request the default parameter and return it if defined.

Parameters:
parameter - the PmParameterDefinition whose value is requested
Returns:
the parameter's current value

isCustomised

public static boolean isCustomised(PmParameterDefinition definition)
Checks whether the given definition has been set by setParameter(PmParameterDefinition, Object).

Parameters:
definition - the definition to check
Returns:
true if the parameter has been set

setParameter

public static void setParameter(PmParameterDefinition definition,
                                Object value)
Parameters:
definition -
value -

setDefaultParameterDef

public static void setDefaultParameterDef(PmParameterDefinition definition,
                                          PmParameterDefinition defaultDefinition)
Registers another parameter definition that is used if there is no value set for the given parameter.

Parameters:
definition -
defaultDefinition -

copyParameterValue

public static void copyParameterValue(PmParameterDefinition source,
                                      PmParameterDefinition target)
Copies the current parameter value of source to the parameter definition target.

Parameters:
source -
target -

init

public static void init()
Let registered PmParameterReaders read parameters.


registerReader

public static void registerReader(PmParameterReader reader)
Register a parameter reader.

Parameters:
reader - the reader to register

deregisterReader

public static void deregisterReader(PmParameterReader reader)
Register a parameter reader.

Parameters:
reader - the reader to register

logParameterValues

public static void logParameterValues()
Logs the current parameter values for parameters that were read into this parameter manager by PmParameterReaders before. The logger name is . To log all parameter values including the default values for those that have not been read use #logParameterValues(PmParameterDefinition[]...).


logParameterValues

public static void logParameterValues(PmParameterDefinition[]... params)
Logs the current parameter values for the parameters defined in the given arrays of type PmParameterDefinitions. These can be obtained by (PmParameterDefinition[])PmFrameworkPa.values(). The logger name is .

Parameters:
params -

reset

public static void reset()
Set every field to null


getFullName

public static String getFullName(PmParameterDefinition definition)
Returns the full parameter definition name containing the name of the declaring class.

Parameters:
definition -
Returns: