public abstract class BasicScheduleUtils extends Object
BasicScheduleUtils class.
| Modifier and Type | Field and Description |
|---|---|
static String |
FORMAT1
Constant
FORMAT1="dd-MMM-yyyy HH:mm:ss" |
static String |
FORMAT2
Constant
FORMAT2="HH:mm:ss" |
protected static ThreadLocal<Map<String,Integer>> |
m_dayOfWeekMap
The day of the week values to name mapping
|
| Constructor and Description |
|---|
BasicScheduleUtils() |
| Modifier and Type | Method and Description |
|---|---|
static BasicSchedule |
getBasicOutageSchedule(Outage out) |
static Date |
getDailyTime(Date referenceTime,
String timeString)
getDailyTime
|
static Integer |
getDayOfWeekIndex(String dayName)
getDayOfWeekIndex
|
static Calendar |
getEndOfSchedule(BasicSchedule out)
getEndOfSchedule
|
static BasicSchedule |
getGroupSchedule(Schedule schedule) |
static OwnedInterval |
getInterval(Date ref,
Time time,
Owner owner)
getInterval
|
static OwnedIntervalSequence |
getIntervals(Date start,
Date end,
Time time,
Owner owner)
getIntervals
|
static OwnedIntervalSequence |
getIntervals(TimeInterval interval,
Time time,
Owner owner)
getIntervals
|
static OwnedIntervalSequence |
getIntervalsCovering(Date start,
Date end,
BasicSchedule sched,
Owner owner)
getIntervalsCovering
|
static OwnedIntervalSequence |
getIntervalsCovering(TimeInterval interval,
BasicSchedule sched,
Owner owner)
getIntervalsCovering
|
static Date |
getMonthlyTime(Date referenceTime,
String day,
String timeString)
getMonthlyTime
|
static BasicSchedule |
getRancidSchedule(Schedule schedule) |
static Date |
getSpecificTime(String specificString)
getSpecificTime
|
static Date |
getWeeklyTime(Date referenceTime,
String day,
String timeString)
getWeeklyTime
|
static boolean |
isDaily(Time time)
isDaily
|
static boolean |
isMonthly(Time time)
isMonthly
|
static boolean |
isSpecific(Time time)
isSpecific
|
static boolean |
isTimeInSchedule(Calendar cal,
BasicSchedule sched)
isTimeInSchedule
|
static boolean |
isTimeInSchedule(Date time,
BasicSchedule sched)
isTimeInSchedule
|
static boolean |
isWeekly(Time time)
isWeekly
|
static Date |
nextDay(Date date)
nextDay
|
static Date |
nextMonth(Date date)
nextMonth
|
static Date |
nextWeek(Date date)
nextWeek
|
static void |
setOutCalTime(Calendar outCal,
String timeStr)
Set the time in outCal from timeStr.
|
protected static final ThreadLocal<Map<String,Integer>> m_dayOfWeekMap
public static final String FORMAT1
FORMAT1="dd-MMM-yyyy HH:mm:ss"public static final String FORMAT2
FORMAT2="HH:mm:ss"public static boolean isTimeInSchedule(Calendar cal, BasicSchedule sched)
isTimeInSchedule
cal - a Calendar object.sched - a org.opennms.netmgt.config.poller.outages.common.BasicSchedule object.public static void setOutCalTime(Calendar outCal, String timeStr)
outCal - the calendar in which time is to be settimeStr - the time stringpublic static Calendar getEndOfSchedule(BasicSchedule out)
getEndOfSchedule
out - a org.opennms.netmgt.config.poller.outages.common.BasicSchedule object.Calendar object.public static boolean isTimeInSchedule(Date time, BasicSchedule sched)
isTimeInSchedule
time - a Date object.sched - a org.opennms.netmgt.config.poller.outages.common.BasicSchedule object.public static boolean isDaily(Time time)
isDaily
time - a org.opennms.netmgt.config.poller.outages.common.Time object.public static boolean isWeekly(Time time)
isWeekly
time - a org.opennms.netmgt.config.poller.outages.common.Time object.public static boolean isMonthly(Time time)
isMonthly
time - a org.opennms.netmgt.config.poller.outages.common.Time object.public static boolean isSpecific(Time time)
isSpecific
time - a org.opennms.netmgt.config.poller.outages.common.Time object.public static Date getMonthlyTime(Date referenceTime, String day, String timeString)
getMonthlyTime
public static Date getWeeklyTime(Date referenceTime, String day, String timeString)
getWeeklyTime
public static OwnedInterval getInterval(Date ref, Time time, Owner owner)
getInterval
ref - a Date object.time - a org.opennms.netmgt.config.poller.outages.common.Time object.owner - a Owner object.OwnedInterval object.public static OwnedIntervalSequence getIntervals(Date start, Date end, Time time, Owner owner)
getIntervals
start - a Date object.end - a Date object.time - a org.opennms.netmgt.config.poller.outages.common.Time object.owner - a Owner object.OwnedIntervalSequence object.public static OwnedIntervalSequence getIntervals(TimeInterval interval, Time time, Owner owner)
getIntervals
interval - a TimeInterval object.time - a org.opennms.netmgt.config.poller.outages.common.Time object.owner - a Owner object.OwnedIntervalSequence object.public static OwnedIntervalSequence getIntervalsCovering(Date start, Date end, BasicSchedule sched, Owner owner)
getIntervalsCovering
start - a Date object.end - a Date object.sched - a org.opennms.netmgt.config.poller.outages.common.BasicSchedule object.owner - a Owner object.OwnedIntervalSequence object.public static OwnedIntervalSequence getIntervalsCovering(TimeInterval interval, BasicSchedule sched, Owner owner)
getIntervalsCovering
interval - a TimeInterval object.sched - a org.opennms.netmgt.config.poller.outages.common.BasicSchedule object.owner - a Owner object.OwnedIntervalSequence object.public static BasicSchedule getBasicOutageSchedule(Outage out)
public static BasicSchedule getGroupSchedule(Schedule schedule)
public static BasicSchedule getRancidSchedule(Schedule schedule)
Copyright © 2022. All rights reserved.