| Modifier and Type | Method and Description |
|---|---|
static ParameterBuilder |
create(String name)
Creates a new builder for a parameter with the given name.
|
ParameterBuilder |
description(String description)
Sets an optional description for the parameter displayed in the admin console.
|
String |
getDescription()
An optional description of the parameter.
|
String |
getLabel()
A human readable label that describes the parameter.
|
String |
getName()
The name of the parameter.
|
boolean |
isLargeText()
Returns
true if the parameter value is typically large so that it should be displayed with an textarea
instead of a simple text input field. |
boolean |
isOptional()
Returns
true if the parameter is optional. |
boolean |
isValid(String value)
This method allows to implement custom validation logic for the parameter.
|
ParameterBuilder |
label(String name)
A custom human readable label for the parameter.
|
ParameterBuilder |
largeText()
Specifies that the parameter typically has large texts as a value
|
ParameterBuilder |
matching(String regex)
Sets a regular expression that must match for parameter values to be considered as valid.
|
ParameterBuilder |
optional()
Configures the parameter to be optional.
|
public static ParameterBuilder create(String name)
FeatureState.public ParameterBuilder label(String name)
public ParameterBuilder matching(String regex)
public ParameterBuilder optional()
public ParameterBuilder largeText()
public ParameterBuilder description(String description)
public String getName()
ParameterFeatureState.getName in interface ParameterFeatureState.getParameter(String),
FeatureState.setParameter(String, String)public String getLabel()
Parameterpublic boolean isValid(String value)
Parameterpublic boolean isOptional()
Parametertrue if the parameter is optional.isOptional in interface Parameterpublic boolean isLargeText()
Parametertrue if the parameter value is typically large so that it should be displayed with an textarea
instead of a simple text input field.isLargeText in interface Parameterpublic String getDescription()
Parameternull, if no description exists.getDescription in interface ParameterCopyright © 2018. All Rights Reserved.