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.String
getId()
Returns the internal ID of this field.java.lang.String
getLabel()
Returns the label of the field.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
isNewLine()
Returnstrue
if thisIFormItem
is full sized.boolean
isNumber()
Returnstrue
if this form item is a number field.boolean
isRequired()
Returnstrue
if an input is required.boolean
isText()
Returnstrue
if this form item is a text input field.boolean
isUppercase()
Returnstrue
if thisIFormItem
is uppercase.boolean
isValid()
Tests if the current value a valid input for this field.
-
-
-
Method Detail
-
isLabel
public boolean isLabel()
Description copied from interface:IFormItem
Returnstrue
if this form item is a label.
-
isText
public boolean isText()
Description copied from interface:IFormItem
Returnstrue
if this form item is a text input field. A cast toFormItemText
can be done if this method returnstrue
.
-
isNumber
public boolean isNumber()
Description copied from interface:IFormItem
Returnstrue
if this form item is a number field. A cast toFormItemNumber
can be done if this method returnstrue
.
-
isList
public boolean isList()
Description copied from interface:IFormItem
Returnstrue
if this form item is a list. A cast toFormItemList
can be done if this method returnstrue
.
-
getLabel
public java.lang.String getLabel()
Description copied from interface:IFormItem
Returns the label of the field.
-
isRequired
public boolean isRequired()
Description copied from interface:IFormItem
Returnstrue
if an input is required. In this case the value cannot be an emptyString
.- Specified by:
isRequired
in interfaceIFormItem
- Returns:
- Boolean indicating if a value is required to process the form
-
isValid
public boolean isValid()
Description copied from interface:IFormItem
Tests if the current value a valid input for this field.
-
isFixed
public boolean isFixed()
Description copied from interface:IFormItem
Returnstrue
if thisIFormItem
is fixed. E.g. parameter "F" is set in UC-Script.
-
isUppercase
public boolean isUppercase()
Description copied from interface:IFormItem
Returnstrue
if thisIFormItem
is uppercase.- Specified by:
isUppercase
in interfaceIFormItem
- Returns:
- Boolean indicating if this
IFormItem
is uppercase.
-
isNewLine
public boolean isNewLine()
Description copied from interface:IFormItem
Returnstrue
if thisIFormItem
is full sized.
-
-