Class Field

java.lang.Object
org.apache.guacamole.form.Field
Direct Known Subclasses:
BooleanField, DateField, EmailField, EnumField, LanguageField, MultilineField, NumericField, PasswordField, RedirectField, TerminalColorSchemeField, TextField, TimeField, TimeZoneField, UsernameField

public class Field extends Object
Represents an arbitrary field, such as an HTTP parameter, the parameter of a remote desktop protocol, or an input field within a form. Fields are generic and typed dynamically through a type string, with the semantics of the field defined by the type string. The behavior of each field type is defined either through the web application itself (see FormService.js) or through extensions.
  • Constructor Details

    • Field

      public Field()
      Creates a new Parameter with no associated name or type.
    • Field

      public Field(String name, String type)
      Creates a new Field with the given name and type.
      Parameters:
      name - The unique name to associate with this field.
      type - The type of this field.
    • Field

      public Field(String name, String type, Collection<String> options)
      Creates a new Field with the given name, type, and possible values.
      Parameters:
      name - The unique name to associate with this field.
      type - The type of this field.
      options - A collection of all possible valid options for this field.
  • Method Details

    • getName

      public String getName()
      Returns the unique name associated with this field.
      Returns:
      The unique name associated with this field.
    • setName

      public void setName(String name)
      Sets the unique name associated with this field.
      Parameters:
      name - The unique name to assign to this field.
    • getType

      public String getType()
      Returns the type of this field.
      Returns:
      The type of this field.
    • setType

      public void setType(String type)
      Sets the type of this field.
      Parameters:
      type - The type of this field.
    • getOptions

      public Collection<String> getOptions()
      Returns a mutable collection of field options. Changes to this collection directly affect the available options.
      Returns:
      A mutable collection of field options, or null if the field has no options.
    • setOptions

      public void setOptions(Collection<String> options)
      Sets the options available as possible values of this field.
      Parameters:
      options - The options to associate with this field.