|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.metatype.AD
public class AD
The AD
class represents the AD
element of the
meta type descriptor.
Field Summary | |
---|---|
static 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 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 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 Summary | |
---|---|
AD()
|
Method Summary | |
---|---|
protected Comparable |
convertToType(String value)
|
int |
getCardinality()
|
String[] |
getDefaultValue()
|
String |
getDescription()
|
String |
getID()
|
String |
getMax()
|
String |
getMin()
|
String |
getName()
|
String[] |
getOptionLabels()
|
String[] |
getOptionValues()
|
int |
getType()
|
boolean |
isRequired()
|
void |
setCardinality(int cardinality)
|
void |
setDefaultValue(String defaultValue)
|
void |
setDefaultValue(String[] defaultValue)
|
void |
setDescription(String description)
|
void |
setID(String id)
|
void |
setMax(String max)
|
void |
setMin(String min)
|
void |
setName(String name)
|
void |
setOptions(Map options)
|
void |
setRequired(boolean isRequired)
|
void |
setType(String typeString)
|
static String[] |
splitList(String listString)
|
static int |
toType(String typeString)
|
String |
validate(String valueString)
Implements validation of the valueString and returns an
indication of the success:
null
If neither a minimal value nor a
maximal value nor any
optional values are defined in this
instance, validation cannot be performed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final 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 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 String VALIDATE_LESS_THAN_MINIMUM
validate(String)
method if the
value is less than the specified minimum value
(value is "%less than minimum").
Constructor Detail |
---|
public AD()
Method Detail |
---|
public String getID()
public String getName()
public String getDescription()
public int getType()
public int getCardinality()
public String[] getOptionLabels()
public String[] getOptionValues()
public String[] getDefaultValue()
public String getMin()
public String getMax()
public boolean isRequired()
public String validate(String valueString)
valueString
and returns an
indication of the success:
null
minimal value
nor a
maximal value
nor any
optional values
are defined in this
instance, validation cannot be performed.
valueString
is empty or null
or cannot be
converted into a numeric type.
null
, the respective value is not checked.
valueString
- The string representation of the value to validate.
VALIDATE_GREATER_THAN_MAXIMUM
,
VALIDATE_LESS_THAN_MINIMUM
,
VALIDATE_NOT_A_VALID_OPTION
public void setID(String id)
id
- the id to setpublic void setName(String name)
name
- the name to setpublic void setDescription(String description)
description
- the description to setpublic void setType(String typeString)
typeString
- the type to setpublic void setCardinality(int cardinality)
cardinality
- the cardinality to setpublic void setOptions(Map options)
options
- the options to setpublic void setDefaultValue(String defaultValue)
defaultValue
- the defaultValue to setpublic void setMin(String min)
min
- the min to setpublic void setMax(String max)
max
- the max to setpublic void setDefaultValue(String[] defaultValue)
defaultValue
- the defaultValue to setpublic void setRequired(boolean isRequired)
isRequired
- the isRequired to setpublic static int toType(String typeString)
public static String[] splitList(String listString)
protected Comparable convertToType(String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |