com.splunk.modularinput
Class Argument

java.lang.Object
  extended by com.splunk.modularinput.Argument

public class Argument
extends java.lang.Object

The Argument class represents an argument to a modular input kind. Argument is meant to be used with Scheme to generate an XML definition of the modular input kind that Splunk understands.


Nested Class Summary
static class Argument.DataType
           
 
Field Summary
protected  Argument.DataType dataType
           
protected  java.lang.String description
           
protected  java.lang.String name
           
protected  boolean requiredOnCreate
           
protected  boolean requiredOnEdit
           
protected  java.lang.String validation
           
 
Constructor Summary
Argument(java.lang.String name)
           
 
Method Summary
 void addToDocument(org.w3c.dom.Document doc, org.w3c.dom.Node parent)
          Returns an Element object representing this argument that can be added to another XML document for the Scheme.
 Argument.DataType getDataType()
          Gets the data type of this argument.
 java.lang.String getDescription()
          Gets the human readable description of this argument.
 java.lang.String getName()
          Gets the name that Splunk uses to represent this argument.
 java.lang.String getValidation()
          Gets the validation to be used on this argument, if using internal validation.
 boolean isRequiredOnCreate()
          Returns whether a value for this argument must be specified when creating a modular input of this kind.
 boolean isRequiredOnEdit()
          Returns whether a value for this argument must be specified when editing an existing modular input of this kind.
 void setDataType(Argument.DataType dataType)
          Sets the data type of this argument.
 void setDescription(java.lang.String description)
          Sets the human readable description of this argument.
 void setName(java.lang.String name)
          Sets the name that Splunk will use to represent this argument.
 void setRequiredOnCreate(boolean requiredOnCreate)
          Sets whether a value for this argument must be specified when creating a modular input of this kind.
 void setRequiredOnEdit(boolean requiredOnEdit)
          Sets whether a value for this argument must be specified when editing an existing modular input of this kind.
 void setValidation(java.lang.String validation)
          Sets the validation string that internal validation should use on this argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

description

protected java.lang.String description

validation

protected java.lang.String validation

dataType

protected Argument.DataType dataType

requiredOnEdit

protected boolean requiredOnEdit

requiredOnCreate

protected boolean requiredOnCreate
Constructor Detail

Argument

public Argument(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Gets the name that Splunk uses to represent this argument.

Returns:
The argument's name.

setName

public void setName(java.lang.String name)
Sets the name that Splunk will use to represent this argument.

Parameters:
name - The name that Splunk will use to represent this argument.

getDescription

public java.lang.String getDescription()
Gets the human readable description of this argument.

Returns:
The argument's description.

setDescription

public void setDescription(java.lang.String description)
Sets the human readable description of this argument.

Parameters:
description - The human readable description of this argument.

getValidation

public java.lang.String getValidation()
Gets the validation to be used on this argument, if using internal validation.

Returns:
The validation used on the argument.

setValidation

public void setValidation(java.lang.String validation)
Sets the validation string that internal validation should use on this argument.

Parameters:
validation - The validation string that internal validation should use on this argument.

getDataType

public Argument.DataType getDataType()
Gets the data type of this argument.

Returns:
The data type of the argument.

setDataType

public void setDataType(Argument.DataType dataType)
Sets the data type of this argument.

Parameters:
dataType - The data type of this argument.

isRequiredOnEdit

public boolean isRequiredOnEdit()
Returns whether a value for this argument must be specified when editing an existing modular input of this kind.

Returns:
true if a value for this argument must be specified when editing an existing modular input of this kind, false if not.

setRequiredOnEdit

public void setRequiredOnEdit(boolean requiredOnEdit)
Sets whether a value for this argument must be specified when editing an existing modular input of this kind.

Parameters:
requiredOnEdit - true if a value for this argument must be specified when editing an existing modular input of this kind, false if not.

isRequiredOnCreate

public boolean isRequiredOnCreate()
Returns whether a value for this argument must be specified when creating a modular input of this kind.

Returns:
true if a value for this argument must be specified when creating a modular input of this kind, false if not.

setRequiredOnCreate

public void setRequiredOnCreate(boolean requiredOnCreate)
Sets whether a value for this argument must be specified when creating a modular input of this kind.

Parameters:
requiredOnCreate - true if a value for this argument must be specified when creating a modular input of this kind, false if not.

addToDocument

public void addToDocument(org.w3c.dom.Document doc,
                          org.w3c.dom.Node parent)
Returns an Element object representing this argument that can be added to another XML document for the Scheme.

Parameters:
doc - The XML document.
parent - The parent object.