public class AD extends OptionalAttributes
AD
class represents the AD
element of the
meta type descriptor.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VALIDATE_GREATER_THAN_MAXIMUM
The message returned from the
validate(String) method if the
value is greater than the specified maximum value
(value is "%greater than maximum"). |
static java.lang.String |
VALIDATE_INVALID_VALUE
The message returned from the
validate(String) method if the
value is invalid considering its type (value is "%invalid value"). |
static java.lang.String |
VALIDATE_LESS_THAN_MINIMUM
The message returned from the
validate(String) method if the
value is less than the specified minimum value
(value is "%less than minimum"). |
static java.lang.String |
VALIDATE_MISSING
The message returned from the
validate(String) method if the
value is null or cannot be converted to an attribute value and a value
is required (value is "%missing required value"). |
static java.lang.String |
VALIDATE_NOT_A_VALID_OPTION
The message returned from the
validate(String) method if the
value is not any of the specified option values
(value is "%not a valid option"). |
Constructor and Description |
---|
AD() |
Modifier and Type | Method and Description |
---|---|
int |
getCardinality() |
java.lang.String[] |
getDefaultValue() |
java.lang.String |
getDescription() |
java.lang.String |
getID() |
java.lang.String |
getMax() |
java.lang.String |
getMin() |
java.lang.String |
getName() |
java.lang.String[] |
getOptionLabels() |
java.lang.String[] |
getOptionValues() |
int |
getType() |
boolean |
isRequired() |
void |
setCardinality(int cardinality) |
void |
setDefaultValue(java.lang.String defaultValue)
Sets the default value(s) for this AD.
|
void |
setDescription(java.lang.String description) |
void |
setID(java.lang.String id) |
void |
setMax(java.lang.String max) |
void |
setMin(java.lang.String min) |
void |
setName(java.lang.String name) |
void |
setOptions(java.util.Map options) |
void |
setRequired(boolean isRequired) |
void |
setType(java.lang.String typeString) |
static java.lang.String[] |
splitList(java.lang.String listString) |
static int |
toType(java.lang.String typeString) |
java.lang.String |
validate(java.lang.String valueString)
Implements validation of the
valueString and returns an
indication of the validation result. |
addOptionalAttribute, getOptionalAttributes
public static final java.lang.String VALIDATE_NOT_A_VALID_OPTION
validate(String)
method if the
value is not any of the specified option values
(value is "%not a valid option").public static final java.lang.String VALIDATE_INVALID_VALUE
validate(String)
method if the
value is invalid considering its type (value is "%invalid value").public static final java.lang.String VALIDATE_GREATER_THAN_MAXIMUM
validate(String)
method if the
value is greater than the specified maximum value
(value is "%greater than maximum").public static final java.lang.String VALIDATE_LESS_THAN_MINIMUM
validate(String)
method if the
value is less than the specified minimum value
(value is "%less than minimum").public static final java.lang.String VALIDATE_MISSING
validate(String)
method if the
value is null or cannot be converted to an attribute value and a value
is required
(value is "%missing required value").public java.lang.String getID()
public java.lang.String getName()
public java.lang.String getDescription()
public int getType()
public int getCardinality()
public java.lang.String[] getOptionLabels()
public java.lang.String[] getOptionValues()
public java.lang.String[] getDefaultValue()
public java.lang.String getMin()
public java.lang.String getMax()
public boolean isRequired()
public java.lang.String validate(java.lang.String valueString)
valueString
and returns an
indication of the validation result.valueString
- The string representation of the value to validate,
can be null
.null
if no validation is performed, "" if
the value is accepted as valid, or a non-empty string
indicating a validation problem was found.ADValidator.validate(AD, String)
,
VALIDATE_GREATER_THAN_MAXIMUM
,
VALIDATE_NOT_A_VALID_OPTION
,
VALIDATE_LESS_THAN_MINIMUM
,
VALIDATE_INVALID_VALUE
,
VALIDATE_MISSING
public void setID(java.lang.String id)
id
- the id to setpublic void setName(java.lang.String name)
name
- the name to setpublic void setDescription(java.lang.String description)
description
- the description to setpublic void setType(java.lang.String typeString)
typeString
- the type to setpublic void setCardinality(int cardinality)
cardinality
- the cardinality to setpublic void setOptions(java.util.Map options)
options
- the options to setpublic void setDefaultValue(java.lang.String defaultValue)
NOTE: this method is depending on the value of getCardinality()
! Make sure that the
cardinality is properly set before calling this method.
defaultValue
- the default value to set, as encoded string-value (using comma's as separator), can be null
.public void setMin(java.lang.String min)
min
- the min to setpublic void setMax(java.lang.String max)
max
- the max to setpublic void setRequired(boolean isRequired)
isRequired
- the isRequired to setpublic static int toType(java.lang.String typeString)
public static java.lang.String[] splitList(java.lang.String listString)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"