com.splunk.modularinput
Class Parameter

java.lang.Object
  extended by com.splunk.modularinput.Parameter
Direct Known Subclasses:
MultiValueParameter, SingleValueParameter

public abstract class Parameter
extends java.lang.Object

The Parameter class is a base class for parameters of modular inputs. It has two subclasses: SingleValueParameter and MultiValueParameter. All parameters should be constructed with the static nodeToParameterList method, which takes an XML org.w3c.dom.Node object as its argument and returns a list of Parameter objects, single valued or multi valued as needed.


Method Summary
abstract  java.lang.String getName()
           
static java.util.List<Parameter> nodeToParameterList(org.w3c.dom.Node node)
          Generates a list of Parameter objects from an org.w3c.dom.Node object containing a set of parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public abstract java.lang.String getName()

nodeToParameterList

public static java.util.List<Parameter> nodeToParameterList(org.w3c.dom.Node node)
                                                     throws MalformedDataException
Generates a list of Parameter objects from an org.w3c.dom.Node object containing a set of parameters. The node may be any element, but is expected to contain elements param or param_list, as in
 <stanza name="foobar://aaa">
     <param name="param1">value1</param>
     <param name="param2">value2</param>
     <param name="disabled">0</param>
     <param name="index">default</param>
     <param_list name="multiValue">
         <value>value1</value>
         <value>value2</value>
     </param_list>
 </stanza>
 
 

Parameters:
node - An org.w3c.dom.Node object containing the parameter list as children.
Returns:
A list of Parameter objects extracted from the XML.
Throws:
MalformedDataException - If the XML does not specify a valid parameter list.