public class PluginParameter<T> extends Object
RequestInformation
,
PluginRequest
Modifier and Type | Field and Description |
---|---|
private T |
defaultValue
A default value that overrides the default set by
the parameter type.
|
private String |
description
A longer help text explaining what the particular parameter
is needed for.
|
boolean |
hidden
If the parameter should be hidden from user input or not.
|
private String |
label
A short label used by the client application as in
the GUI.
|
private String |
name
The name of the parameter that the plugin use to
identify the value with.
|
private ParameterType<T> |
type
Information of the parameter type.
|
Constructor and Description |
---|
PluginParameter(String name,
String label,
String description,
ParameterType<T> type)
Constructor that sets all members except the default value.
|
PluginParameter(String name,
String label,
String description,
T defaultValue,
ParameterType<T> type)
Constructor that sets all members.
|
Modifier and Type | Method and Description |
---|---|
T |
getDefaultValue()
Get the default value for this parameter or null if no
default has been specified
|
String |
getDescription()
Get a description of the parameter.
|
String |
getLabel()
Get the label of the parameter.
|
String |
getName()
Get the parameter name.
|
ParameterType<T> |
getParameterType()
Get the parameter type, which tells the client application the
data type and allowed values for the parameter.
|
boolean |
isHidden()
Check if the parameter is a hidden parameter or not.
|
String |
toString() |
public final boolean hidden
private final String name
private final String label
private final String description
private final T defaultValue
private final ParameterType<T> type
public PluginParameter(String name, String label, String description, ParameterType<T> type)
name
- The name of the parameter, null is allowed for section headerslabel
- Label that can be used in the GUI for the parameter, or null
to create a hidden parameterdescription
- A help text explaining what the parameter is used fortype
- The parameter type, or null to create a section headerpublic PluginParameter(String name, String label, String description, T defaultValue, ParameterType<T> type)
name
- The name of the parameter, null is allowed for section headerslabel
- Label that can be used in the GUI for the parameter, or null
to create a hidden parameterdescription
- A help text explaining what the parameter is used fordefaultValue
- The default value of the parameter or null to use
the default set by the parameter typetype
- The parameter type, or null to create a section headerpublic boolean isHidden()
getParmeterType().getDefaultValue()
public String getName()
PluginRequest.setParameterValue(String, Object)
.public String getLabel()
public String getDescription()
public T getDefaultValue()
public ParameterType<T> getParameterType()
ParameterType
object