Top Description Fields Methods
net.fortuna.ical4j.model

public Interface TimeZoneRegistry

Known Direct Implementers
net.fortuna.ical4j.model.TimeZoneRegistryImpl
Imports
java.time.ZoneId, java.time.zone.ZoneRules, java.util.Map, .Objects, .Optional, .Set, java.util.concurrent.ConcurrentHashMap

$Id$ Created on 18/09/2005 Implementors provide a list of timezone definitions applicable for use with iCalendar objects.
Author
Ben Fortuna

Field Summary

Modifier and TypeField and Description
public static final Map<String, String>
public static final Map<String, String>

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clears all registered timezones.

public static ZoneId
public TimeZone

Returns:

a timezone matching the specified identifier. If no timezone is registered with the specified identifier null is returned.
getTimeZone
(final String
a timezone identifier
id
)

Returns a timezone with the specified identifier, potentially performing a network call to update the definition.

public String
getTzId(String zoneId)

public ZoneId
public Map<String, ZoneRules>
public void
register(final TimeZone
a timezone to be registered for use with iCalendar objects
timezone
)

Registers a new timezone for use with iCalendar objects.

public void
register(final TimeZone
a timezone to be registered for use with iCalendar objects
timezone
,
boolean
attempt to update the definition from any specified TZURL property if true
update
)

Registers a new timezone for use with iCalendar objects.

Field Detail

ZONE_ALIASESback to summary
public static final Map<String, String> ZONE_ALIASES
ZONE_IDSback to summary
public static final Map<String, String> ZONE_IDS

Method Detail

clearback to summary
public void clear()

Clears all registered timezones.

getGlobalZoneIdback to summary
public static ZoneId getGlobalZoneId(String tzId)
getTimeZoneback to summary
public TimeZone getTimeZone(final String id)

Returns a timezone with the specified identifier, potentially performing a network call to update the definition.

Timezone definitions are cached in memory, but in case of a cache miss, a request to tzurl.org is done in a synchronized block.

Parameters
id:String

a timezone identifier

Returns:TimeZone

a timezone matching the specified identifier. If no timezone is registered with the specified identifier null is returned.

getTzIdback to summary
public String getTzId(String zoneId)
getZoneIdback to summary
public ZoneId getZoneId(String tzId)
getZoneRulesback to summary
public Map<String, ZoneRules> getZoneRules()
registerback to summary
public void register(final TimeZone timezone)

Registers a new timezone for use with iCalendar objects. If a timezone with the same identifier is already registered this timezone will take precedence.

Parameters
timezone:TimeZone

a timezone to be registered for use with iCalendar objects

registerback to summary
public void register(final TimeZone timezone, boolean update)

Registers a new timezone for use with iCalendar objects. If a timezone with the same identifier is already registered this timezone will take precedence.

Parameters
timezone:TimeZone

a timezone to be registered for use with iCalendar objects

update:boolean

attempt to update the definition from any specified TZURL property if true