|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Field
Interface defining a form field. The interface defines the set of base properties and operations that each field must implement.
Method Summary | |
---|---|
java.lang.String |
getDefault()
Return string representation of the default value of this field |
java.lang.String |
getName()
Return the name of this field. |
java.util.regex.Pattern |
getPattern()
Return the pattern used to identify this field. |
java.util.Properties |
getProperties()
Return all the field specific properties. |
java.lang.String |
getProperty(java.lang.String name)
Return a field specific property. |
java.lang.String |
getResourceKey()
Return the resource key used to lookup the display value of this field. |
boolean |
isRequired()
Indicates whether this field is required or not. |
void |
setDefault(java.lang.String value)
Set string representation of the default value of this field. |
void |
setName(java.lang.String name)
Set the name of this field. |
void |
setPattern(java.util.regex.Pattern pattern)
Set the pattern used to identify this field. |
void |
setProperties(java.util.Properties props)
Set any field specific properties. |
void |
setRequired(java.lang.Boolean required)
Set the required flag of this field. |
void |
setResourceKey(java.lang.String key)
Set the value of the resource key used to look up the display value of this field. |
java.lang.Object |
validate(java.lang.String value,
java.util.ResourceBundle bundle)
Perform validation of the given String value and return target type of this field. |
Method Detail |
---|
java.lang.String getName()
void setName(java.lang.String name)
name
- String indicating the name of this field.java.lang.String getResourceKey()
void setResourceKey(java.lang.String key)
key
- String containing resource key.java.util.regex.Pattern getPattern()
void setPattern(java.util.regex.Pattern pattern)
pattern
- Pattern containing the regex pattern used to identify
this field.boolean isRequired()
void setRequired(java.lang.Boolean required)
required
- Flag to indicate whether this field is required.java.lang.String getDefault()
void setDefault(java.lang.String value) throws ValidationException
value
- String representation of default value.
ValidationException
- if the default value cannot be created.void setProperties(java.util.Properties props)
props
- Field specific properties.java.lang.String getProperty(java.lang.String name)
name
- Property name.
java.util.Properties getProperties()
java.lang.Object validate(java.lang.String value, java.util.ResourceBundle bundle) throws ValidationException
value
- String value that must be validated.bundle
- ResourceBundle to use for messages.
ValidationException
- if the field cannot be validated.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |