org.jbpm.cal
Class BusinessCalendar
java.lang.Object
org.jbpm.cal.BusinessCalendar
- All Implemented Interfaces:
- java.io.Serializable
public class BusinessCalendar
- extends java.lang.Object
- implements java.io.Serializable
a calendar that knows about business hours.
- See Also:
- Serialized Form
Constructor Summary |
BusinessCalendar()
constructor for persistence and creating an empty business calendar |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
oid
protected long oid
version
protected int version
timeZone
protected java.util.TimeZone timeZone
days
protected Day[] days
- array that contains the weekdays in the index as specified by
Calendar.SUNDAY
(=1),
Calendar.MONDAY
(=2),... Calendar.SATURDAY
(=7).
holidays
protected Holiday[] holidays
secondInMillis
protected long secondInMillis
minuteInMillis
protected long minuteInMillis
hourInMillis
protected long hourInMillis
dayInMillis
protected long dayInMillis
weekInMillis
protected long weekInMillis
monthInMillis
protected long monthInMillis
yearInMillis
protected long yearInMillis
businessDayInMillis
protected long businessDayInMillis
businessWeekInMillis
protected long businessWeekInMillis
businessMonthInMillis
protected long businessMonthInMillis
businessYearInMillis
protected long businessYearInMillis
BusinessCalendar
public BusinessCalendar()
- constructor for persistence and creating an empty business calendar
getInstance
public static BusinessCalendar getInstance()
add
public java.util.Date add(java.util.Date date,
Duration duration)
convertToMillis
public long convertToMillis(Duration duration)
isInBusinessHours
public boolean isInBusinessHours(java.util.Date date)
isHoliday
public boolean isHoliday(java.util.Date date)
findStartOfNextDay
protected java.util.Date findStartOfNextDay(java.util.Date date)
createCalendar
public java.util.Calendar createCalendar()
findDay
protected Day findDay(java.util.Date date)
findDayPart
protected DayPart findDayPart(java.util.Date date)
findNextDayPart
protected DayPart findNextDayPart(java.util.Date date)
getBusinessDayInMillis
public long getBusinessDayInMillis()
setBusinessDayInMillis
public void setBusinessDayInMillis(long businessDayInMillis)
getBusinessMonthInMillis
public long getBusinessMonthInMillis()
setBusinessMonthInMillis
public void setBusinessMonthInMillis(long businessMonthInMillis)
getBusinessWeekInMillis
public long getBusinessWeekInMillis()
setBusinessWeekInMillis
public void setBusinessWeekInMillis(long businessWeekInMillis)
getBusinessYearInMillis
public long getBusinessYearInMillis()
setBusinessYearInMillis
public void setBusinessYearInMillis(long businessYearInMillis)
getDayInMillis
public long getDayInMillis()
setDayInMillis
public void setDayInMillis(long dayInMillis)
getDays
public Day[] getDays()
setDays
public void setDays(Day[] days)
getHolidays
public Holiday[] getHolidays()
setHolidays
public void setHolidays(Holiday[] holidays)
getHourInMillis
public long getHourInMillis()
setHourInMillis
public void setHourInMillis(long hourInMillis)
getMinuteInMillis
public long getMinuteInMillis()
setMinuteInMillis
public void setMinuteInMillis(long minuteInMillis)
getMonthInMillis
public long getMonthInMillis()
setMonthInMillis
public void setMonthInMillis(long monthInMillis)
getSecondInMillis
public long getSecondInMillis()
setSecondInMillis
public void setSecondInMillis(long secondInMillis)
getTimeZone
public java.util.TimeZone getTimeZone()
setTimeZone
public void setTimeZone(java.util.TimeZone timeZone)
getWeekInMillis
public long getWeekInMillis()
setWeekInMillis
public void setWeekInMillis(long weekInMillis)
getYearInMillis
public long getYearInMillis()
setYearInMillis
public void setYearInMillis(long yearInMillis)