Interface IBusinessCalendarSettings
Reads, writes, creates and deletes IBusinessCalendarConfigurations
Each IApplication has its own IBusinessCalendarSettings (see IApplication.getBusinessCalendarSettings()).
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newIBusinessCalendarConfigurationidentified by thename.voiddeleteBusinessCalendarConfiguration(IBusinessCalendarConfiguration businessCalendarConfiguration) Deletes theIBusinessCalendarConfigurationbusinessCalendarConfiguration.Deprecated, for removal: This API element is subject to removal in a future version.Finds theIBusinessCalendarConfigurationidentified by thename.Returns an Tree containing allIBusinessCalendarConfigurationsReturns an List containing allIBusinessCalendarConfigurationsgetBusinessCalendarId(IBusinessCalendar calendar) Deprecated, for removal: This API element is subject to removal in a future version.useIBusinessCalendar.getName()instead to identify a calendargetBusinessCalendarId(String calendarName) Deprecated, for removal: This API element is subject to removal in a future version.use calendar name to identify calendarsReturns the defaultIBusinessCalendarConfigurationfor this application.voidsaveBusinessCalendarConfiguration(IBusinessCalendarConfiguration businessCalendarConfiguration) Persists changes in theIBusinessCalendarConfigurationbusinessCalendarConfiguration.
-
Method Details
-
findBusinessCalendarConfiguration
Finds theIBusinessCalendarConfigurationidentified by thename. If noIBusinessCalendarConfigurationis stored under thatname, null is returned.- Parameters:
name- the unique name of the desiredIBusinessCalendarConfiguration. Must not be empty and shorter than 200 characters.- Returns:
- the
IBusinessCalendarConfigurationidentified by thename. Null if none is found. - Throws:
IllegalArgumentException- ifnameis null or too long.PersistencyException- if the persistency system access failed.- API:
- This public API is available in Java.
-
createBusinessCalendarConfiguration
Creates a newIBusinessCalendarConfigurationidentified by thename. The newIBusinessCalendarConfigurationhas the default calendar as parent. UseIBusinessCalendarConfiguration.setParent(IBusinessCalendarConfiguration)to change the parent.- Parameters:
name- the unique name of the desiredIBusinessCalendarConfiguration. Must not be empty and shorter than 200 characters.- Returns:
- the new
IBusinessCalendarConfigurationidentified by the name. Never null. - Throws:
IllegalArgumentException- ifnameis null or too long.IllegalStateException- if a calendar with thenamealready existsPersistencyException- if the persistency system access failed.- API:
- This public API is available in Java.
-
getRootBusinessCalendarConfiguration
IBusinessCalendarConfiguration getRootBusinessCalendarConfiguration()Returns the defaultIBusinessCalendarConfigurationfor this application. This is the rootIBusinessCalendarConfigurationfrom which all otherIBusinessCalendarConfigurations of this application inherit.- Returns:
- the default
IBusinessCalendarConfigurationfor this application. Never null. - Throws:
PersistencyException- if the persistency system access failed.- API:
- This public API is available in Java.
-
getAllBusinessCalendarConfigurations
Tree getAllBusinessCalendarConfigurations()Returns an Tree containing allIBusinessCalendarConfigurations- Returns:
- Tree of
IBusinessCalendarConfigurations. Never null. - Throws:
PersistencyException- if the persistency system access failed.- API:
- This public API is available in Java.
-
getAllBusinessCalendarConfigurationsAsList
List<IBusinessCalendarConfiguration> getAllBusinessCalendarConfigurationsAsList()Returns an List containing allIBusinessCalendarConfigurations- Returns:
- List of
IBusinessCalendarConfigurations. Never null. - Throws:
PersistencyException- if the persistency system access failed.- API:
- This public API is available in Java.
-
saveBusinessCalendarConfiguration
void saveBusinessCalendarConfiguration(IBusinessCalendarConfiguration businessCalendarConfiguration) Persists changes in the
IBusinessCalendarConfigurationbusinessCalendarConfiguration.To create or change a
IBusinessCalendarConfiguration, first create theIBusinessCalendarConfigurationusingcreateBusinessCalendarConfiguration(String)or load it usingfindBusinessCalendarConfiguration(String).
Example:
IBusinessCalendarConfigurationcalendarConfiguration = application.getBusinessCalendarConfiguration("ZugSpecialHolidays"); calendarConfiguration.getFreeDaysOfYear().add(newFreeDayOfYear(12,8))); application.saveBusinessCalendarConfiguration(calendarConfiguration);- Parameters:
businessCalendarConfiguration- the businessCalendarConfiguration to persist- Throws:
IllegalArgumentException- if calendarConfiguration is nullPersistencyException- if the persistency system access failed.- API:
- This public API is available in Java.
-
deleteBusinessCalendarConfiguration
void deleteBusinessCalendarConfiguration(IBusinessCalendarConfiguration businessCalendarConfiguration) Deletes the
IBusinessCalendarConfigurationbusinessCalendarConfiguration. If the configuration is not persisted yet, nothing happens.Example:
IBusinessCalendarConfigurationconfigurationToDelete = application.getBusinessCalendarConfiguration(x); application.deleteBusinessCalendarConfiguration(configurationToDelete);- Parameters:
businessCalendarConfiguration- theIBusinessCalendarConfigurationto delete- Throws:
IllegalArgumentException- if calendarConfiguration is nullPersistencyException- if the persistency system access failed.ch.ivyteam.util.IvyRuntimeException- if thebusinessCalendarConfigurationis the defaultIBusinessCalendarConfiguration(seegetRootBusinessCalendarConfiguration())- API:
- This public API is available in Java.
-
findBusinessCalendarConfiguration
@Deprecated(since="9.4", forRemoval=true) IBusinessCalendarConfiguration findBusinessCalendarConfiguration(Long id) Deprecated, for removal: This API element is subject to removal in a future version.usefindBusinessCalendarConfiguration(String)insteadInternal API to get theIBusinessCalendarConfigurationwith the id stored in the db.- Parameters:
id-- Returns:
- will always return null because calendars are no longer stored in database.
- API:
- This public API is available in Java.
-
getBusinessCalendarId
Deprecated, for removal: This API element is subject to removal in a future version.useIBusinessCalendar.getName()instead to identify a calendarInternal API to get the id under which the calendar is stored in the db.- Parameters:
calendar- nullable.- Returns:
- will always return null because calendars are no longer stored in database.
- API:
- This public API is available in Java.
-
getBusinessCalendarId
Deprecated, for removal: This API element is subject to removal in a future version.use calendar name to identify calendarsInternal API to get the id under which the calendar is stored in the db.- Parameters:
calendarName- nullable.- Returns:
- will always return null because calendars are no longer stored in database
- API:
- This public API is available in Java.
-
findBusinessCalendarConfiguration(String)instead