Package com.uc4.api
Interface IFormItem
- All Known Implementing Classes:
AbstractFormItem
,FormItemLabel
,FormItemList
,FormItemNumber
,FormItemText
public interface IFormItem
This interface is implemented by all item in a read form.
The methods in this interface can be used to the type of read item.
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the internal ID of this field.getLabel()
Returns the label of the field.getValue()
Returns the current value.boolean
isFixed()
Returnstrue
if thisIFormItem
is fixed.boolean
isLabel()
Returnstrue
if this form item is a label.boolean
isList()
Returnstrue
if this form item is a list.boolean
Returnstrue
if thisIFormItem
is full sized.boolean
isNumber()
Returnstrue
if this form item is a number field.boolean
Returnstrue
if an input is required.boolean
isText()
Returnstrue
if this form item is a text input field.boolean
Returnstrue
if thisIFormItem
is uppercase.boolean
isValid()
Tests if the current value a valid input for this field.void
Sets a new value for this field.
-
Method Details
-
isLabel
boolean isLabel()Returnstrue
if this form item is a label.- Returns:
- Boolean indicating if this item is label
-
isText
boolean isText()Returnstrue
if this form item is a text input field. A cast toFormItemText
can be done if this method returnstrue
.- Returns:
- Boolean indicating if this item is a text input field
-
isNumber
boolean isNumber()Returnstrue
if this form item is a number field. A cast toFormItemNumber
can be done if this method returnstrue
.- Returns:
- Boolean indicating if this item is a number field
-
isList
boolean isList()Returnstrue
if this form item is a list. A cast toFormItemList
can be done if this method returnstrue
.- Returns:
- Boolean indicating if this item is a list
-
getLabel
String getLabel()Returns the label of the field.- Returns:
- Label of the field
-
setValue
Sets a new value for this field. This method can throw an exception if the input is not valid.- Parameters:
value
- New value
-
getValue
String getValue()Returns the current value. If a default value is set this method can be used to read the default value.- Returns:
- Value of this field
-
isRequired
boolean isRequired()Returnstrue
if an input is required. In this case the value cannot be an emptyString
.- Returns:
- Boolean indicating if a value is required to process the form
-
getId
String getId()Returns the internal ID of this field.- Returns:
- String representing the ID
-
isValid
boolean isValid()Tests if the current value a valid input for this field.- Returns:
- Boolean indicating if this
IFormItem
is valid.
-
isFixed
boolean isFixed()Returnstrue
if thisIFormItem
is fixed. E.g. parameter "F" is set in UC-Script.- Returns:
- Boolean indicating if this
IFormItem
is fixed.
-
isUppercase
boolean isUppercase()Returnstrue
if thisIFormItem
is uppercase.- Returns:
- Boolean indicating if this
IFormItem
is uppercase.
-
isNewLine
boolean isNewLine()Returnstrue
if thisIFormItem
is full sized.- Returns:
- Boolean indicating if this
IFormItem
is fully sized.
-