org.kuali.hr.time.timezone.service
Interface TimezoneService

All Known Implementing Classes:
TimezoneServiceImpl

public interface TimezoneService


Method Summary
 long getTimezoneOffsetFromServerTime(org.joda.time.DateTimeZone dtz)
           
 String getUserTimezone()
          Fetch user time zone of the current on-context user.
 String getUserTimezone(String principalId)
          (this call may be cached) Fetch the users timezone, Data on: Principal Calendar > Job/Location > System Default
 org.joda.time.DateTimeZone getUserTimezoneWithFallback()
          Returns the DateTimeZone object for the current user OR the system default timezone if there is no current user / a time zone is missing.
 boolean isSameTimezone()
          Determine if Timezone is same as server timezone
 void translateForTimezone(List<TimeBlock> timeBlocks)
           
 List<TimeBlock> translateForTimezone(List<TimeBlock> timeBlocks, String timezone)
          Translate TimeBlocks to a given timezone
 

Method Detail

getUserTimezoneWithFallback

org.joda.time.DateTimeZone getUserTimezoneWithFallback()
Returns the DateTimeZone object for the current user OR the system default timezone if there is no current user / a time zone is missing.

Returns:

getUserTimezone

String getUserTimezone()
Fetch user time zone of the current on-context user.

Returns:

getUserTimezone

@Cacheable(value="KPME/Global",
           key="\'{UserTimezone}\' + \'principalId=\' + #p0")
String getUserTimezone(String principalId)
(this call may be cached) Fetch the users timezone, Data on: Principal Calendar > Job/Location > System Default

Parameters:
principalId - The principal you are looking for.
Returns:
String timezone, see: http://joda-time.sourceforge.net/timezones.html

translateForTimezone

List<TimeBlock> translateForTimezone(List<TimeBlock> timeBlocks,
                                     String timezone)
Translate TimeBlocks to a given timezone

Parameters:
timeBlocks -
timezone -
Returns:

translateForTimezone

void translateForTimezone(List<TimeBlock> timeBlocks)

isSameTimezone

boolean isSameTimezone()
Determine if Timezone is same as server timezone

Returns:

getTimezoneOffsetFromServerTime

long getTimezoneOffsetFromServerTime(org.joda.time.DateTimeZone dtz)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.