org.gxos.util
Class CustomParameters

java.lang.Object
  |
  +--org.gxos.util.CustomParameters

public class CustomParameters
extends java.lang.Object

Utility class for handling custom parameters.

$Id: CustomParameters.java,v 1.6 2001/09/27 19:33:22 balsoy Exp $


Constructor Summary
CustomParameters()
           
 
Method Summary
static java.util.Hashtable getParameters(java.util.Hashtable parameters, CustomParameter objparams)
          Fills a hashtable object with custom parameters in a given object.
static java.lang.String getValue(CustomParameter parameters, java.lang.String key)
          Returns the value associated to a key in a given CustomParameter object list.
static void setValue(CustomParameter parameters, java.lang.String key, java.lang.String value)
          Adds a key/value pair to a parameter list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomParameters

public CustomParameters()
Method Detail

getParameters

public static java.util.Hashtable getParameters(java.util.Hashtable parameters,
                                                CustomParameter objparams)
Fills a hashtable object with custom parameters in a given object. Any alterations on these parameter objects also affect the parenting XML object in memory.
Parameters:
parameters - a hash table which will be filled with parameters from a schema object whose type is CustomParameter
objparams - XML type of a hash table. Usually used in NoreProfile/TreeContext in TreeObjects.
Returns:
newly filled hashtable returned. If the hashtable is null initially, it is initiated.
See Also:
CustomParameter

getValue

public static java.lang.String getValue(CustomParameter parameters,
                                        java.lang.String key)
Returns the value associated to a key in a given CustomParameter object list.
Parameters:
parameters - parameter list
key - key to search for.
Returns:
value associated to the given key.

setValue

public static void setValue(CustomParameter parameters,
                            java.lang.String key,
                            java.lang.String value)
Adds a key/value pair to a parameter list. If key exists, its value is replaced. If key exists and value is given as null, then key/pair is removed from the list.
Parameters:
parameters - parameter list
key - key to search for.
value - value to add to the list. Set to null to remove this key/value pair.