Package org.apache.guacamole.form
Class TimeZoneField
- java.lang.Object
-
- org.apache.guacamole.form.Field
-
- org.apache.guacamole.form.TimeZoneField
-
public class TimeZoneField extends Field
Represents a time zone field. The field may contain only valid time zone identifiers, as defined by the IANA time zone database. Such identifiers are also valid Java time zone IDs as dictated by TimeZone.getAvailableIDs().
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.guacamole.form.Field
Field.Type
-
-
Constructor Summary
Constructors Constructor Description TimeZoneField(String name)
Creates a new TimeZoneField with the given name.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
parse(String timeZone)
Parses the given string into a time zone ID string.-
Methods inherited from class org.apache.guacamole.form.Field
getName, getOptions, getType, setName, setOptions, setType
-
-
-
-
Constructor Detail
-
TimeZoneField
public TimeZoneField(String name)
Creates a new TimeZoneField with the given name.- Parameters:
name
- The unique name to associate with this field.
-
-
Method Detail
-
parse
public static String parse(String timeZone)
Parses the given string into a time zone ID string. As these strings are equivalent, the only transformation currently performed by this function is to ensure that a blank time zone string is parsed into null.- Parameters:
timeZone
- The time zone string to parse, which may be null.- Returns:
- The ID of the time zone corresponding to the given string, or null if the given time zone string was null or blank.
-
-