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)
TimeZoneService
getDefaultTimeZoneInfo
in interface TimeZoneService
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.public boolean useSystemTimeZone()
TimeZoneService
useSystemTimeZone
in interface TimeZoneService
public List<RegionInfo> getTimeZoneRegions(JiraServiceContext serviceContext)
TimeZoneService
getTimeZoneRegions
in interface TimeZoneService
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.public List<TimeZoneInfo> getTimeZoneInfos(JiraServiceContext serviceContext)
TimeZoneService
getTimeZoneInfos
in interface TimeZoneService
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.public TimeZoneInfo getJVMTimeZoneInfo(JiraServiceContext serviceContext)
TimeZoneService
getJVMTimeZoneInfo
in interface TimeZoneService
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.protected TimeZone getJVMTimeZone()
public void setDefaultTimeZone(String timeZoneId, JiraServiceContext serviceContext)
TimeZoneService
setDefaultTimeZone
in interface TimeZoneService
timeZoneId
- the id of the time zone.serviceContext
- JIRA Service Context containing the user that changing the default time zone.public void clearDefaultTimeZone(JiraServiceContext serviceContext)
TimeZoneService
clearDefaultTimeZone
in interface TimeZoneService
serviceContext
- JIRA Service Context containing the user that changing the default time zone.public String getDefaultTimeZoneRegionKey()
TimeZoneService
getDefaultTimeZoneRegionKey
in interface TimeZoneService
public void clearUserDefaultTimeZone(JiraServiceContext serviceContext)
TimeZoneService
clearUserDefaultTimeZone
in interface TimeZoneService
serviceContext
- JIRA Service Context containing the user.public TimeZoneInfo getUserTimeZoneInfo(JiraServiceContext serviceContext)
TimeZoneService
getUserTimeZoneInfo
in interface TimeZoneService
serviceContext
- JIRA Service Context containing the user.public boolean usesJiraTimeZone(JiraServiceContext serviceContext)
TimeZoneService
usesJiraTimeZone
in interface TimeZoneService
public void setUserDefaultTimeZone(String timeZoneId, JiraServiceContext serviceContext)
TimeZoneService
setUserDefaultTimeZone
in interface TimeZoneService
timeZoneId
- the time zone idserviceContext
- JIRA Service Context containing the user.public TimeZone getDefaultTimeZone(JiraServiceContext serviceContext)
TimeZoneResolver
getDefaultTimeZone
in interface TimeZoneResolver
serviceContext
- a JiraServiceContextTimeZoneService.getDefaultTimeZoneInfo(com.atlassian.jira.bc.JiraServiceContext)
public TimeZone getUserTimeZone(JiraServiceContext serviceContext)
TimeZoneResolver
getUserTimeZone
in interface TimeZoneResolver
serviceContext
- a JiraServiceContextTimeZoneService.getUserTimeZoneInfo(com.atlassian.jira.bc.JiraServiceContext)
Copyright © 2002-2019 Atlassian. All Rights Reserved.