org.apache.lenya.cms.cocoon.components.modules.input
Class InputModuleParameters

java.lang.Object
  extended by org.apache.lenya.cms.cocoon.components.modules.input.InputModuleParameters

public class InputModuleParameters
extends java.lang.Object

Input module parameter class. Parses input module parameters and offers accessors for the parameters. The parameters are expected to be separated by ":".


Field Summary
protected static char PARAM_SEPARATOR
           
protected  java.lang.String[] paramList
           
protected  org.apache.avalon.framework.parameters.Parameters params
           
 
Constructor Summary
InputModuleParameters(java.lang.String parameters, java.lang.String[] paramList, int minParams)
          Parse input module parameters.
 
Method Summary
 java.lang.String getParameter(java.lang.String param)
          Get a parameter.
 boolean isParameter(java.lang.String param)
          Does a parameter with given name exists?
protected  org.apache.avalon.framework.parameters.Parameters parseParameters(java.lang.String parameters, int minParams)
          Parse parameters according to the parameter list passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_SEPARATOR

protected static final char PARAM_SEPARATOR
See Also:
Constant Field Values

params

protected org.apache.avalon.framework.parameters.Parameters params

paramList

protected final java.lang.String[] paramList
Constructor Detail

InputModuleParameters

public InputModuleParameters(java.lang.String parameters,
                             java.lang.String[] paramList,
                             int minParams)
                      throws org.apache.avalon.framework.configuration.ConfigurationException
Parse input module parameters.

Parameters:
parameters - Parameter to be parsed.
paramList - List of expected parameters.
minParams - Minimum number of parameters expected.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - if there is an error parsing the parameters.
Method Detail

parseParameters

protected org.apache.avalon.framework.parameters.Parameters parseParameters(java.lang.String parameters,
                                                                            int minParams)
                                                                     throws org.apache.avalon.framework.configuration.ConfigurationException
Parse parameters according to the parameter list passed.

Parameters:
parameters -
minParams - Minimum number of parameters.
Returns:
Parameters object initialized with parsed parameters.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

getParameter

public java.lang.String getParameter(java.lang.String param)
                              throws org.apache.avalon.framework.parameters.ParameterException
Get a parameter.

Parameters:
param - Name of requested parameter.
Returns:
Requested parameter.
Throws:
org.apache.avalon.framework.parameters.ParameterException - if the specified parameter cannot be found

isParameter

public boolean isParameter(java.lang.String param)
Does a parameter with given name exists?

Parameters:
param - Parameter name.
Returns:
True if parameters exists, otherwise false.


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.