Package de.espirit.firstspirit.forms
Interface FormField<T>
- Type Parameters:
T
- Type of value, seeget()
,getType()
, andvalidate(Object)
.
- All Known Subinterfaces:
RemoteFormField<T>
public interface FormField<T>
Language specific property container of a form's field.
- Since:
- 4.2.404
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionget()
Provides the current value of the field.getName()
Returns the name of the field.getType()
Get the type of the field's value.boolean
Indicates that the field represents a default value.boolean
isEmpty()
Indicates that the value of this field is empty.boolean
isSet()
Indicates that the value of this field is set.void
Set the value of this field.void
Set the field to its default value.void
Validate the given value.
-
Method Details
-
getName
String getName()Returns the name of the field.- Returns:
- The field's name.
- Since:
- 4.2.404
-
getType
Get the type of the field's value.- Returns:
- The field's type.
- Since:
- 4.2.404
-
isSet
boolean isSet()Indicates that the value of this field is set.- Returns:
true
, iff field is set.- Since:
- 4.2.404
-
isEmpty
boolean isEmpty()Indicates that the value of this field is empty.- Returns:
true
, iff field evaluates to empty.- Since:
- 4.2.404
-
isDefault
boolean isDefault()Indicates that the field represents a default value.- Returns:
true
, iff field represents a default.- Since:
- 4.2.404
-
get
Provides the current value of the field.- Returns:
- The field's value.
- Since:
- 4.2.404
-
set
void set(@Nullable @Nullable Object value) throws InappropriateValueException, UnsupportedOperationException Set the value of this field. Appropriate values are those understood by the underlying gadget component not necessarily restricted to the definedvalue type
. For a specific gagdet, see the assimilation note of thecorresponding interface
's documentation giving the list of supported types.- Parameters:
value
- The value to be set.- Throws:
InappropriateValueException
- If the given value is not appropriate for this field.UnsupportedOperationException
- If the field does not support setting its value.- Since:
- 4.2.404
- See Also:
-
setToDefault
Set the field to its default value.- Throws:
UnsupportedOperationException
- If the field does not support setting its value.- Since:
- 4.2.404
-
validate
Validate the given value.- Parameters:
value
- The value to validate.- Throws:
InappropriateValueException
- If the value is not valid.- Since:
- 4.2.404
-