Package com.uc4.api
Class AbstractFormItem
- java.lang.Object
-
- com.uc4.api.AbstractFormItem
-
- All Implemented Interfaces:
IFormItem
- Direct Known Subclasses:
FormItemLabel,FormItemList,FormItemNumber,FormItemText
public abstract class AbstractFormItem extends java.lang.Object implements IFormItem
Shared implementation for each concrecte form item.
-
-
Constructor Summary
Constructors Constructor Description AbstractFormItem(org.w3c.dom.Element element)Constructs a generic form item from the specified XML element.
-
Method Summary
All Methods Instance Methods Concrete 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.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.
-
-
-
Method Detail
-
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
public java.lang.String 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.
-
-