public class TimeZoneServiceImpl extends Object implements TimeZoneService, TimeZoneResolver
JIRA, SYSTEM| Constructor and Description |
|---|
TimeZoneServiceImpl(ApplicationProperties applicationProperties,
PermissionManager permissionManager,
UserPreferencesManager userPreferencesManager) |
TimeZoneServiceImpl(ApplicationProperties applicationProperties,
PermissionManager permissionManager,
UserPreferencesManager userPreferencesManager,
com.atlassian.jira.timezone.TimeZoneIdsProvider timeZoneIdsProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearDefaultTimeZone(JiraServiceContext serviceContext)
Reset the default time zone to the JVM time zone.
|
void |
clearUserDefaultTimeZone(JiraServiceContext serviceContext)
Resets the time zone for this user to the JIRA default time zone.
|
protected Set<String> |
getCanonicalIds() |
TimeZone |
getDefaultTimeZone(JiraServiceContext serviceContext)
Returns the JIRA default time zone.
|
TimeZoneInfo |
getDefaultTimeZoneInfo(JiraServiceContext serviceContext)
Returns the default time zone which is globally configured.
|
String |
getDefaultTimeZoneRegionKey()
Return the region key of the current default time zone.
|
protected TimeZone |
getJVMTimeZone() |
TimeZoneInfo |
getJVMTimeZoneInfo(JiraServiceContext serviceContext)
Returns the time zone of the JVM
|
List<TimeZoneInfo> |
getTimeZoneInfos(JiraServiceContext serviceContext)
Retrieves all time zones.
|
List<RegionInfo> |
getTimeZoneRegions(JiraServiceContext serviceContext)
Returns all time zone regions.
|
TimeZone |
getUserTimeZone(JiraServiceContext serviceContext)
Returns a user's effective time zone.
|
TimeZoneInfo |
getUserTimeZoneInfo(JiraServiceContext serviceContext)
Return the time zone for this user.
|
void |
setDefaultTimeZone(String timeZoneId,
JiraServiceContext serviceContext)
Allows to set the default time zone.
|
void |
setUserDefaultTimeZone(String timeZoneId,
JiraServiceContext serviceContext)
Sets the default time zone for this user.
|
boolean |
usesJiraTimeZone(JiraServiceContext serviceContext)
Returns true if this user is using the JIRA default time zone or false if the user has is using a custom time zone.
|
boolean |
useSystemTimeZone()
Returns true if the JVM time zone is used, otherwise false.
|
public TimeZoneServiceImpl(ApplicationProperties applicationProperties, PermissionManager permissionManager, UserPreferencesManager userPreferencesManager)
public TimeZoneServiceImpl(ApplicationProperties applicationProperties, PermissionManager permissionManager, UserPreferencesManager userPreferencesManager, com.atlassian.jira.timezone.TimeZoneIdsProvider timeZoneIdsProvider)
public TimeZoneInfo getDefaultTimeZoneInfo(JiraServiceContext serviceContext)
TimeZoneServicegetDefaultTimeZoneInfo in interface TimeZoneServiceserviceContext - JIRA Service Context containing the user that is retrieving the time zone information.public boolean useSystemTimeZone()
TimeZoneServiceuseSystemTimeZone in interface TimeZoneServicepublic List<RegionInfo> getTimeZoneRegions(JiraServiceContext serviceContext)
TimeZoneServicegetTimeZoneRegions in interface TimeZoneServiceserviceContext - JIRA Service Context containing the user that is retrieving the time zone information.public List<TimeZoneInfo> getTimeZoneInfos(JiraServiceContext serviceContext)
TimeZoneServicegetTimeZoneInfos in interface TimeZoneServiceserviceContext - JIRA Service Context containing the user that is retrieving the time zone information.public TimeZoneInfo getJVMTimeZoneInfo(JiraServiceContext serviceContext)
TimeZoneServicegetJVMTimeZoneInfo in interface TimeZoneServiceserviceContext - JIRA Service Context containing the user that is retrieving the time zone information.protected TimeZone getJVMTimeZone()
public void setDefaultTimeZone(String timeZoneId, JiraServiceContext serviceContext)
TimeZoneServicesetDefaultTimeZone in interface TimeZoneServicetimeZoneId - the id of the time zone.serviceContext - JIRA Service Context containing the user that changing the default time zone.public void clearDefaultTimeZone(JiraServiceContext serviceContext)
TimeZoneServiceclearDefaultTimeZone in interface TimeZoneServiceserviceContext - JIRA Service Context containing the user that changing the default time zone.public String getDefaultTimeZoneRegionKey()
TimeZoneServicegetDefaultTimeZoneRegionKey in interface TimeZoneServicepublic void clearUserDefaultTimeZone(JiraServiceContext serviceContext)
TimeZoneServiceclearUserDefaultTimeZone in interface TimeZoneServiceserviceContext - JIRA Service Context containing the user.public TimeZoneInfo getUserTimeZoneInfo(JiraServiceContext serviceContext)
TimeZoneServicegetUserTimeZoneInfo in interface TimeZoneServiceserviceContext - JIRA Service Context containing the user.public boolean usesJiraTimeZone(JiraServiceContext serviceContext)
TimeZoneServiceusesJiraTimeZone in interface TimeZoneServicepublic void setUserDefaultTimeZone(String timeZoneId, JiraServiceContext serviceContext)
TimeZoneServicesetUserDefaultTimeZone in interface TimeZoneServicetimeZoneId - the time zone idserviceContext - JIRA Service Context containing the user.public TimeZone getDefaultTimeZone(JiraServiceContext serviceContext)
TimeZoneResolvergetDefaultTimeZone in interface TimeZoneResolverserviceContext - a JiraServiceContextTimeZoneService.getDefaultTimeZoneInfo(com.atlassian.jira.bc.JiraServiceContext)public TimeZone getUserTimeZone(JiraServiceContext serviceContext)
TimeZoneResolvergetUserTimeZone in interface TimeZoneResolverserviceContext - a JiraServiceContextTimeZoneService.getUserTimeZoneInfo(com.atlassian.jira.bc.JiraServiceContext)Copyright © 2002-2022 Atlassian. All Rights Reserved.