public class ServiceUtils
extends java.lang.Object
Constructor and Description |
---|
ServiceUtils(DbConfig dbConfig)
ServiceUtils constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Calendar> |
getCurrentCalendars(long epochTime)
Finds the calendars that are currently active.
|
int |
getDayOfWeek(java.util.Date epochTime)
Returns day of the week.
|
java.util.Collection<java.lang.String> |
getServiceIds(java.util.Date epochTime)
Determines list of current service IDs for the specified time.
|
java.util.Collection<java.lang.String> |
getServiceIds(long epochTime)
Determines list of current service IDs for the specified time.
|
java.util.List<java.lang.String> |
getServiceIdsForDay(java.util.Date epochTime)
Determines list of current service IDs for the specified time.
|
java.util.List<java.lang.String> |
getServiceIdsForDay(long epochTime)
Determines list of current service IDs for the specified time.
|
public ServiceUtils(DbConfig dbConfig)
timezoneName
- See http://en.wikipedia.org/wiki/List_of_tz_zonespublic int getDayOfWeek(java.util.Date epochTime)
epochTime
- public java.util.List<java.lang.String> getServiceIdsForDay(java.util.Date epochTime)
Uses already read in calendars, but does a good number of calculations so still a bit expensive.
epochTime
- The current time that determining service IDs forpublic java.util.List<java.lang.String> getServiceIdsForDay(long epochTime)
Uses already read in calendars, but does a good number of calculations so still a bit expensive.
epochTime
- The current time that determining service IDs forpublic java.util.Collection<java.lang.String> getServiceIds(java.util.Date epochTime)
Uses already read in calendars, but does a good number of calculations so still a bit expensive.
epochTime
- The current time that determining service IDs forpublic java.util.Collection<java.lang.String> getServiceIds(long epochTime)
Uses already read in calendars, but does a good number of calculations so still a bit expensive.
epochTime
- The current time that determining service IDs forpublic java.util.List<Calendar> getCurrentCalendars(long epochTime)
epochTime
-