fr.tireme.shared.param
Class Configuration

java.lang.Object
  extended by fr.tireme.shared.param.Configuration

public class Configuration
extends java.lang.Object

Responsible of configuration of external parameters.

Version:
2.0, november 2003
Author:
pierre

Constructor Summary
Configuration(org.w3c.dom.Element elem, Parameters param)
          Constructor for Configuration from an element conforming to the parameter DTD The configuration created will become thez current one.
Configuration(java.lang.String newConfName, Parameters param)
          Constructor for Configuration from a sole configuration name.
Configuration(java.lang.String newConfName, Parameters param, boolean selected)
          Constructor for Configuration from a sole configuration name.
 
Method Summary
 Configuration cloneConf(java.lang.String newName)
          Description of the Method
 boolean getBoolEntry(java.lang.String section, java.lang.String param)
          Gets the boolEntry attribute of the Parameters object
 java.lang.String getEntry(java.lang.String section, java.lang.String param)
          Gets the entry attribute of the Parameters object
 java.lang.String getName()
          Gets the name attribute of the Configuration object
 boolean isSelected()
          Gets the selected attribute of the Configuration object
 void setEntry(java.lang.String section, java.lang.String parameter, boolean value)
          Sets the entry attribute of the Parameters object
 void setEntry(java.lang.String section, java.lang.String parameter, java.lang.String value)
          Sets an entry value for a section
 void setName(java.lang.String newName)
          Set the name attribute of the Configuration object
 void setSelected()
          Sets the selected attribute of the Configuration object
 void setSelected(boolean sel)
          Sets the selected attribute of the Configuration object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration(org.w3c.dom.Element elem,
                     Parameters param)
              throws ParamException
Constructor for Configuration from an element conforming to the parameter DTD The configuration created will become thez current one.

Parameters:
elem - element from which the configuration will be build
param - Parameter object to which the new configuration becomes
Throws:
ParamException - Error in parameter

Configuration

public Configuration(java.lang.String newConfName,
                     Parameters param)
Constructor for Configuration from a sole configuration name. The configuration created will become thez current one.

Parameters:
newConfName - Configuration name
param - Parameter object to which the new configuration becomes

Configuration

public Configuration(java.lang.String newConfName,
                     Parameters param,
                     boolean selected)
Constructor for Configuration from a sole configuration name. Depending on parameter, the configuration created will become thez current one or not.

Parameters:
newConfName - Configuration name
param - Parameter object to which the new configuration becomes
selected - Description of Parameter
Method Detail

cloneConf

public Configuration cloneConf(java.lang.String newName)
                        throws ParamException
Description of the Method

Parameters:
newName - Description of Parameter
Returns:
Description of the Returned Value
Throws:
ParamException - Description of Exception

getBoolEntry

public boolean getBoolEntry(java.lang.String section,
                            java.lang.String param)
                     throws ParamDoesNotExistsException
Gets the boolEntry attribute of the Parameters object

Parameters:
section - Description of the Parameter
param - Description of the Parameter
Returns:
The boolEntry value
Throws:
ParamDoesNotExistsException - Description of Exception

getEntry

public java.lang.String getEntry(java.lang.String section,
                                 java.lang.String param)
                          throws ParamDoesNotExistsException
Gets the entry attribute of the Parameters object

Parameters:
section - Description of Parameter
param - Description of Parameter
Returns:
The entry value
Throws:
ParamDoesNotExistsException - Description of Exception

getName

public java.lang.String getName()
Gets the name attribute of the Configuration object

Returns:
The name value

isSelected

public boolean isSelected()
Gets the selected attribute of the Configuration object

Returns:
The selected value

setEntry

public void setEntry(java.lang.String section,
                     java.lang.String parameter,
                     boolean value)
              throws ParamDoesNotExistsException
Sets the entry attribute of the Parameters object

Parameters:
section - section name
parameter - parameter name
value - value of the parameter
Throws:
ParamDoesNotExistsException - Description of Exception

setEntry

public void setEntry(java.lang.String section,
                     java.lang.String parameter,
                     java.lang.String value)
              throws ParamDoesNotExistsException
Sets an entry value for a section

Parameters:
section - section name
parameter - parameter name
value - value of the parameter
Throws:
ParamDoesNotExistsException - Description of Exception

setName

public void setName(java.lang.String newName)
Set the name attribute of the Configuration object

Parameters:
newName - The new name value

setSelected

public void setSelected()
Sets the selected attribute of the Configuration object


setSelected

public void setSelected(boolean sel)
Sets the selected attribute of the Configuration object

Parameters:
sel - The new selected value