Package org.apache.guacamole.form
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
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
All types of fields which are available by default. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the unique name associated with this field.Returns a mutable collection of field options.getType()
Returns the type of this field.void
Sets the unique name associated with this field.void
setOptions
(Collection<String> options) Sets the options available as possible values of this field.void
Sets the type of this field.
-
Constructor Details
-
Field
public Field()Creates a new Parameter with no associated name or type. -
Field
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
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
Returns the unique name associated with this field.- Returns:
- The unique name associated with this field.
-
setName
Sets the unique name associated with this field.- Parameters:
name
- The unique name to assign to this field.
-
getType
Returns the type of this field.- Returns:
- The type of this field.
-
setType
Sets the type of this field.- Parameters:
type
- The type of this field.
-
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
Sets the options available as possible values of this field.- Parameters:
options
- The options to associate with this field.
-