Interface IBusinessCalendarConfiguration
Defines the free days and working time of a IBusinessCalendar.
IBusinessCalendarConfiguration are stored in a hierarchy.
At the root of the hierarchy is always the default IBusinessCalendarConfiguration (see IBusinessCalendarSettings.getRootBusinessCalendarConfiguration()).
A IBusinessCalendarConfiguration inherits all configuration from its parent IBusinessCalendarConfigurations.
A free day or WorkingTime of a parent IBusinessCalendarConfiguration cannot be changed or removed in its children.
Example: add easter day as free easter relative day.
businessCalendarConfiguration.getFreeEasterRelativeDays().add(new FreeEasterRelativeDay(0));
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the first day of the week.Returns a list with all non-recurring free dates.Returns a list with all weekly free days.Returns a list of all annual free days.Returns a list of all free days relative to easter day.getName()Returns the name of this calendarReturns the parent of thisIBusinessCalendarConfiguration.Returns a list ofWorkingTimes defining which time of a day is working time.voidsetFirstDayOfWeek(Weekday firstDayOfWeek) Sets the first day of the week tofirstDayOfWeekvoidSets the parentIBusinessCalendarConfiguration.
-
Method Details
-
getName
String getName()Returns the name of this calendar- Returns:
- the name
- API:
- This public API is available in Java.
-
getParent
IBusinessCalendarConfiguration getParent()Returns the parent of thisIBusinessCalendarConfiguration.- Returns:
- the parent or null if this is the default
IBusinessCalendarConfiguration - API:
- This public API is available in Java.
-
setParent
Sets the parentIBusinessCalendarConfiguration. This causesthiscalendar to use all settings of theparentIBusinessCalendarConfigurationin addition to its own settings.- Parameters:
parent- the parent to set. Never null.- Throws:
IllegalArgumentException- ifparentis the same asthisorthisis an ancestor ofparent- API:
- This public API is available in Java.
-
getFirstDayOfWeek
Weekday getFirstDayOfWeek()Returns the first day of the week. Default isWeekday.MONDAY- Returns:
- the first day of week. Never null.
- API:
- This public API is available in Java.
-
setFirstDayOfWeek
Sets the first day of the week tofirstDayOfWeek- Parameters:
firstDayOfWeek- the first day of the week to set- Throws:
IllegalArgumentException- iffirstDayOfWeekis null- See Also:
- API:
- This public API is available in Java.
-
getWorkingTimes
List<WorkingTime> getWorkingTimes()Returns a list of
WorkingTimes defining which time of a day is working time.If no working times are defined an empty list is returned.
- Returns:
- the working times. Never null.
- API:
- This public API is available in Java.
-
getFreeEasterRelativeDays
List<FreeEasterRelativeDay> getFreeEasterRelativeDays()Returns a list of all free days relative to easter day. If no free days are defined an empty list is returned.- Returns:
- the free days relative to easter day. Never null.
- API:
- This public API is available in Java.
-
getFreeDaysOfYear
List<FreeDayOfYear> getFreeDaysOfYear()Returns a list of all annual free days. If no free days are defined an empty list is returned.- Returns:
- the free days of the year. Never null.
- API:
- This public API is available in Java.
-
getFreeDaysOfWeek
List<FreeDayOfWeek> getFreeDaysOfWeek()Returns a list with all weekly free days. If no free days are defined an empty list is returned.- Returns:
- the free days of the week. Never null.
- API:
- This public API is available in Java.
-
getFreeDates
Returns a list with all non-recurring free dates. If no free dates are defined an empty list is returned.- Returns:
- the free dates. Never null.
- API:
- This public API is available in Java.
-