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
equals, 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 value1 value2 0 default value1 value2

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.