public class StringAttribute extends PrimitiveAttribute<java.lang.String>
Attribute that reads a string from the request data.
[[examples=verboseExample]]defaultValue| Constructor and Description |
|---|
StringAttribute()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxLength() |
java.lang.Class |
getValueType()
Get the class of the value.
|
void |
setDefault(java.lang.String value)
A default value for this attribute.
|
void |
setMaxLength(int maxLength)
The maximum number of characters allowed for this field (default: unlimited).
|
void |
validateValue(java.lang.Object value)
Validation of the value from a request.
|
clientConfigTypeDescription, getDefault, getValue, getValueClass, printClientConfig, setConfigName, validatepublic final void setDefault(java.lang.String value)
A default value for this attribute. Example:
attributes:
title: !string
default: The titlesetDefault in class PrimitiveAttribute<java.lang.String>value - The default value.public final int getMaxLength()
public final void setMaxLength(int maxLength)
maxLength - Maximum number of characters.public final void validateValue(java.lang.Object value)
PrimitiveAttributevalidateValue in class PrimitiveAttribute<java.lang.String>value - The value from a request.public java.lang.Class getValueType()
Attribute