public class ThreadLocalClock extends Object implements Clock
Modifier and Type | Field and Description |
---|---|
protected org.springframework.beans.factory.FactoryBean<Clock> |
clockFactory |
Constructor and Description |
---|
ThreadLocalClock(org.springframework.beans.factory.FactoryBean<Clock> clockFactory) |
Modifier and Type | Method and Description |
---|---|
Calendar |
getCurrentCalendar() |
Calendar |
getCurrentCalendar(TimeZone timeZone) |
Date |
getCurrentTime() |
TimeZone |
getCurrentTimeZone() |
void |
reset() |
void |
setCurrentCalendar(Calendar currentTime) |
void |
setCurrentTime(Date currentTime) |
protected org.springframework.beans.factory.FactoryBean<Clock> clockFactory
public ThreadLocalClock(org.springframework.beans.factory.FactoryBean<Clock> clockFactory)
public void setCurrentTime(Date currentTime)
setCurrentTime
in interface Clock
public void setCurrentCalendar(Calendar currentTime)
setCurrentCalendar
in interface Clock
public Date getCurrentTime()
getCurrentTime
in interface ClockReader
public Calendar getCurrentCalendar()
getCurrentCalendar
in interface ClockReader
public Calendar getCurrentCalendar(TimeZone timeZone)
getCurrentCalendar
in interface ClockReader
public TimeZone getCurrentTimeZone()
getCurrentTimeZone
in interface ClockReader
Copyright © 2016 Alfresco. All rights reserved.