Interface IBusinessCalendarConfiguration
-
public 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 defaultIBusinessCalendarConfiguration
(seeIBusinessCalendarSettings.getRootBusinessCalendarConfiguration()
).
AIBusinessCalendarConfiguration
inherits all configuration from its parentIBusinessCalendarConfiguration
s.
A free day orWorkingTime
of a parentIBusinessCalendarConfiguration
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Weekday
getFirstDayOfWeek()
Returns the first day of the week.List<FreeDate>
getFreeDates()
Returns a list with all non-recurring free dates.List<FreeDayOfWeek>
getFreeDaysOfWeek()
Returns a list with all weekly free days.List<FreeDayOfYear>
getFreeDaysOfYear()
Returns a list of all annual free days.List<FreeEasterRelativeDay>
getFreeEasterRelativeDays()
Returns a list of all free days relative to easter day.String
getName()
Returns the name of this calendarIBusinessCalendarConfiguration
getParent()
Returns the parent of thisIBusinessCalendarConfiguration
.List<WorkingTime>
getWorkingTimes()
Returns a list ofWorkingTime
s defining which time of a day is working time.void
setFirstDayOfWeek(Weekday firstDayOfWeek)
Sets the first day of the week tofirstDayOfWeek
void
setParent(IBusinessCalendarConfiguration parent)
Sets the parentIBusinessCalendarConfiguration
.
-
-
-
Method Detail
-
getName
String getName()
Returns the name of this calendar- Returns:
- the name
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
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 IvyScript and Java. It has the visibility EXPERT.
-
setParent
void setParent(IBusinessCalendarConfiguration parent)
Sets the parentIBusinessCalendarConfiguration
. This causesthis
calendar to use all settings of theparent
IBusinessCalendarConfiguration
in addition to its own settings.- Parameters:
parent
- the parent to set. Never null.- Throws:
IllegalArgumentException
- ifparent
is the same asthis
orthis
is an ancestor ofparent
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
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 IvyScript and Java. It has the visibility EXPERT.
-
setFirstDayOfWeek
void setFirstDayOfWeek(Weekday firstDayOfWeek)
Sets the first day of the week tofirstDayOfWeek
- Parameters:
firstDayOfWeek
- the first day of the week to set- Throws:
IllegalArgumentException
- iffirstDayOfWeek
is null- See Also:
IBusinessCalendar.getFirstWorkDayOfWeek(Number)
,IBusinessCalendar.getLastWorkDayOfWeek(Number)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getWorkingTimes
List<WorkingTime> getWorkingTimes()
Returns a list of
WorkingTime
s 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 IvyScript and Java. It has the visibility EXPERT.
-
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 IvyScript and Java. It has the visibility EXPERT.
-
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 IvyScript and Java. It has the visibility EXPERT.
-
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 IvyScript and Java. It has the visibility EXPERT.
-
-