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 Object implements IFormItem
Shared implementation for each concrecte form item.
  • Constructor Details

    • AbstractFormItem

      public AbstractFormItem(Element element)
      Constructs a generic form item from the specified XML element.
      Parameters:
      element - XML element
  • Method Details

    • isLabel

      public boolean isLabel()
      Description copied from interface: IFormItem
      Returns true if this form item is a label.
      Specified by:
      isLabel in interface IFormItem
      Returns:
      Boolean indicating if this item is label
    • isText

      public boolean isText()
      Description copied from interface: IFormItem
      Returns true if this form item is a text input field. A cast to FormItemText can be done if this method returns true.
      Specified by:
      isText in interface IFormItem
      Returns:
      Boolean indicating if this item is a text input field
    • isNumber

      public boolean isNumber()
      Description copied from interface: IFormItem
      Returns true if this form item is a number field. A cast to FormItemNumber can be done if this method returns true.
      Specified by:
      isNumber in interface IFormItem
      Returns:
      Boolean indicating if this item is a number field
    • isList

      public boolean isList()
      Description copied from interface: IFormItem
      Returns true if this form item is a list. A cast to FormItemList can be done if this method returns true.
      Specified by:
      isList in interface IFormItem
      Returns:
      Boolean indicating if this item is a list
    • getLabel

      public String getLabel()
      Description copied from interface: IFormItem
      Returns the label of the field.
      Specified by:
      getLabel in interface IFormItem
      Returns:
      Label of the field
    • isRequired

      public boolean isRequired()
      Description copied from interface: IFormItem
      Returns true if an input is required. In this case the value cannot be an empty String.
      Specified by:
      isRequired in interface IFormItem
      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.
      Specified by:
      isValid in interface IFormItem
      Returns:
      Boolean indicating if this IFormItem is valid.
    • isFixed

      public boolean isFixed()
      Description copied from interface: IFormItem
      Returns true if this IFormItem is fixed. E.g. parameter "F" is set in UC-Script.
      Specified by:
      isFixed in interface IFormItem
      Returns:
      Boolean indicating if this IFormItem is fixed.
    • isUppercase

      public boolean isUppercase()
      Description copied from interface: IFormItem
      Returns true if this IFormItem is uppercase.
      Specified by:
      isUppercase in interface IFormItem
      Returns:
      Boolean indicating if this IFormItem is uppercase.
    • isNewLine

      public boolean isNewLine()
      Description copied from interface: IFormItem
      Returns true if this IFormItem is full sized.
      Specified by:
      isNewLine in interface IFormItem
      Returns:
      Boolean indicating if this IFormItem is fully sized.
    • getId

      public String getId()
      Description copied from interface: IFormItem
      Returns the internal ID of this field.
      Specified by:
      getId in interface IFormItem
      Returns:
      String representing the ID