Package com.uc4.api
Class AbstractFormItem
java.lang.Object
com.uc4.api.AbstractFormItem
- All Implemented Interfaces:
IFormItem
- Direct Known Subclasses:
FormItemLabel,FormItemList,FormItemNumber,FormItemText
Shared implementation for each concrecte form item.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractFormItem(Element element) Constructs a generic form item from the specified XML element. -
Method Summary
Modifier and TypeMethodDescriptiongetId()Returns the internal ID of this field.getLabel()Returns the label of the field.booleanisFixed()Returnstrueif thisIFormItemis fixed.booleanisLabel()Returnstrueif this form item is a label.booleanisList()Returnstrueif this form item is a list.booleanReturnstrueif thisIFormItemis full sized.booleanisNumber()Returnstrueif this form item is a number field.booleanReturnstrueif an input is required.booleanisText()Returnstrueif this form item is a text input field.booleanReturnstrueif thisIFormItemis uppercase.booleanisValid()Tests if the current value a valid input for this field.
-
Constructor Details
-
AbstractFormItem
Constructs a generic form item from the specified XML element.- Parameters:
element- XML element
-
-
Method Details
-
isLabel
public boolean isLabel()Description copied from interface:IFormItemReturnstrueif this form item is a label. -
isText
public boolean isText()Description copied from interface:IFormItemReturnstrueif this form item is a text input field. A cast toFormItemTextcan be done if this method returnstrue. -
isNumber
public boolean isNumber()Description copied from interface:IFormItemReturnstrueif this form item is a number field. A cast toFormItemNumbercan be done if this method returnstrue. -
isList
public boolean isList()Description copied from interface:IFormItemReturnstrueif this form item is a list. A cast toFormItemListcan be done if this method returnstrue. -
getLabel
Description copied from interface:IFormItemReturns the label of the field. -
isRequired
public boolean isRequired()Description copied from interface:IFormItemReturnstrueif an input is required. In this case the value cannot be an emptyString.- Specified by:
isRequiredin interfaceIFormItem- Returns:
- Boolean indicating if a value is required to process the form
-
isValid
public boolean isValid()Description copied from interface:IFormItemTests if the current value a valid input for this field. -
isFixed
public boolean isFixed()Description copied from interface:IFormItemReturnstrueif thisIFormItemis fixed. E.g. parameter "F" is set in UC-Script. -
isUppercase
public boolean isUppercase()Description copied from interface:IFormItemReturnstrueif thisIFormItemis uppercase.- Specified by:
isUppercasein interfaceIFormItem- Returns:
- Boolean indicating if this
IFormItemis uppercase.
-
isNewLine
public boolean isNewLine()Description copied from interface:IFormItemReturnstrueif thisIFormItemis full sized. -
getId
Description copied from interface:IFormItemReturns the internal ID of this field.
-