public class StringParameterType extends ParameterType<String>
max length
for the text.Constructor and Description |
---|
StringParameterType()
Create a new string parameter type, setting the max length to 255 and
nulls are allowed.
|
StringParameterType(Integer maxLength,
String defaultValue,
boolean notNull)
Create a new string parameter type.
|
StringParameterType(Integer maxLength,
String defaultValue,
boolean notNull,
int multiplicity,
int width,
int height) |
StringParameterType(Integer maxLength,
String defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
Enumeration<String,String> items) |
StringParameterType(Integer maxLength,
String defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
Enumeration<String,String> items,
boolean checkValues) |
StringParameterType(Integer maxLength,
String defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<String> items) |
Modifier and Type | Method and Description |
---|---|
Integer |
getMaxLength()
Get the max length of the parameter.
|
(package private) ParameterValueData<String> |
newParameterValueData()
Create a new
TextParameterValueData object. |
String |
toString() |
private static Type |
typeFromLength(Integer maxLength) |
(package private) void |
validateValue(String name,
String value)
Checks if the value is a
String object
and shorter than the maximum length. |
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, validate, validate
private final Integer maxLength
public StringParameterType()
public StringParameterType(Integer maxLength, String defaultValue, boolean notNull)
maxLength
- The maximum length of the string that is allowed or null
to allow as long as possibledefaultValue
- The default value of this parameternotNull
- FALSE if nulls values are allowed, TRUE otherwisepublic StringParameterType(Integer maxLength, String defaultValue, boolean notNull, int multiplicity, int width, int height)
public StringParameterType(Integer maxLength, String defaultValue, boolean notNull, int multiplicity, int width, int height, List<String> items)
public StringParameterType(Integer maxLength, String defaultValue, boolean notNull, int multiplicity, int width, int height, Enumeration<String,String> items)
public StringParameterType(Integer maxLength, String defaultValue, boolean notNull, int multiplicity, int width, int height, Enumeration<String,String> items, boolean checkValues)
void validateValue(String name, String value) throws InvalidDataException
String object
and shorter than the maximum length.
validateValue
in class ParameterType<String>
value
- The value to testname
- The name of the parameter, use the name if there is need to
throw an exceptionInvalidDataException
- If the value is not a string or too longParameterValueData<String> newParameterValueData()
TextParameterValueData
object.newParameterValueData
in class ParameterType<String>
public Integer getMaxLength()