public interface PropertyDescriptor extends java.lang.Comparable<PropertyDescriptor>
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor[] |
emptyPropertySet |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asDelimitedString(java.lang.Object value)
Formats the object onto a string suitable for storage within the property map.
|
java.lang.Object[][] |
choices()
Returns a set of choice tuples of available, returns null if none present.
|
java.lang.Object |
defaultValue()
Default value to use when the user hasn't specified one or when they wish
to revert to a known-good state.
|
java.lang.String |
description()
Describes the property and the role it plays within the
rule it is specified for.
|
java.lang.String |
errorFor(java.lang.Object value)
Validation function that returns a diagnostic error message for a sample
property value.
|
boolean |
isRequired()
Denotes whether the value is required before the rule can be executed.
|
int |
maxValueCount()
If the property is multi-valued, i.e.
|
char |
multiValueDelimiter()
Return the character being used to delimit multiple property values within
a single string.
|
java.lang.String |
name()
The name of the property without spaces as it serves
as the key into the property map.
|
int |
preferredRowCount()
If the datatype is a String then return the preferred number of rows to
allocate in the text widget, returns a value of one for all other types.
|
java.lang.String |
propertyErrorFor(Rule rule)
A convenience method that returns an error string if the rule holds onto a
property value that has a problem.
|
java.lang.Class<?> |
type()
Denotes the value datatype.
|
float |
uiOrder()
Denotes the relative order the property field should occupy if we are using
an auto-generated UI to display and edit values.
|
java.lang.Object |
valueFrom(java.lang.String propertyString)
If the property is multi-valued then return the separate values after
parsing the propertyString provided.
|
static final PropertyDescriptor[] emptyPropertySet
java.lang.String name()
java.lang.String description()
java.lang.Class<?> type()
int maxValueCount()
java.lang.Object defaultValue()
boolean isRequired()
java.lang.String errorFor(java.lang.Object value)
value
- Objectfloat uiOrder()
java.lang.Object valueFrom(java.lang.String propertyString) throws java.lang.IllegalArgumentException
propertyString
- Stringjava.lang.IllegalArgumentException
java.lang.String asDelimitedString(java.lang.Object value)
value
- Objectjava.lang.Object[][] choices()
java.lang.String propertyErrorFor(Rule rule)
rule
- Rulechar multiValueDelimiter()
int preferredRowCount()