Package com.uc4.api
Interface IFormItem
-
- All Known Implementing Classes:
AbstractFormItem,FormItemLabel,FormItemList,FormItemNumber,FormItemText
public interface IFormItemThis 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetId()Returns the internal ID of this field.java.lang.StringgetLabel()Returns the label of the field.java.lang.StringgetValue()Returns the current value.booleanisFixed()Returnstrueif thisIFormItemis fixed.booleanisLabel()Returnstrueif this form item is a label.booleanisList()Returnstrueif this form item is a list.booleanisNewLine()Returnstrueif thisIFormItemis full sized.booleanisNumber()Returnstrueif this form item is a number field.booleanisRequired()Returnstrueif an input is required.booleanisText()Returnstrueif this form item is a text input field.booleanisUppercase()Returnstrueif thisIFormItemis uppercase.booleanisValid()Tests if the current value a valid input for this field.voidsetValue(java.lang.String value)Sets a new value for this field.
-
-
-
Method Detail
-
isLabel
boolean isLabel()
Returnstrueif this form item is a label.- Returns:
- Boolean indicating if this item is label
-
isText
boolean isText()
Returnstrueif this form item is a text input field. A cast toFormItemTextcan be done if this method returnstrue.- Returns:
- Boolean indicating if this item is a text input field
-
isNumber
boolean isNumber()
Returnstrueif this form item is a number field. A cast toFormItemNumbercan be done if this method returnstrue.- Returns:
- Boolean indicating if this item is a number field
-
isList
boolean isList()
Returnstrueif this form item is a list. A cast toFormItemListcan be done if this method returnstrue.- Returns:
- Boolean indicating if this item is a list
-
getLabel
java.lang.String getLabel()
Returns the label of the field.- Returns:
- Label of the field
-
setValue
void setValue(java.lang.String value)
Sets a new value for this field. This method can throw an exception if the input is not valid.- Parameters:
value- New value
-
getValue
java.lang.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()
Returnstrueif 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
java.lang.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
IFormItemis valid.
-
isFixed
boolean isFixed()
Returnstrueif thisIFormItemis fixed. E.g. parameter "F" is set in UC-Script.- Returns:
- Boolean indicating if this
IFormItemis fixed.
-
isUppercase
boolean isUppercase()
Returnstrueif thisIFormItemis uppercase.- Returns:
- Boolean indicating if this
IFormItemis uppercase.
-
-