fedora.server
Class Pluggable

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

public abstract class Pluggable
extends Parameterized

Title: Pluggable.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: Pluggable.java,v 1.9 2005/01/11 20:06:05 cwilper Exp $
Author:
cwilper@cs.cornell.edu

Constructor Summary
Pluggable()
          Creates a Pluggable with no parameters.
Pluggable(java.util.Map parameters)
          Creates a Pluggable with name-value pairs from the supplied Map.
 
Method Summary
 java.lang.String getHelp()
          Gets an explanation of how this component is to be configured via parameters.
 java.lang.String[] getOptionalParameters()
          Gets the names of optional parameters for this component.
 java.lang.String getParameterHelp(java.lang.String name)
          Gets a short explanation of how to use a named parameter.
 java.lang.String[] getRequiredModuleRoles()
          Gets the names of the roles that are required by this Pluggable.
 java.lang.String[] getRequiredParameters()
          Gets the names of required parameters for this component.
 
Methods inherited from class fedora.server.Parameterized
getParameter, getParameters, parameterNames, setParameter, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pluggable

public Pluggable()
Creates a Pluggable with no parameters.


Pluggable

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

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

getRequiredParameters

public java.lang.String[] getRequiredParameters()
Gets the names of required parameters for this component.

Returns:
String[] The required parameter names.

getOptionalParameters

public java.lang.String[] getOptionalParameters()
Gets the names of optional parameters for this component.

Returns:
String[] The required parameter names.

getParameterHelp

public java.lang.String getParameterHelp(java.lang.String name)
Gets a short explanation of how to use a named parameter.

Parameters:
name - The name of the parameter.
Returns:
String The explanation, null if no help is available or the parameter is unknown.

getHelp

public java.lang.String getHelp()
Gets an explanation of how this component is to be configured via parameters. This should not include the information available via getParameterHelp, but is more intended as an overall explanation or an explanation of those parameters whose names might be dynamic.


getRequiredModuleRoles

public java.lang.String[] getRequiredModuleRoles()
Gets the names of the roles that are required by this Pluggable.

By default, no roles need to be fulfilled.

Returns:
The roles.