fedora.server
Class Parameterized

java.lang.Object
  extended byfedora.server.Parameterized
Direct Known Subclasses:
DatastoreConfig, Pluggable

public abstract class Parameterized
extends java.lang.Object

Title: Parameterized.java

Description: Abstract superclass of all Fedora components that can be configured by a set of name-value pairs.

Version:
$Id: Parameterized.java,v 1.10 2005/04/21 12:45:06 rlw Exp $
Author:
cwilper@cs.cornell.edu

Constructor Summary
Parameterized()
          Creates a Parameterized with no parameters.
Parameterized(java.util.Map parameters)
          Creates a Parameterized with name-value pairs from the supplied Map.
 
Method Summary
 java.lang.String getParameter(java.lang.String name)
          Gets the value of a named configuration parameter.
 java.util.Map getParameters()
           
 java.util.Iterator parameterNames()
          Gets an Iterator over the names of parameters for this component.
protected  void setParameter(java.lang.String name, java.lang.String value)
           
protected  void setParameters(java.util.Map parameters)
          Sets the parameters with name-value pairs from the supplied Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parameterized

public Parameterized()
Creates a Parameterized with no parameters.


Parameterized

public Parameterized(java.util.Map parameters)
Creates a Parameterized with name-value pairs from the supplied Map.

Parameters:
parameters - The map from which to derive the name-value pairs.
Method Detail

setParameters

protected final void setParameters(java.util.Map parameters)
Sets the parameters with name-value pairs from the supplied Map. This is protected because it is intended to only be called by subclasses where super(Map m) is not possible to call at the start of the constructor. Server.java:Server(URL) is an example of this.

Parameters:
parameters - The map from which to derive the name-value pairs.

getParameter

public final java.lang.String getParameter(java.lang.String name)
Gets the value of a named configuration parameter.

Parameters:
name - The parameter name.
Returns:
String The value, null if undefined.

setParameter

protected final void setParameter(java.lang.String name,
                                  java.lang.String value)

getParameters

public java.util.Map getParameters()

parameterNames

public final java.util.Iterator parameterNames()
Gets an Iterator over the names of parameters for this component.

Returns:
Iterator The names.