org.apache.jetspeed.modules
Class ParameterLoader

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byorg.apache.turbine.modules.GenericLoader
              extended byorg.apache.jetspeed.modules.ParameterLoader
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class ParameterLoader
extends org.apache.turbine.modules.GenericLoader

The purpose of this class is to allow one to load and execute Parameter modules.

Version:
$Id: ParameterLoader.java,v 1.5 2004/02/23 03:01:32 jford Exp $
Author:
Mark Orciuch
See Also:
Serialized Form

Method Summary
 java.lang.String eval(org.apache.turbine.util.RunData data, java.lang.String provider, java.lang.String name, java.lang.String value, java.util.Map parms)
          Attempts to load and render a parameter using custom style.
 void exec(org.apache.turbine.util.RunData data, java.lang.String name)
          This method is not used.
static java.util.Map extractStyleParameters(java.util.Map parms, java.lang.String parmName)
          Extracts any parameters to parameter style.
static ParameterLoader getInstance()
          The method through which this class is accessed.
 ParameterPresentationStyle getInstance(java.lang.String provider)
          Pulls out an instance of the object by name.
 
Methods inherited from class org.apache.turbine.modules.GenericLoader
cache, getBasePackage, reload, setReload
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

eval

public java.lang.String eval(org.apache.turbine.util.RunData data,
                             java.lang.String provider,
                             java.lang.String name,
                             java.lang.String value,
                             java.util.Map parms)
                      throws java.lang.Exception
Attempts to load and render a parameter using custom style. For example, one might define a custom parameter presentation style TextArea which displays current value of the parameter using HTML text area presentation. Assuming that TextArea is rendered using two optional parameters: rows and cols, the map passed to this method could contain the following values:
  • symbols.style.rows = 5
  • symbols.style.cols = 80 and the call might look like this:

    String symbols = eval(data, "TextArea", "symbols", "MSFT,SUNW,EMC,ORCL", parms);

    Parameters:
    data - Turbine information.
    provider - Custom parameter class name (without the package)
    name - Name for rendered HTML tag
    value - Current value
    parms - Optional rendition parameters
    Returns:
    Throws:
    java.lang.Exception - a generic exception.

  • exec

    public void exec(org.apache.turbine.util.RunData data,
                     java.lang.String name)
              throws java.lang.Exception
    This method is not used.

    Parameters:
    data - Turbine information.
    name - Name of object that will execute the screen.
    Throws:
    java.lang.Exception - a generic exception.

    getInstance

    public ParameterPresentationStyle getInstance(java.lang.String provider)
                                           throws java.lang.Exception
    Pulls out an instance of the object by name. Name is just the single name of the object.

    Parameters:
    provider - Name of object instance.
    Returns:
    A Screen with the specified name, or null.
    Throws:
    java.lang.Exception - a generic exception.

    getInstance

    public static ParameterLoader getInstance()
    The method through which this class is accessed.

    Returns:
    The single instance of this class.

    extractStyleParameters

    public static java.util.Map extractStyleParameters(java.util.Map parms,
                                                       java.lang.String parmName)
    Extracts any parameters to parameter style.

    Parameters:
    parms - portlet parameters
    Returns:
    hashtable of optional parameters for the style


    Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.