fedora.server
Class Parameterized

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

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.

-----------------------------------------------------------------------------

License and Copyright: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The entire file consists of original code. Copyright © 2002-2005 by The Rector and Visitors of the University of Virginia and Cornell University. All rights reserved.

-----------------------------------------------------------------------------

Version:
$Id: Parameterized.java,v 1.9 2005/01/11 20:06:05 cwilper 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.