org.opennms.netmgt.config
Class BasicScheduleUtils
java.lang.Object
org.opennms.netmgt.config.BasicScheduleUtils
public class BasicScheduleUtils
- extends Object
|
Method Summary |
static Date |
getDailyTime(Date referenceTime,
String timeString)
|
static Integer |
getDayOfWeekIndex(String dayName)
|
static Calendar |
getEndOfSchedule(BasicSchedule out)
|
static OwnedInterval |
getInterval(Date ref,
Time time,
Owner owner)
|
static OwnedIntervalSequence |
getIntervals(Date start,
Date end,
Time time,
Owner owner)
|
static OwnedIntervalSequence |
getIntervals(TimeInterval interval,
Time time,
Owner owner)
|
static OwnedIntervalSequence |
getIntervalsCovering(Date start,
Date end,
BasicSchedule sched,
Owner owner)
|
static OwnedIntervalSequence |
getIntervalsCovering(TimeInterval interval,
BasicSchedule sched,
Owner owner)
|
static Date |
getMonthlyTime(Date referenceTime,
String day,
String timeString)
|
static Date |
getSpecificTime(String specificString)
|
static Date |
getWeeklyTime(Date referenceTime,
String day,
String timeString)
|
static boolean |
isDaily(Time time)
|
static boolean |
isMonthly(Time time)
|
static boolean |
isSpecific(Time time)
|
static boolean |
isTimeInSchedule(Calendar cal,
BasicSchedule sched)
|
static boolean |
isTimeInSchedule(Date time,
BasicSchedule sched)
|
static boolean |
isWeekly(Time time)
|
static Date |
nextDay(Date date)
|
static Date |
nextMonth(Date date)
|
static Date |
nextWeek(Date date)
|
static void |
setOutCalTime(Calendar outCal,
String timeStr)
Set the time in outCal from timeStr. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_dayOfWeekMap
protected static Map<String,Integer> m_dayOfWeekMap
- The day of the week values to name mapping
FORMAT1
public static String FORMAT1
FORMAT2
public static String FORMAT2
BasicScheduleUtils
public BasicScheduleUtils()
isTimeInSchedule
public static boolean isTimeInSchedule(Calendar cal,
BasicSchedule sched)
setOutCalTime
public static void setOutCalTime(Calendar outCal,
String timeStr)
- Set the time in outCal from timeStr. 'timeStr'is in either the
'dd-MMM-yyyy HH:mm:ss' or the 'HH:mm:ss' formats
- Parameters:
outCal - the calendar in which time is to be settimeStr - the time string
getDayOfWeekIndex
public static Integer getDayOfWeekIndex(String dayName)
getEndOfSchedule
public static Calendar getEndOfSchedule(BasicSchedule out)
isTimeInSchedule
public static boolean isTimeInSchedule(Date time,
BasicSchedule sched)
isDaily
public static boolean isDaily(Time time)
isWeekly
public static boolean isWeekly(Time time)
isMonthly
public static boolean isMonthly(Time time)
isSpecific
public static boolean isSpecific(Time time)
getSpecificTime
public static Date getSpecificTime(String specificString)
getMonthlyTime
public static Date getMonthlyTime(Date referenceTime,
String day,
String timeString)
getWeeklyTime
public static Date getWeeklyTime(Date referenceTime,
String day,
String timeString)
getDailyTime
public static Date getDailyTime(Date referenceTime,
String timeString)
getInterval
public static OwnedInterval getInterval(Date ref,
Time time,
Owner owner)
nextDay
public static Date nextDay(Date date)
nextWeek
public static Date nextWeek(Date date)
nextMonth
public static Date nextMonth(Date date)
getIntervals
public static OwnedIntervalSequence getIntervals(Date start,
Date end,
Time time,
Owner owner)
getIntervals
public static OwnedIntervalSequence getIntervals(TimeInterval interval,
Time time,
Owner owner)
getIntervalsCovering
public static OwnedIntervalSequence getIntervalsCovering(Date start,
Date end,
BasicSchedule sched,
Owner owner)
getIntervalsCovering
public static OwnedIntervalSequence getIntervalsCovering(TimeInterval interval,
BasicSchedule sched,
Owner owner)
Copyright © 2009. All Rights Reserved.