Package overit.geocall.util
Class Zones
java.lang.Object
overit.geocall.util.Zones
- All Implemented Interfaces:
Serializable
The class implements a list of time zones
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.ecs.html.Option[]protected LinkedHashMap<String, String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new zone to the list of zonesstatic TimeZonegetIfAvailable(String name) Returns theTimeZonethat corresponds to the name passed as parameter, if availableorg.apache.ecs.html.Option[]Returns the array of options that corresponds to the list of zonesorg.apache.ecs.html.Option[]getOptions(String selection, String clz, String selectionClz) Returns the array of options that corresponds to the list of zonesgetZoneLabel(String name) Returns the label of the zone with the name that corresponds to the one passed as parameterbooleanChecks if the zone with the name passed as parameter is definedbooleanisEmpty()booleanisEmptyOrDefault(TimeZone defaultZ) static DateTransform the current server date as if it was the current date expressed i the local timezonestatic DateTransform the server date as if it was the date expressed i the local timezonestatic DateTransform the server date as if it was the date expressed i the local timezone
-
Field Details
-
_list
-
_htmlOptions
protected org.apache.ecs.html.Option[] _htmlOptions
-
-
Constructor Details
-
Zones
Deprecated.useZones()insteadCreates a new empty Zones instance- Parameters:
t- Not used
-
Zones
public Zones()Creates a new empty Zones instance
-
-
Method Details
-
addZone
Adds a new zone to the list of zones- Parameters:
name- The name of the zonelabel- The label used in visualization
-
getZoneLabel
Returns the label of the zone with the name that corresponds to the one passed as parameter- Parameters:
name- The name of the zone- Returns:
- The corresponding label of the zone
-
isDefined
Checks if the zone with the name passed as parameter is defined- Parameters:
name- The name of the zone- Returns:
trueif the zone is defined (ie if the zone is present in the list of Zones),falseotherwise
-
isEmptyOrDefault
-
isEmpty
public boolean isEmpty() -
getOptions
public org.apache.ecs.html.Option[] getOptions()Returns the array of options that corresponds to the list of zones- Returns:
- The array of options
-
getOptions
Returns the array of options that corresponds to the list of zones- Parameters:
selection- The id of the selected zoneclz- String that defines the css classes that will be applied to the optionsselectionClz- String that defines the css classes that will be applied to selected option- Returns:
- The array of options
-
getIfAvailable
Returns theTimeZonethat corresponds to the name passed as parameter, if available- Parameters:
name- The name of the zone- Returns:
- The corresponding TimeZone, or
null
-
localDate
Transform the current server date as if it was the current date expressed i the local timezone- Parameters:
local- timezone in which the date will be expressed- Returns:
- the shifted current server date
-
toCentral
Transform the server date as if it was the date expressed i the local timezone- Parameters:
localDate- the date expressed in the local timezonelocal- timezone in which the local date is expressed- Returns:
- the shifted local date
-
toLocal
Transform the server date as if it was the date expressed i the local timezone- Parameters:
centralDate- the date expressed in the server's timezonelocal- timezone in which the date will be expressed- Returns:
- the shifted server date
-
Zones()instead